x86_64-gentoo-linux-musl-gcc -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -Wl,-O1 -Wl,--as-needed -o zerofree zerofree.c -lext2fs In file included from zerofree.c:20: /usr/include/ext2fs/ext2fs.h:1360:39: error: unknown type name dev_t; did you mean div_t? 1360 | extern char *ext2fs_find_block_device(dev_t device); | ^~~~~ | div_t ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.0_musl-20200311-204810 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-gentoo-linux-musl-9.2.0 * [2] 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 * The following VMs are available for generation-2: repository: ==> /var/db/repos/gentoo/metadata/timestamp.chk <== Sat, 14 Mar 2020 20:38:58 +0000 emerge -qpvO sys-fs/zerofree [ebuild N ] sys-fs/zerofree-1.1.1
Created attachment 619228 [details] emerge-info.txt
Created attachment 619230 [details] emerge-history.txt
Created attachment 619232 [details] environment
Created attachment 619234 [details] etc.portage.tbz2
Created attachment 619236 [details] sys-fs:zerofree-1.1.1:20200314-215947.log
Created attachment 619238 [details] temp.tbz2
The first attempt to tinderbox a musl image failed at all. I'll mass close therefore all filed bug reports of the last days related to this tinderbox image. Please feel free to re-open if you think that the bug is real in musl and not fixed by the musl overlay.
Actually, this might actually be a thing. <sys/types.h> needs to be included in the right place: See here: https://github.com/openzfs/zfs/issues/2607 And this looks like a code snippet that might fix: https://github.com/openzfs/zfs/commit/7559f343a5c3368bf8079f39f85cc360e7411b6a Won't have time to test for a good while, though. IF you can check it on your tinderbox, let me know.
Created attachment 620732 [details, diff] include sys/types.h Here is the proper patch, you do not need to ifndef the header, it should have been included for proper posix compliance.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d92a6f0bddaa8cb87fbad32caa69b9089905f55 commit 9d92a6f0bddaa8cb87fbad32caa69b9089905f55 Author: Joshua Kinard <kumba@gentoo.org> AuthorDate: 2020-11-11 21:59:25 +0000 Commit: Joshua Kinard <kumba@gentoo.org> CommitDate: 2020-11-11 22:00:46 +0000 sys-fs/zerofree: Fix musl compile error Added a patch to fix a compile error in musl environments and remove the older 1.0.4 ebuild. Closes: https://bugs.gentoo.org/712582 Signed-off-by: Joshua Kinard <kumba@gentoo.org> Package-Manager: Portage-3.0.9, Repoman-3.0.2 sys-fs/zerofree/Manifest | 1 - .../files/zerofree-include-sys_types.patch | 10 +++++++ sys-fs/zerofree/zerofree-1.0.4.ebuild | 35 ---------------------- sys-fs/zerofree/zerofree-1.1.1.ebuild | 5 ++++ 4 files changed, 15 insertions(+), 36 deletions(-)