sys-apps:util-linux-2.17 fails to compile in 32-bit chroot from a 64-bit system Reproducible: Always Steps to Reproduce: 1. linux32 chroot /pathToChroot 2. env-update 3. source /etc/profile 4. USE="-*" emerge -1 util-linux
Created attachment 215837 [details] emerge --info + ebuild log + ebuild envinronment
please don't attach logs compressed (and especially not compressed with something most text editors can't handle transparently).
Created attachment 215900 [details] emerge-info sorry. for the last time, may bzip2 archive be good? I think it's better to attach an archive, instead of a lot of single files.
Created attachment 215902 [details] util-linux-2.17:20100109-173946.log
Created attachment 215904 [details] portage/sys-apps/util-linux-2.17/temp/environment
Build fails for me on 32-bit system. Will attach logs next. Note I tried building with both j1 and j2. Note the error references "undefined reference to fallocate64". Portage 2.2_rc61 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.27.43 i686) ================================================================= System Settings ================================================================= System uname: Linux-2.6.27.43-i686-Intel-R-_Pentium-R-_4_CPU_2.26GHz-with-gentoo-2.0.1 Timestamp of tree: Sun, 10 Jan 2010 17:15:02 +0000 app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.10 dev-lang/python: 2.6.4 dev-python/pycrypto: 2.1.0 dev-util/cmake: 2.8.0 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.0 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.65 sys-devel/automake: 1.7.9-r1, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="*" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=pentium4 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests collision-protect distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en en_US" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_COMPRESS="" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage" USE="7zip X a52 aac aalib acct acpi aff alsa amr amrnb amrwb ao audiofile avi bash-completion bitmap-fonts bzip2 cairo cdda cddb cdio cdr chroot clamav cleartype cli consolekit corefonts cracklib crypt cscope css cups curl custom-optimization cxx dbus designer-plugin desktopglobe dirac divx djvu dmi dts dv dvb dvd dvdr dvdread emf emovix encode ewf exif expat extraengine festival ffmpeg flac fltk fontconfig fontforge foomatic foomaticdb gdbm geoip geolocation gif glitz gmedia gmm gmp gpm graphviz gs gstreamer hal hpn hunspell iconv icu idn imagemagick innodb jpeg jpeg2k kde kipi krb4 ladspa latin1 lm_sensors logitech-mouse logrotate logwatch lua lzo mad matroska mbox mbrola milter mime mjpeg mmap mmx mng modplug modules mozilla mp3 mp3tunes mp4 mpeg mpi mplayer mtp musepack musicbrainz nas ncurses njb nls npp nptl nptlonly nsplugin nvidia ogg openal openexr opengl optimized-qmake pam pch pcre pdf perl phonon plasma plotutils png podcast pop portaudio ppds pppd psf python qt3support qt4 quicktime rdesktop readline redeyes reflection rtc scanner schroedinger sdl sendmail session smime sndfile spamassassin speex spell spl srt sse sse2 ssl svg symlink sysfs tcpd theora threads thumbnail tiff tordns transparency truetype type1 udev unicode usb userlocales utempter v4l v4l2 vcd vidix vim-pager visualization vorbis wavpack wcwidth win32codecs wma wmp x264 x86 xanim xcb xcomposite xft xine xinerama xinetd xiph xml xmlpatterns xorg xpm xscreensaver xterm-color xulrunner xv xvid xvmc zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" RUBY_TARGETS="ruby18" SANE_BACKENDS="hp hp4200" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 216015 [details] build.log
Here is the output of: emerge -pqv =sys-apps/util-linux-2.17 [ebuild U ] sys-apps/util-linux-2.17 [2.16.2] USE="crypt nls perl unicode loop-aes -old-linux (-selinux) -slang (-uclibc)"
Created attachment 216017 [details] ebuild environment file
It appears that util-linux-2.17 on 32-bit requires glibc-2.11 ( my previous builds failed with "undefined reference to fallocate64" ). Note the discussions of this bug (specifically comments 6,7, and 10): https://bugzilla.redhat.com/show_bug.cgi?id=500487 After I upgraded to sys-libs/glibc-2.11-r1 util-linux-2.17 built successfully.
Same here on x86 and amd64 with glibc-2.10.
Created attachment 216068 [details] build.log Portage 2.2_rc61 (default/linux/x86/10.0, gcc-4.4.2-asneeded, glibc-2.10.1-r1, 2.6.31-gentoo-r6-kms-v2 i686) ================================================================= System Settings ================================================================= System uname: Linux-2.6.31-gentoo-r6-kms-v2-i686-Intel-R-_Pentium-R-_D_CPU_2.80GHz-with-gentoo-2.0.1 Timestamp of tree: Mon, 11 Jan 2010 07:15:01 +0000 distcc 3.1 i686-pc-linux-gnu [disabled] ccache version 2.4 [enabled] app-shells/bash: 4.0_p35 dev-java/java-config: 2.1.9-r2 dev-lang/python: 2.6.4 dev-python/pycrypto: 2.1.0_beta1 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.8.0 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.0 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.6.3, 1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11.1 sys-devel/binutils: 2.20 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="*" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -pipe -march=prescott -fomit-frame-pointer -mmmx -msse2 -mcx16 -frecord-gcc-switches -floop-interchange -floop-strip-mine -floop-block" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/hddtemp/hddtemp.db /usr/share/nano/ /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=prescott -fomit-frame-pointer -mmmx -msse2 -mcx16 -frecord-gcc-switches -floop-interchange -floop-strip-mine -floop-block" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="-t --jobs=3 --load-average=3 --keep-going" FEATURES="assume-digests buildsyspkg ccache collision-protect distlocks fixpackages jabber news noinfo parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-debug strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe -march=prescott -fomit-frame-pointer -mmmx -msse2 -mcx16 -frecord-gcc-switches -floop-interchange -floop-strip-mine -floop-block" GENTOO_MIRRORS="http://gentoo.j-schmitz.net/mirror/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo/" LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1,--hash-style=gnu,--sort-common,--as-needed" LINGUAS="en" MAKEOPTS="-j5 -l3" PKGDIR="/usr/portage/packages" PORTAGE_COMPRESS="lzma" PORTAGE_COMPRESS_FLAGS="-z -9 -f -S .lzma -v" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/data/layman/java-overlay /data/layman/vmware /data/layman/sping /data/layman/science /data/local/sunrise/sunrise /data/local/sunrise/reviewed /data/local/allenjb /data/local/dummy /data/local/private-overlay" SYNC="rsync://rsync.j-schmitz.net/gentoo-portage" USE="32bit 7zip X acpi additions alsa bash-completion berkdb branding bzip2 c++ cairo cblas ccache cleartype cli command-args corefonts cracklib cups cupsddk custom-optimization cxx dri dts fbcondecor fortran gdbm gif glibc-omitfp gmp gnome gnome-keyring gpm graphics gtk hal hddtemp iconv icu java javascript jpeg kqemu lapack lcms libnotify libsexy lm_sensors mailtrain md5sum mmx modules mp3 mudflap multiuser nagios-dns nagios-ntp nagios-ping nagios-ssh nano-syntax ncurses network-cron nis nls nptl nptlonly nsplugin objc objc++ opengl openmp openntpd pam pcre pdf perl png pppd pymol python qt-static qt3support readline reflection rrdcgi rrdtool science sensord session smp spl sqlite sqlite3 sse sse2 ssl sysfs tcpd threads tiff truetype type1 unicode x264 x86 xcb xcomposite xorg xulrunner zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= sys-apps/util-linux-2.16.2 was built with the following: USE="crypt nls perl unicode -loop-aes -old-linux (-selinux) -slang (-uclibc)"
(In reply to comment #11) > Same here on x86 and amd64 with glibc-2.10. > In my amd64 system, with glibc-2.10.1-r1, util-linux-2.17 compiles fine.
someone post the config.log from their build dir please
Created attachment 216089 [details] config.log
it's due to a broken glibc-2.10 on 32bit systems ... you should be able to work around it in the meantime by doing: ac_cv_func_fallocate=no emerge util-linux
(In reply to comment #16) > it's due to a broken glibc-2.10 on 32bit systems ... you should be able to work > around it in the meantime by doing: > ac_cv_func_fallocate=no emerge util-linux > works here.
> works here. here too
What about mask glibc-2.10 for (~)x86 ? I hit this issue too and I think it's pretty annoying, when stage3 is build with glibc-2.10 and there can't be no dependency on new/old version of glibc.
*** Bug 303181 has been marked as a duplicate of this bug. ***
Got hit this morning by this on both a bunch of ppc32 and x86 boxes running stable, specifically: sys-libs/glibc-2.10.1-r1 & sys-apps:util-linux-2.17-r1. Bummer.
*** Bug 304855 has been marked as a duplicate of this bug. ***
Also hit this today on x86. I remasked util-linux as a I don't want to unmask glibc 2.11.
I bet there's something I have missed but glibc-2.11 shouldn't bring regression over 2.10.1, on the contrary it seems to be solving many of them. Why not add elibc_glibc? ( || ( <sys-libs/glibc-2.10 >=sys-libs/glibc-2.11 ) ) to util-linux deps, and request glibc-2.11 stabilization?
I can confirm this issue on 3 32Bit machines. If I unmask >glibc-2.10 it runs fine.
Can someone define an action on this?
Created attachment 223783 [details, diff] Glibc 2.10 fadvise64 patch
Created attachment 223785 [details, diff] Glibc 2.10 fadvise64 ebuild patch
(In reply to comment #0) > sys-apps:util-linux-2.17 fails to compile in 32-bit chroot from a 64-bit system > > Reproducible: Always > > Steps to Reproduce: > 1. linux32 chroot /pathToChroot > 2. env-update > 3. source /etc/profile > 4. USE="-*" emerge -1 util-linux > To fix this bug place glibc-2.10-export-fadvise64.patch in /usr/portage/sys-libs/glibc/files/2.10/, then in /usr/portage/sys-libs/glibc/ patch glibc ebuild with glibc-2.10.1-r1.ebuild.patch (example: "patch -p0 <glibc-2.10.1-r1.ebuild.patch" w/o quotes), then run "ebuild glibc-2.10.1-r1.ebuild digest", then "emerge -1v =sys-libs/glibc-2.10.1-r1" and it should be fixed. I was able to emerge until-linux without problems then. Please somebody with RW access to Portage tree commit this fix. Best regards, Maciej Szmigiero
no. you're breaking the ABI; no chance that is going into the tree.
(In reply to comment #30) > no. you're breaking the ABI; no chance that is going into the tree. > OK, so what's going to be done to let people emerge util-linux? Maybe patch util-linux ebuild to disable building of fadvise on glibc 2.10? Because the current state (emerging simply fails) is clearly hmm... suboptimal.
Current state is that stable util-linux builds with stable Glibc, the same goes for both from testing. If you mix testing with stable you should know what you are doing.
Created attachment 223895 [details, diff] util-linux-2.17.1 ebuild patch for glibc-2.10*
(In reply to comment #33) > Created an attachment (id=223895) [details] > util-linux-2.17.1 ebuild patch for glibc-2.10* > /(In reply to comment #32) > Current state is that stable util-linux builds with stable Glibc, the same goes > for both from testing. If you mix testing with stable you should know what you > are doing. > If it can be fixed with simple patch without breaking the ABI, why not just fix it? I attached patch for util-linux-2.17.1 ebuild which checks for Glibc-2.10* and applies Vapier's workaround from comment #16.
if it was simple, i probably would have already fixed it. your new patch is incorrect because it breaks on non-x86 systems.
Created attachment 223967 [details, diff] util-linux-2.17.1 ebuild patch for glibc-2.10* for ix86 I cannot see how previous patch could break on non-x86 machines, but here is a version which disables fallocate() only on x86. However, judging from http://repo.or.cz/w/glibc.git/commitdiff/1f3615a1c97a030bca59f728f998947f852679b9?hp=9e471dad8e173806cbbfb704875d5ae40e36fa34 it looks like that sparc, sh, powerpc32 and s390-32 have the same problem so add them also if you concur.
Comment on attachment 223967 [details, diff] util-linux-2.17.1 ebuild patch for glibc-2.10* for ix86 your broken arch list is still not "all arches", so it's still inherently flawed. i'll commit something later that works for everyone without hardcoding random arches.
probably fixed now in cvs http://sources.gentoo.org/sys-apps/util-linux/util-linux-2.17.1.ebuild?r1=1.2&r2=1.3
It's good to have this bug finally is fixed, however your inflammatory comments weren't needed (for example you haven't said anything technical about my two last patches only saying they were "broken").
i'm sorry if you think "correct" is the same thing as "inflammatory". i already said exactly why each was wrong.
You comments were: a) That patch from attachment 223895 [details, diff] "breaks on non-x86 systems" - it only caused fallocate to be called by using syscall(SYS_fallocate, ...) instead of fallocate(...), and only if configure script has found out that syscall interface was working. So how exactly this could break on non-x86 systems? b) For the last patch (no. 223967) you called it "broken arch list" and "random arches", while in reality it did the previous patch but only on x86 (see your comments for that patch about it breaking on non-x86) and I have pointed you a glibc commit which fixed fallocate() function to show that it might be needed also on sparc, sh, powerpc32 and s390-32. How's that "random arches" or "broken arch list"?
the syscall() fallback probably will work for most people, but there is still the possibility of old linux headers + new glibc where fallocate() exists but the syscall number does not. while you posted a list of arches where glibc was broken, none of your patches took that into consideration.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37f510da22bbe73cd606c7df841cbae8d2611132 commit 37f510da22bbe73cd606c7df841cbae8d2611132 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2023-02-11 22:04:40 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2023-02-11 22:13:15 +0000 sys-apps/util-linux: remove obsolete fallocate test Bug: https://bugs.gentoo.org/300307 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-apps/util-linux/util-linux-2.38.1-r2.ebuild | 22 +++++----------------- sys-apps/util-linux/util-linux-9999.ebuild | 22 +++++----------------- 2 files changed, 10 insertions(+), 34 deletions(-)