Created attachment 864314 [details] build.log Getting a build failure on e2fsprogs-1.47.0-r1 in my musl/mips2_o32 chroot target using gcc-13.1.1_p20230527. I've done a full emerge -e @world using gcc-13 and this is the only package that failed to build in this chroot. Thinking it's a gcc-13 thing, but I unfortunately don't have the gcc-12 compiler available to double-check against. > mips-unknown-linux-musl-gcc -I. -I../../lib -I/var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib -D_GNU_SOURCE -O2 -pipe -march=mips3 -mtune=mips3 -mplt -mfix-r4000 -mfix-r4400 -pthread -DHAVE_CONFIG_H -c /var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib/ext2fs/llseek.c -o llseek.o > > /var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib/ext2fs/llseek.c:70:22: error: expected declaration specifiers or '...' before '_llseek' > 70 | static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high, > | ^~~~~~~ > /var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib/ext2fs/llseek.c:70:43: error: unknown type name 'fd' > 70 | static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high, > | ^~ > /var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib/ext2fs/llseek.c:70:60: error: unknown type name 'offset_high' > 70 | static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high, > | ^~~~~~~~~~~ > /var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib/ext2fs/llseek.c:71:33: error: unknown type name 'offset_low'; did you mean 'offsetof'? > 71 | unsigned long, offset_low,ext2_loff_t *,result, > | ^~~~~~~~~~ > | offsetof > /var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib/ext2fs/llseek.c:71:58: error: unknown type name 'result' > 71 | unsigned long, offset_low,ext2_loff_t *,result, > | ^~~~~~ > /var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib/ext2fs/llseek.c:72:32: error: unknown type name 'origin' > 72 | unsigned int, origin); > | ^~~~~~ > /var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib/ext2fs/llseek.c:67:12: warning: '_llseek' used but never defined > 67 | static int _llseek (unsigned int, unsigned long, > | ^~~~~~~ > mips-unknown-linux-musl-gcc -I. -I../../lib -I/var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib -D_GNU_SOURCE -O2 -pipe -march=mips3 -mtune=mips3 -mplt -mfix-r4000 -mfix-r4400 -pthread -DHAVE_CONFIG_H -fPIC -shared -o elfshared/inline.o -c /var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0/lib/ext2fs/inline.c > make[2]: *** [Makefile:696: llseek.o] Error 1 > make[2]: *** Waiting for unfinished jobs.... > > > make[2]: Leaving directory '/var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0-abi_mips_o32.o32/lib/ext2fs' > make[1]: *** [Makefile:456: all-libs-recursive] Error 1 > make[1]: Leaving directory '/var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0-abi_mips_o32.o32' > make: *** [Makefile:371: all] Error 2 > * ERROR: sys-fs/e2fsprogs-1.47.0-r1::gentoo failed (compile phase): > * emake failed > * > * If you need support, post the output of `emerge --info '=sys-fs/e2fsprogs-1.47.0-r1::gentoo'`, > * the complete build log and the output of `emerge -pqv '=sys-fs/e2fsprogs-1.47.0-r1::gentoo'`. > * The complete build log is located at '/var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/temp/build.log'. > * The ebuild environment file is located at '/var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/temp/environment'. > * Working directory: '/var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0-abi_mips_o32.o32' > * S: '/var/tmp/portage/sys-fs/e2fsprogs-1.47.0-r1/work/e2fsprogs-1.47.0'
> # emerge --info > Portage 3.0.48.1 (python 3.11.4-final-0, default/linux/mips/17.0/o32/musl, gcc-13, musl-1.2.4, 6.1.34-gentoo mips) > ================================================================= > System uname: Linux-6.1.34-gentoo-mips-with-libc > KiB Mem: 65787096 total, 53832148 free > KiB Swap: 0 total, 0 free > Timestamp of repository gentoo: Thu, 15 Jun 2023 15:15:01 +0000 > Head commit of repository gentoo: 95abdabd5c76f6795a0839dea550a6bf30fda384 > sh bash 5.2_p15-r3 > ld GNU ld (Gentoo 2.40 p5) 2.40.0 > app-misc/pax-utils: 1.3.7::gentoo > app-shells/bash: 5.2_p15-r3::gentoo > dev-lang/perl: 5.36.1-r2::gentoo > dev-lang/python: 3.11.4::gentoo > dev-util/meson: 1.1.1::gentoo > sys-apps/baselayout: 2.13-r1::gentoo > sys-apps/openrc: 0.47.1::gentoo > sys-apps/sandbox: 2.31::gentoo > sys-devel/autoconf: 2.71-r6::gentoo > sys-devel/automake: 1.16.5-r1::gentoo > sys-devel/binutils: 2.40-r5::gentoo > sys-devel/binutils-config: 5.5::gentoo > sys-devel/gcc: 13.1.1_p20230527::gentoo > sys-devel/gcc-config: 2.11::gentoo > sys-devel/libtool: 2.4.7-r1::gentoo > sys-devel/make: 4.4.1-r1::gentoo > sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) > sys-libs/musl: 1.2.4::gentoo > Repositories: > > gentoo > location: /usr/portage > sync-type: rsync > sync-uri: rsync://rsync.gentoo.org/gentoo-portage > priority: -1000 > volatile: True > sync-rsync-extra-opts: > sync-rsync-verify-jobs: 1 > sync-rsync-verify-metamanifest: no > sync-rsync-verify-max-age: 24 > > ACCEPT_KEYWORDS="mips ~mips" > ACCEPT_LICENSE="@FREE" > ASFLAGS="-Wa,-march=mips3 -Wa,-mtune=mips3" > CBUILD="mips-unknown-linux-musl" > CFLAGS="-O2 -pipe -march=mips3 -mtune=mips3 -mplt -mfix-r4000 -mfix-r4400" > CHOST="mips-unknown-linux-musl" > CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" > CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" > CXXFLAGS="-O2 -pipe -march=mips3 -mtune=mips3 -mplt -mfix-r4000 -mfix-r4400" > DISTDIR="/usr/portage/distfiles" > ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" > FCFLAGS="-O2 -march=mips3 -mabi=32 -mplt -mfix-r4000 -mfix-r4400 -pipe" > FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox usersync xattr" > FFLAGS="-O2 -march=mips3 -mabi=32 -mplt -mfix-r4000 -mfix-r4400 -pipe" > GENTOO_MIRRORS="http://distfiles.gentoo.org" > INSTALL_MASK="charset.alias /usr/share/locale/locale.alias" > LANG="C.UTF8" > LDFLAGS="-Wl,-O1 -Wl,--as-needed" > LEX="flex" > MAKEOPTS="-j14" > PKGDIR="/usr/portage/packages" > PORTAGE_CONFIGROOT="/" > PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" > PORTAGE_TMPDIR="/var/tmp" > SHELL="/bin/bash" > USE="acl big-endian bzip2 cli crypt iconv ipv6 mips ncurses nls nptl pam pcre readline seccomp split-usr ssl unicode xattr zlib" ABI_MIPS="o32" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby30 ruby31" VIDEO_CARDS="fbdev impact dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" > Unset: ADDR2LINE, AR, ARFLAGS, AS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS > # emerge -pqv '=sys-fs/e2fsprogs-1.47.0-r1::gentoo' > [ebuild R ] sys-fs/e2fsprogs-1.47.0-r1 USE="(split-usr) tools -cron (-fuse) (-nls) -static-libs -test"
This may be musl-1.2.4.
(In reply to Sam James from comment #2) > This may be musl-1.2.4. Possible....let me copy a backup of that chroot from my ZFS snapshots folder and test this. That snapshot still has gcc-12 in it w/ musl-1.2.3, so should verify if this is the case or not.
(In reply to Joshua Kinard from comment #3) > (In reply to Sam James from comment #2) > > This may be musl-1.2.4. > > Possible....let me copy a backup of that chroot from my ZFS snapshots folder > and test this. That snapshot still has gcc-12 in it w/ musl-1.2.3, so > should verify if this is the case or not. Correct, it compiles fine w/ gcc-12 against musk-1.2.3, but fails with gcc-12 against musl-1.2.4, so it is not a gcc-porting issue. I've updated the bug title to match.
Affects musl stages
CC'ing Theodore Ts'o as upstream
The workaround from the musl 1.2.4 release notes, adding -D_LARGEFILE64_SOURCE to CFLAGS, does *not* help. No visible change in errors. https://musl.libc.org/releases.html
Hilariously, our ebuild passes --disable-largefile (!). Removing that or replacing it with --enable-largefile, with or without -D_LARGEFILE64_SOURCE, did not help however.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd8facfff575a005ef0177d2475948d0f08eaf81 commit cd8facfff575a005ef0177d2475948d0f08eaf81 Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2023-06-25 22:50:48 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2023-06-25 22:52:47 +0000 sys-fs/e2fsprogs: Fix build with musl-1.2.4 (on mips o32) * -D_GNU_SOURCE is not needed anymore (the line is from 2012) * Append -D_FILE_OFFSET_BITS=64 to flags only on musl * Keep --disable-largefile only on glibc ... Bug: https://bugs.gentoo.org/908892 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> sys-fs/e2fsprogs/e2fsprogs-1.47.0-r1.ebuild | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
> The bug has been referenced in the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=cd8facfff575a005ef0177d2475948d0f08eaf81 [snip] > + # need to check effect on ABI (???) > + use elibc_glibc && myeconfargs+=( --disable-largefile ) > + Speculation: the bit about ABI //might// be a MIPS reference, as we're the arch that has the oddball ABI mix, mainly because of N32's hybrid nature. I suppose x32 might also be applicable here, as it tries to do for x86_64 what N32 does for MIPS.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=999463a3a69fb9e6877c08dea7ffb05554c3de55 commit 999463a3a69fb9e6877c08dea7ffb05554c3de55 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-06-26 18:17:29 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-06-26 18:17:29 +0000 sys-fs/e2fsprogs: enable largefile unconditionally Bug: https://bugs.gentoo.org/908892 Signed-off-by: Mike Gilbert <floppym@gentoo.org> .../{e2fsprogs-1.47.0-r1.ebuild => e2fsprogs-1.47.0-r2.ebuild} | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Looks to be fixed w/ e2fsprogs-1.47.0-r2 in my musl mips_o32 chroot.
(In reply to Joshua Kinard from comment #12) > Looks to be fixed w/ e2fsprogs-1.47.0-r2 in my musl mips_o32 chroot. Could you share that chroot with me? I would like to investigate why passing -D_FILE_OFFSET_BITS=64 is necessary when that should be automatically set by the --enable-largefile option.
(In reply to Mike Gilbert from comment #13) > (In reply to Joshua Kinard from comment #12) > > Looks to be fixed w/ e2fsprogs-1.47.0-r2 in my musl mips_o32 chroot. > > Could you share that chroot with me? > > I would like to investigate why passing -D_FILE_OFFSET_BITS=64 is necessary > when that should be automatically set by the --enable-largefile option. Sure, I copied a tar.xz of it to my devspace under tmp/musl-o32_mips3.tar.xz. I *think* you should be able to copy it right out. May need to replace the /usr/sbin/qemu-* binaries with those from your system, as mine are built w/ Ryzen zen2 optimizations, but the MIPS bits in the chroot are using fairly standard flags for that architecture. I typically mount portage at the classic /usr/portage spot, the musl overlay at /opt/musl-overlay, and sometimes a local portage tree at /opt/portage-local, FWIW. Oh, and adjust MAKEOPTS in etc/portage/make.conf accordingly. In my setup, I am passing -j14.
(In reply to Joshua Kinard from comment #14) Thanks, I have retrieved the file.
I see the issue now. Working on a patch.
*** Bug 896340 has been marked as a duplicate of this bug. ***
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6788373d9c16f58622351c2ee91e9f4f3d07a7cb commit 6788373d9c16f58622351c2ee91e9f4f3d07a7cb Author: Sam James <sam@gentoo.org> AuthorDate: 2024-06-07 16:20:57 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-06-07 16:26:47 +0000 sys-fs/e2fsprogs: add 1.47.1 Adds libarchive support, see 7e3a4f0a33e9859af2bf44e8e1e278c8b10313cc upstream. Closes: https://bugs.gentoo.org/908892 Closes: https://bugs.gentoo.org/916029 Bug: https://bugs.gentoo.org/896340 Signed-off-by: Sam James <sam@gentoo.org> sys-fs/e2fsprogs/Manifest | 1 + sys-fs/e2fsprogs/e2fsprogs-1.47.1.ebuild | 167 +++++++++++++++++++++++++++++++ sys-fs/e2fsprogs/metadata.xml | 1 + 3 files changed, 169 insertions(+)