Hi!

On Tue, 2024-02-27 at 17:33:16 +0100, Alejandro Colomar wrote:
> Package: libbsd-dev
> Version: 0.12.0-1
> Severity: grave
> Tags: upstream
> Justification: renders package unusable
> X-Debbugs-Cc: a...@kernel.org

> After upgrading to libbsd 0.12 today, several build systems that I use
> started reporting many failures about libbsd functions.  The functions
> seem to have disappeared.  I remember having seen that the build system
> of libbsd has been recently tweaked, so I suspect one of those changes
> might be the cause of the problem.
> 
> Here's a small reproducer:
> 
>       $ cat bsd.c 
>       #include <bsd/stdlib.h>
> 
>       long
>       strtoi_(char *s, char **endp, int b, long min, long max, int *st)
>       {
>               return strtoi(s, endp, b, min, max, st);
>       }

> Which reports the following error:
> 
>       $ gcc -Wall -Wextra -S bsd.c 
>       bsd.c: In function ‘strtoi_’:
>       bsd.c:6:16: warning: implicit declaration of function ‘strtoi’; did you 
> mean ‘strtoi_’? [-Wimplicit-function-declaration]
>           6 |         return strtoi(s, endp, b, min, max, st);
>             |                ^~~~~~
>             |                strtoi_

The strtoi() function is declared in <inttypes.h>. I don't think that
has changed in libbsd.

> BTW, thanks for updating strtoi/u(3) from NetBSD!  =)

Thanks for handling the upstream interaction in NetBSD!

On Tue, 2024-02-27 at 17:42:43 +0100, Alejandro Colomar wrote:
> On Tue, Feb 27, 2024 at 05:33:16PM +0100, Alejandro Colomar wrote:
> > I've also seen errc(3bsd) disappear, and possibly many more functions.
> > If you need some help to reproduce this issue, just let me know.
> 
> In the case of <err.h>, the header has disappeared:
> 
>       $ cat bsd.c 
>       #include <bsd/err.h>
>       #include <bsd/stdlib.h>
> 
>       long
>       strtoi_(char *s, char **endp, int b, long min, long max, int *st)
>       {
>               return strtoi(s, endp, b, min, max, st);
>       }
>       alx@debian:~/tmp$ gcc -Wall -Wextra -S bsd.c
>       bsd.c:1:10: fatal error: bsd/err.h: No such file or directory
>           1 | #include <bsd/err.h>
>             |          ^~~~~~~~~~~
>       compilation terminated.
> 
> This seems consistent with the recent build system changes.  The bug is
> probably there.

Ah, it indeed has disappeared. The upstream build system is missing a
conditional for the header, I'll add this later today and prepare a
new upstream release.

Another thing which I was aware, but then slipped my mind is that the
cdefs.h header needs to be placed under a multi-arch qualified
directory otherwise it will conflict with other instances of the
library now that it contains arch-specific defines. Will amend that
with the new Debian upload.

Thanks,
Guillem

Reply via email to