CONFIG_IA32_EMULATION check is throwing a false positive. Trying to upgrade glibc on infra systems. # zgrep CONFIG_IA32_EMULATION /proc/config.gz CONFIG_IA32_EMULATION=y Kernel is sys-kernel/gentoo-kernel-bin-6.1.38 Local copy of remote index is up-to-date and will be used. * IMPORTANT: 24 config files in '/etc/portage' need updating. * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS * sections of the emerge man page to learn how to update config files. [ebuild U ] sys-libs/glibc-2.38-r13 [2.37-r10] USE="cet multiarch (multilib) nscd perl (ssp) stack-realign (static-libs) -audit -caps -compile-locales (-crypt) (-custom-cflags) -doc -gd -hash-sysv-compat -headers-only -multilib-bootstrap -profile (-selinux) -suid -systemd -systemtap -test (-vanilla)" Would you like to merge these packages? [Yes/No] y >>> Verifying ebuild manifests >>> Running pre-merge checks for sys-libs/glibc-2.38-r13 * After upgrading glibc, please restart all running processes. * Be sure to include init (telinit u) or systemd (systemctl daemon-reexec). * Alternatively, reboot your system. * (See bug #660556, bug #741116, bug #823756, etc) >>> Emerging (1 of 1) sys-libs/glibc-2.38-r13::gentoo >>> Failed to emerge sys-libs/glibc-2.38-r13, Log file: >>> '/var/log/portage/build/sys-libs/glibc-2.38-r13:20240616-072007.log' >>> Jobs: 0 of 1 complete, 1 failed Load avg: 6.78, 6.76, 6.55 * Package: sys-libs/glibc-2.38-r13:2.2 * Repository: gentoo * Maintainer: toolchain@gentoo.org * USE: abi_x86_64 amd64 cet elibc_glibc kernel_linux multiarch multilib nscd perl ssp stack-realign static-libs * FEATURES: compressdebug network-sandbox preserve-libs sandbox splitdebug userpriv usersandbox * Checking whether python3_12 is suitable ... * dev-lang/python:3.12 ... [ ok ] * Using python3.12 to build (via PYTHON_COMPAT iteration) * strip-flags: CFLAGS: changed ' -O2 -pipe' to '-O2 -pipe' * strip-flags: CXXFLAGS: changed ' -O2 -pipe' to '-O2 -pipe' * Checking general environment sanity. x86_64-pc-linux-gnu-gcc -m64 -pipe -O2 -Wl,-O1 -Wl,--as-needed -pipe -O2 -Wl,-O1 -Wl,--as-needed glibc-test.c -o glibc-test * Checking that IA32 emulation is enabled in the running kernel ... /var/tmp/portage/sys-libs/glibc-2.38-r13/temp/environment: line 3339: /var/tmp/portage/sys-libs/glibc-2.38-r13/temp/check-ia32-emulation.elf32: No such file or directory [ !! ] * ERROR: sys-libs/glibc-2.38-r13::gentoo failed (unpack phase): * CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc. * * Call stack: * ebuild.sh, line 136: Called src_unpack * environment, line 3630: Called sanity_prechecks * environment, line 3347: Called die * The specific snippet of code: * [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."; *
# emerge --info Portage 3.0.61 (python 3.10.14-final-0, default/linux/amd64/17.0/hardened, gcc-11, glibc-2.37-r10, 6.1.38-gentoo-dist x86_64) ================================================================= System uname: Linux-6.1.38-gentoo-dist-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.37 KiB Mem: 65764012 total, 14513088 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sun, 16 Jun 2024 06:15:00 +0000 Head commit of repository gentoo: 455e1a67bad4ebc25f6c188001d86dfbc68ce0c4 sh bash 5.1_p16-r2 ld GNU ld (Gentoo 2.40 p7) 2.40.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r2::gentoo dev-build/autoconf: 2.69-r9::gentoo, 2.71-r7::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.28.5::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.4.0-r1::gentoo dev-lang/perl: 5.38.2-r3::gentoo dev-lang/python: 3.10.14_p1::gentoo, 3.11.9::gentoo, 3.12.3::gentoo dev-lang/rust-bin: 1.74.1::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.54::gentoo sys-apps/sandbox: 2.38::gentoo sys-devel/binutils: 2.40-r9::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 11.3.1_p20230120-r1::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r10::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: REDACTED priority: -1000 volatile: True sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: --ipv4 sync-rsync-verify-metamanifest: no sync-rsync-verify-max-age: 3 infra-overlay location: /usr/local/infra-overlay masters: gentoo priority: 0 volatile: True x-portage location: /usr/local/portage masters: gentoo priority: 1 volatile: True ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE @FREE @BINARY-REDISTRIBUTABLE vim.org as-is" CBUILD="x86_64-pc-linux-gnu" CFLAGS=" -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dev.d /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/scsi_id.config /etc/terminfo /etc/udev" CXXFLAGS=" -O2 -pipe" DISTDIR="/var/cache/portage/distfiles/" EMERGE_DEFAULT_OPTS="-q --color=n --newuse --selective=n --verbose-conflicts --autounmask=n --getbinpkg=y --usepkg=y --jobs 4 --load-average 4" 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 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live compress-index compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="https://mirror.bytemark.co.uk/gentoo/ https://distfiles.gentoo.org/" INSTALL_MASK=" /lib*/firmware/amdgpu/* /lib*/firmware/amlogic/bluetooth/* /lib*/firmware/amphion/* /lib*/firmware/ar3k/* /lib*/firmware/ath*k* /lib*/firmware/dpaa2/* /lib*/firmware/*dvb* /lib*/firmware/i2400m* /lib*/firmware/i6050* /lib*/firmware/i915/* /lib*/firmware/iwlwifi* /lib*/firmware/libertas/* /lib*/firmware/matrox/* /lib*/firmware/mediatek/* /lib*/firmware/mrvl/prestera/* /lib*/firmware/mwl8k/* /lib*/firmware/mwlwifi/* /lib*/firmware/netronome/* /lib*/firmware/nvidia/* /lib*/firmware/qcom/* /lib*/firmware/radeon/* /lib*/firmware/rtl_bt/* /lib*/firmware/rtlwifi/* /lib*/firmware/rtw88/* /lib*/firmware/rtw89/* /lib*/firmware/ueagle-atm/* /lib*/firmware/v4l-* " LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j 4 -l 6" PKGDIR="/var/cache/portage/packages/" PORTAGE_BINHOST="REDACTED/packages/profiles/default/linux/amd64/17.0/hardened/" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--ipv4" 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 amd64 bash-completion berkdb bzip2 cet cli crypt dri fortran gdbm hardened iconv ipv6 jpeg libtirpc libwww lvm maildir mmx multilib ncurses nptl nptlonly openmp pam pcre perl pic pie png ptpax readline seccomp sni split-usr ssl ssp suexec tcpd test-rust unicode urandom vhosts vim-syntax xattr xinetd xml xtpax zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_core authn_dbm authn_default authn_file authz_core 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 socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias access_compat asis auth_digest brotli cache_disk cache_socache log_forensic macro md proxy proxy_http ratelimit remoteip reqtimeout slotmem_shm substitute version watchdog" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0 php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10 python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy" XTABLES_ADDONS="account chaos checksum condition delude dhcpmac dnetmap echo fuzzy geoip gradm iface ipmark ipp2p ipset ipv4options length2 logmark lscan pknock proto psd quota2 rawnat steal sysrq tarpit tee" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
I don't see how it can possibly be a false-positive if it's trying and failing to execute a 32-bit binary? Why can't it execute it?
"No such file or directory" would seem to indicate that the test binary does not exist. I think it could also mean that ld.so is unable to find necessary library. I wonder if the existing glibc install is broken somehow.
calonectris /home/robbat2 # echo 'int main(){return 0;}' > "check-ia32-emulation.c" calonectris /home/robbat2 # gcc -m32 check-ia32-emulation.c -o check-ia32-emulation calonectris /home/robbat2 # file check-ia32-emulation check-ia32-emulation: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, not stripped calonectris /home/robbat2 # /lib32/ld-linux.so.2 ./check-ia32-emulation calonectris /home/robbat2 # echo $? 0 calonectris /home/robbat2 # ./check-ia32-emulation bash: ./check-ia32-emulation: No such file or directory calonectris /home/robbat2 # ldd ./check-ia32-emulation not a dynamic executable
(In reply to Robin Johnson from comment #4) Ah, so this is a 17.0 system, presumably with /lib as a symlink to /lib64. You should really migrate to 17.1 (SYMLINK_LIB=no). Does /lib/ld-linux-so.2 exist?
Assuming /lib/ld-linux.so.2 is indeed missing, you could recreate it and then repeat the test. ln -s ../lib32/ld-linux.so.2 /lib/ld-linux-so.2 The glibc ebuild should create such a symlink when LIBDIR_x86=lib32. As for how it would be missing on your systems, I could only guess. I assume reinstalling glibc with the symlink restored will result in working system. Perhaps you installed a binpkg generated with the wrong LIBDIR_x86 or SYMLINK_LIB values? It might be worth checking /var/db/pkg/sys-libs/glibc-2.37-r10/{CONTENTS,environment.bz2}.
The false positive here is claiming CONFIG_IA32_EMULATION is not set. It's clearly set. Many Gentoo infra systems have been continually upgraded for a very long time: and run older profiles/glibc because rebooting them with no hardware access has been overly risky.
(In reply to Robin Johnson from comment #7) > The false positive here is claiming CONFIG_IA32_EMULATION is not set. > It's clearly set. That is the most common reason that 32-bit binaries would fail. The message is designed to prevent bug reports from users who have misconfigured their system. Your issue is a broken glibc installation, which is a much less common mode of failure. We could use kernel-info.eclass to actually implement a kernel config check, but that's not really what we want to check for anyway. I have created a PR to make the message better express what is being tested while still suggesting CONFIG_IA32_EMULATION as the most probable cause of failure.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=051caa38b6eeb4e05e8a7dc4ba9e3b3d41ae3ba3 commit 051caa38b6eeb4e05e8a7dc4ba9e3b3d41ae3ba3 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2024-06-25 15:01:39 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2024-06-26 14:56:20 +0000 sys-libs/glibc: improve amd64 multilib message Closes: https://bugs.gentoo.org/934391 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-libs/glibc/glibc-2.19-r3.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.31-r7.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.32-r8.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.33-r14.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.34-r14.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.35-r11.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.36-r8.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.37-r10.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.38-r13.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.39-r6.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.39-r7.ebuild | 8 ++++++-- sys-libs/glibc/glibc-2.39-r9.ebuild | 8 ++++++-- sys-libs/glibc/glibc-9999.ebuild | 8 ++++++-- 13 files changed, 78 insertions(+), 26 deletions(-)