x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -Wall -fPIC -I/usr/include/et -I/usr/include/ext2fs -I/usr/include/et -c -o quota.o quota.c In file included from quota.c:28: quota.h:4:10: fatal error: sys/cdefs.h: No such file or directory 4 | #include <sys/cdefs.h> | ^~~~~~~~~~~~~ compilation terminated. ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0_musl-20200316-165821 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-gentoo-linux-musl-9.3.0 * clang version 10.0.0 Target: x86_64-gentoo-linux-musl Thread model: posix InstalledDir: /usr/lib/llvm/10/bin /usr/lib/llvm/10 10.0.0 Available Python interpreters, in order of preference: [1] python3.8 [2] python3.7 [3] python3.6 [4] python2.7 (fallback) Available Ruby profiles: [1] ruby24 (with Rubygems) [2] ruby25 (with Rubygems) * Available Rust versions: [1] rust-1.41.1 * repository: ==> /var/db/repos/gentoo/metadata/timestamp.chk <== Wed, 18 Mar 2020 13:38:27 +0000 emerge -qpvO sys-fs/quota [ebuild N ] sys-fs/quota-4.05-r1 USE="nls tcpd -ldap -netlink -rpc"
Created attachment 622248 [details] emerge-info.txt
Created attachment 622250 [details] emerge-history.txt
Created attachment 622252 [details] environment
Created attachment 622254 [details] etc.portage.tbz2
Created attachment 622256 [details] logs.tbz2
Created attachment 622258 [details] sys-fs:quota-4.05-r1:20200319-003313.log
Created attachment 622260 [details] temp.tbz2
musl upstream has a FAQ entry specifically for this error: https://wiki.musl-libc.org/faq.html#Q:-When-compiling-something-against-musl,-I-get-error-messages-about-%3Ccode%3Esys/cdefs.h%3C/code%3E We will need to check/report upstream and patch affected code temporarily.
Created attachment 690975 [details, diff] Patch to fix this compilation error This workaround makes it compile, at least for quota 4.05; with 4.06 you hit another bug unfortunately (implicit declaration of function 'reallocarray') which I have no idea how to fix.
(In reply to 2xsaiko from comment #9) > Created attachment 690975 [details, diff] [details, diff] > Patch to fix this compilation error > > This workaround makes it compile, at least for quota 4.05; with 4.06 you hit > another bug unfortunately (implicit declaration of function 'reallocarray') > which I have no idea how to fix. refer to networkmanager in musl overlay for reallocarray fix.
(In reply to Jory A. Pratt from comment #10) > refer to networkmanager in musl overlay for reallocarray fix. Unfortunately the way the patch for networkmanager fixed it wasn't possible here, but I figured out what it was: reallocarray only exists since musl 1.2.2 which is ~amd64 only while I (mostly) have stable packages on this box. Updating musl makes it compile without issue. So quota 4.06 should have a dependency on >=sys-libs/musl-1.2.2 but since it's not compilable because of the cdefs.h error without a patch anyway, I don't know if it makes sense to do that right now.
tinderbox_musl has reproduced this issue with version 4.06 - Updating summary.
https://sourceforge.net/p/linuxquota/code/ci/1959f3768a284315250acd4d17a9f5ef0b8ea189/tree/quota.h?diff=43b6e31f39edbe7de4f4feeef4d0cf6be093e021
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4cae72bff7ab14e21f3f73f97308e0b035db769 commit f4cae72bff7ab14e21f3f73f97308e0b035db769 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-01-13 10:25:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-01-13 10:25:28 +0000 sys-fs/quota: fix build on musl Closes: https://bugs.gentoo.org/713390 Signed-off-by: Sam James <sam@gentoo.org> sys-fs/quota/files/quota-4.06-musl-cdefs.patch | 20 ++++++++++++++++++++ sys-fs/quota/quota-4.06.ebuild | 18 ++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-)