Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 786570 - sys-libs/glibc-2.33: checks for build-depends when installing via binpkg
Summary: sys-libs/glibc-2.33: checks for build-depends when installing via binpkg
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 784794 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-04-28 23:28 UTC by Logan Perkins
Modified: 2021-08-14 20:16 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,1.37 KB, text/x-log)
2021-04-28 23:49 UTC, Logan Perkins
Details
shell log from first boot to successful glibc emerge (shell.log,142.75 KB, text/x-log)
2021-04-29 00:05 UTC, Logan Perkins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Logan Perkins 2021-04-28 23:28:20 UTC
If a glibc binpkg is built with a specific compiler set (i.e. via `CC=gcc-10.3.0` in make.conf or package.env), it checks for the existence of that exact same compiler as a pre-merge check before installing the binpkg.  This fails if the destination machine has an older copy of gcc installed.  Nor can the new compiler be successfully installed and used, as it requires the newer version of glibc.

It is possible to work around this issue by either manually copying the updated glibc over, and then installing the new gcc, or symlinking gcc to the new name (ln -s `which gcc` /usr/bin/gcc-10.2.0), upgrading glibc, and then removing the symbolic link.  

Reproducible: Always

Steps to Reproduce:
1. Start with a fresh Stage 3
2. Upgrade GCC to a new slot
3. Upgrade glibc, manually specify to use the new slot, creating a binpkg
4. Rebuild gcc, creating a binpkg
5. Start with a fresh Stage 3
6. Use the binpkgs from steps 3 and 4 to try to install the new gcc and new glibc
Actual Results:  
glibc's binpkg fails to emerge during the pre-merge checks

Expected Results:  
glibc successfully installs, even without *any* gcc installed on the system.

Portage 3.0.14 (python 3.8.7-final-0, default/linux/arm64/17.0/desktop, gcc-10.2.0, glibc-2.33, 5.10.11-v8-pi4 aarch64)
=================================================================
System uname: Linux-5.10.11-v8-pi4-aarch64-with-glibc2.17
KiB Mem:     7999504 total,   6108028 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 28 Apr 2021 22:05:25 +0000
Head commit of repository gentoo: f53be46d0668de0591cc95fabf4c50916741a1e3

Head commit of repository genpi-tools: 87136c156320c6e0b359f465d55ab7b6b584b995

Head commit of repository genpi64: fbab18fd7f0ad916b5c9901aa73e3fbdec1322b2

sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
distcc 3.3.3 aarch64-unknown-linux-gnu [disabled]
app-shells/bash:          5.1_p4::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-lang/rust-bin:        1.50.0::gentoo
dev-util/cmake:           3.19.4::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.42.1-r3::genpi64
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.2.0-r5::gentoo
sys-devel/gcc-config:     2.3.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000
    sync-git-verify-commit-signature: true

genpi-tools
    location: /var/db/repos/sakaki-tools
    sync-type: git
    sync-uri: https://github.com/GenPi64/sakaki-tools.git
    masters: gentoo
    priority: 50

genpi64
    location: /var/db/repos/genpi64
    sync-type: git
    sync-uri: https://github.com/GenPi64/genpi64-overlay.git
    masters: gentoo
    priority: 100
    sync-git-clone-extra-opts: --single-branch --branch master

Binary Repositories:

genpi64-binhost
    priority: 9999
    sync-uri: https://packages.genpi64.com

genpi64-european-binhost
    priority: 9998
    sync-uri: https://fi.packages.genpi64.com

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="@FREE CC-Sampling-Plus-1.0 Broadcom linux-fw-redistributable no-source-code bluez-firmware rpi-eeprom raspberrypi-videocore-bin"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-mtune=cortex-a72 -march=armv8-a+crc -O2 -pipe"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /boot/startup.sh /etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-mtune=cortex-a72 -march=armv8-a+crc -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--buildpkg --usepkgonly"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-mtune=cortex-a72 -march=armv8-a+crc -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles getbinpkg ipc-sandbox merge-sync multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersync xattr"
FFLAGS="-mtune=cortex-a72 -march=armv8-a+crc -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j16 -l16"
PKGDIR="/var/cache/binpkgs"
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"
USE="X a52 aac acl acpi alsa arm64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvdr elogind emboss encode exif flac fortran gdbm gif gpm gtk3 gui iconv icu ipv6 jpeg lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt5 readline sdl seccomp spell split-usr ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ADA_TARGET="gnat_2018" 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" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" 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="evdev" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="WebAssembly" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8 python3_9" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 x86_64" QEMU_USER_TARGETS="aarch64" RUBY_TARGETS="ruby26" USERLAND="GNU" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-28 23:29:24 UTC
Could you please share the build.log please?
Comment 2 Logan Perkins 2021-04-28 23:49:51 UTC
Created attachment 703485 [details]
build.log
Comment 3 Logan Perkins 2021-04-29 00:05:28 UTC
Created attachment 703488 [details]
shell log from first boot to successful glibc emerge

If it's of any help, here is the complete shell log which generated that build.log, and then applying the workaround.
Comment 4 Larry the Git Cow gentoo-dev 2021-08-06 21:26:16 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7b0114164283c266d7a246b824dfe906881b93c

commit e7b0114164283c266d7a246b824dfe906881b93c
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2021-08-06 21:25:52 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2021-08-06 21:26:06 +0000

    sys-libs/glibc: Run compiler tests only when compiling
    
    Bug: https://bugs.gentoo.org/786570
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 sys-libs/glibc/glibc-2.34.ebuild | 2 +-
 sys-libs/glibc/glibc-9999.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2021-08-06 21:53:59 UTC
*** Bug 784794 has been marked as a duplicate of this bug. ***
Comment 6 Larry the Git Cow gentoo-dev 2021-08-14 20:16:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b0d55ca980cf4a2abf574832060bb8b517b6203

commit 5b0d55ca980cf4a2abf574832060bb8b517b6203
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2021-08-14 20:16:34 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2021-08-14 20:16:44 +0000

    sys-libs/glibc: Run compiler tests only when compiling
    
    Closes: https://bugs.gentoo.org/786570
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>

 sys-libs/glibc/glibc-2.33-r6.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)