In file included from ext2fsP.h:12, from block.c:30: /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-20200328-141627 ------------------------------------------------------------------- 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.42.0 * The following VMs are available for generation-2: timestamp of HEAD at this tinderbox image: /var/db/repos/gentoo Sat Apr 4 06:37:48 UTC 2020 /var/db/repos/musl Sat Apr 4 03:02:24 UTC 2020 emerge -qpvO sys-fs/ext4magic [ebuild N ] sys-fs/ext4magic-0.3.2-r1 USE="expert-mode -debug -file-attr"
Created attachment 629790 [details] emerge-info.txt
Created attachment 629792 [details] emerge-history.txt
Created attachment 629794 [details] environment
Created attachment 629796 [details] etc.portage.tbz2
Created attachment 629798 [details] logs.tbz2
Created attachment 629800 [details] sys-fs:ext4magic-0.3.2-r1:20200404-075935.log
Created attachment 629802 [details] temp.tbz2
We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>' and whether musl provides a 'dev_t' type in 'sys/types.h'.
(In reply to Göktürk Yüksek from comment #8) > We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>' > and whether musl provides a 'dev_t' type in 'sys/types.h'. I believe your answer lies here: http://git.musl-libc.org/cgit/musl/tree/include/sys/types.h But I can't vouch for how header inheritance works! :D
This commit from zfs might also prove instructive: https://github.com/openzfs/zfs/commit/7559f343a5c3368bf8079f39f85cc360e7411b6a
(In reply to Michael 'veremitz' Everitt from comment #9) > (In reply to Göktürk Yüksek from comment #8) > > We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>' > > and whether musl provides a 'dev_t' type in 'sys/types.h'. > > I believe your answer lies here: > http://git.musl-libc.org/cgit/musl/tree/include/sys/types.h > > But I can't vouch for how header inheritance works! :D Yeah, I saw that. That's why I wanted to see what's in the tinderbox image. (In reply to Michael 'veremitz' Everitt from comment #10) > This commit from zfs might also prove instructive: > > https://github.com/openzfs/zfs/commit/ > 7559f343a5c3368bf8079f39f85cc360e7411b6a Saw that too. There are references to dev_t in arch specific dirs. I haven't checked where they inherit that from.
(In reply to Göktürk Yüksek from comment #8) > We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>' > and whether musl provides a 'dev_t' type in 'sys/types.h'. Too late - the affected data partition was reformatted 2 days ago in favour to hold the new upcoming images
(In reply to Toralf Förster from comment #12) > (In reply to Göktürk Yüksek from comment #8) > > We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>' > > and whether musl provides a 'dev_t' type in 'sys/types.h'. > > Too late - the affected data partition was reformatted 2 days ago in favour > to hold the new upcoming images The answer is yes to both
The solution to this is simple, append HAVE_SYS_TYPES_H to CFLAGS to have it include sys/tytpes.h
Created attachment 636572 [details] succesful build on musl review build log to verify sucess
#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif I was meaning to post the relevant part of ext2fs/ext2fs.h so you understand why the solution I provided will correct the problem.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6df45df54e7fd8e2c9151d333b5404dc88b9e96e commit 6df45df54e7fd8e2c9151d333b5404dc88b9e96e Author: Göktürk Yüksek <gokturk@gentoo.org> AuthorDate: 2024-01-08 03:22:27 +0000 Commit: Göktürk Yüksek <gokturk@gentoo.org> CommitDate: 2024-01-08 03:33:37 +0000 sys-fs/ext4magic: fix building with musl #716136 Also update EAPI 6 -> 8, and update LICENSES. Closes: https://bugs.gentoo.org/716136 Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org> sys-fs/ext4magic/ext4magic-0.3.2-r2.ebuild | 37 +++++ .../files/ext4magic-0.3.2-fix-sys-types-h.patch | 183 +++++++++++++++++++++ 2 files changed, 220 insertions(+)