- Package:
- libbsd-dev
- Source:
- libbsd-dev
- Description:
- utility functions from BSD systems - development files
- Submitter:
- Alejandro Colomar
- Date:
- 2024-02-28 06:09:04 UTC
- Severity:
- normal
- Tags:
Dear Guillem,
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_
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.
BTW, thanks for updating strtoi/u(3) from NetBSD! =)
Have a lovely day!
Alex
Hi Guillem!
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.
Have a lovely day!
Alex
Hi! [...] Oops! I wrote the reproducer too fast. Actually, the problem I saw was about errc(), but because I tried strtoi() to see if it was the only function, and it also failed, but I forgot about the right header. It was also aggravated by the fact that my grepc(1) program didn't find it. But it's due to a bug I introduced yesterday in grepc(1). :| $ grepc strtoi /usr/include/bsd/ But grep(1) does find it: $ grep -rn strtoi /usr/include/bsd/ /usr/include/bsd/inttypes.h:43:intmax_t strtoi(const char *__restrict nptr, char **__restrict endptr, And after fixing the bug in grepc(1): $ grepc strtoi /usr/include/bsd/ /usr/include/bsd/inttypes.h:__BEGIN_DECLS intmax_t strtoi(const char *__restrict nptr, char **__restrict endptr, int base, intmax_t lo, intmax_t hi, int *rstatus); [...] Thanks! Have a lovely day! Alex
Hi! The strtoi() function is declared in <inttypes.h>. I don't think that has changed in libbsd. Thanks for handling the upstream interaction in NetBSD! 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
Hi! Bug #1064909 that you reported in package libbsd has been fixed in the debian/pkgs/libbsd.git git repository. You can see the changelog below, and you can check the diff of the fix at: https://git.hadrons.org/cgit/debian/pkgs/libbsd.git/diff/?id=864f359 New libbsd upstream release 0.12.1 - Fix missing installation of err.h. Closes: #1064909 diff --git a/debian/changelog b/debian/changelog index 39f7b9e..0afdbbe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +libbsd (0.12.1-1) UNRELEASED; urgency=medium + + * New upstream release. + - Fix missing installation of err.h. Closes: #1064909 + + -- Guillem Jover <guillem@debian.org> Wed, 28 Feb 2024 05:13:52 +0100 + libbsd (0.12.0-1) unstable; urgency=medium * New upstream release.
We believe that the bug you reported is fixed in the latest version of
libbsd, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1064909@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Guillem Jover <guillem@debian.org> (supplier of updated libbsd package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 28 Feb 2024 05:49:40 +0100
Source: libbsd
Architecture: source
Version: 0.12.1-1
Distribution: unstable
Urgency: medium
Maintainer: Guillem Jover <guillem@debian.org>
Changed-By: Guillem Jover <guillem@debian.org>
Closes: 1064909
Changes:
libbsd (0.12.1-1) unstable; urgency=medium
.
* New upstream release.
- Fix missing installation of err.h. Closes: #1064909
* Install the headers under a multiarch-qualified directory,
as they now diverge per arch.
Checksums-Sha1:
0e23130c160f85f5efebdd5b23c4c1a031d0dee3 2347 libbsd_0.12.1-1.dsc
8efc896c1e2ff326ef18e2ac46247c795d4aa3a9 444048 libbsd_0.12.1.orig.tar.xz
1d3356df2fba93cc7317984d6ed44f66f6ddb1ab 833 libbsd_0.12.1.orig.tar.xz.asc
b59558e9ea4b407eccc2dca7fe14904037d2d3af 18552 libbsd_0.12.1-1.debian.tar.xz
dd30556a4ef763bfeb1240071881e71c84206fec 6945 libbsd_0.12.1-1_amd64.buildinfo
Checksums-Sha256:
0bd9f20ba3ff7cdc880c2fb6a430c93fe81463eaa097b8e246dedf6cfd7a5c2c 2347 libbsd_0.12.1-1.dsc
d7747f8ec1baa6ff5c096a9dd587c061233dec90da0f1aedd66d830f6db6996a 444048 libbsd_0.12.1.orig.tar.xz
04a4b66da93ea3c761e15fcedd705a969b67597d0619c3ebc5fe3cf72d477f1f 833 libbsd_0.12.1.orig.tar.xz.asc
ea28ecb15d4c38b84383845e8bd9add1aafa24c46c3dbf8f84b29a8d9cead722 18552 libbsd_0.12.1-1.debian.tar.xz
12717106dab26195b143200b3a90087dfd93468b8e73bbc37470bc6a8f7f6cae 6945 libbsd_0.12.1-1_amd64.buildinfo
Files:
8ce9a8ca0c68ed03e5710870cb219541 2347 libs optional libbsd_0.12.1-1.dsc
3dc2e28934aa2c3aa6bad0ed3d96a617 444048 libs optional libbsd_0.12.1.orig.tar.xz
5ae81c52ed98b49dff0ce4fecc690e49 833 libs optional libbsd_0.12.1.orig.tar.xz.asc
9f1c30b3476b22aa7a435f14f1692d68 18552 libs optional libbsd_0.12.1-1.debian.tar.xz
5d37c740113d881ebbc1981d83ad7663 6945 libs optional libbsd_0.12.1-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEETz509DYFDBD1aWV0uXK/PqSuV6MFAmXevskACgkQuXK/PqSu
V6MYSQ/9GWi1yQjwZ5Xv07u67xr7uJ24AHtCdhbGGLufYSjohCvJE3LH98XbOSLv
P/Qyg2ARTQ1XW3++KmgPpMKPXhxlA5W7VcS91wwfXmjUXpIVavZ4Dbei/ZP3uRF9
HZ9CWhBN5MrWHH1ZFld3be8B+4+CGqVejUx/Z1+rhp10EYDRLaulKXUvvpWR74Vf
sgy+avc7XqBeN7Op237WZLBeVs+pPvc+alnTxlXWNVxzYONSMWXJZ9aLp8Vv5gX1
nClp9WhOAESVdmjw14xGi6m8EN+NGWVlXQJhyzUjCjgrEQps6xoaKUyd+PHnlH/k
7cVh9ofBAlLyhxEiowa8BhSI7hUflZX4Y6io6RrhBkxVF1I3POgrrkE60MKDQRIN
c7YMPRHWNp7lXd/fM+WVYGfavRU+/D4lPwWI5KII0wbMTaMvsojzTU+gIKjTpTjU
jmT5xGAS3U5KGUEQ9ZkFIHFHM+apODp3Fb02FAYfv6sUlvwx7s+zOcF1CNZcBgA5
LKdHf7G037WvML3FgYjNtynzEPGI+WUZbIMFQVcf6Kqb/fPp0lCuUcK6dX9vc0Xr
vDF668s0UUbrUA3WmXgEZkw1EbyohnUnz9GWCIE7c5F18HpXIQ99nf850L0pJ993
nIhXQxDt64RzWRGtvcEeDH6NYLb4u4IWi0ert5dabLa6O9Wr+uI=
=zyHG
-----END PGP SIGNATURE-----