Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911889 - [RAP] Stage3 sys-devel/glibc undefined reference from libstdc++.so
Summary: [RAP] Stage3 sys-devel/glibc undefined reference from libstdc++.so
Status: CONFIRMED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-07 21:00 UTC by ahmedsoliman
Modified: 2023-11-26 13:45 UTC (History)
2 users (show)

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


Attachments
gunzipped stage2 logs + stage3 logs (stage2_3.log.gz,980.70 KB, application/gzip)
2023-08-07 21:00 UTC, ahmedsoliman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ahmedsoliman 2023-08-07 21:00:00 UTC
Created attachment 867364 [details]
gunzipped stage2 logs + stage3 logs

How to reproduce ?


I just run

```
./bootstrap-prefix.sh
```

The bug is during emerging sys-libs/glibc-2.37-r3.

The ld error says:


/home/oddcoder/gentoo/tmp/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: /home/oddcoder/gentoo/tmp/usr/lib/gcc/x86_64-pc-linux-gnu/12/libstdc++.so: undefined reference to `__isoc23_strtoul@GLIBC_2.38'



I will add info about emerge --info tomorrow when I can submit text with urls, in the meantime find the logs attached
Comment 1 ahmedsoliman 2023-08-08 21:05:20 UTC
Follow up on my last email


This is the result of emerge --info

```
➜  gentoo /home/oddcoder/gentoo/tmp/bin/emerge --info
Portage 3.0.49_prefix (python 3.11.3-final-0, prefix/linux/amd64, gcc-13.2.1, unavailable, 6.4.8-arch1-1 x86_64)
=================================================================
System uname: Linux-6.4.8-arch1-1-x86_64-with-glibc2.38
KiB Mem:    16086960 total,   1081152 free
KiB Swap:   20971516 total,  18711804 free
Timestamp of repository gentoo: Tue, 08 Aug 2023 00:45:01 +0000
Head commit of repository gentoo: 0fa5cce46275be8e002ba11f807bba191fc50a53
sh bash 5.2_p15-r6
ld GNU ld (GNU Binutils) 2.41.0
app-shells/bash:           5.2_p15-r6::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-devel/binutils:        2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             12.3.1_p20230526::gentoo
sys-devel/gcc-config:      2.11::gentoo
Repositories:

gentoo
    location: /home/oddcoder/gentoo/var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix
    priority: -1000
    volatile: True
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="amd64 ~amd64-linux"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/gentoo-release"
CONFIG_SHELL="/home/oddcoder/gentoo/bin/bash"
CXXFLAGS="-O2 -pipe -O2 -pipe"
DISTDIR="/home/oddcoder/gentoo/var/cache/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 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j8"
PKGDIR="/home/oddcoder/gentoo/tmp/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/home/oddcoder/gentoo/tmp/"
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="/home/oddcoder/gentoo/tmp/var/tmp"
SHELL="/usr/bin/zsh"
USE="amd64 bzip2 cli crypt dri fortran gdbm iconv ipv6 libtirpc ncurses nls nptl openmp pcre prefix prefix-guest readline ssl test-rust unicode zlib" ABI_X86="64" 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" CPU_FLAGS_X86="mmx mmxext sse sse2" 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="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="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa 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, ASFLAGS, CC, CCLD, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, 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
```
Comment 2 Janusz Krzysztofik 2023-11-03 01:56:08 UTC
I was hit by this issue when I tried to install Gentoo Prefix stable (with sys-libs/glibc-2.37-*) on Arch Linux with glibc-2.38 installed.  For me that looked like the 2.38 was not compatible with 2.37 for some reason.

$ strings /usr/lib/libc.so.6|grep "GLIBC_2"|sort -t. -n -k2|tail
GLIBC_2.28
GLIBC_2.29
GLIBC_2.30
GLIBC_2.31
GLIBC_2.32
GLIBC_2.33
GLIBC_2.34
GLIBC_2.35
GLIBC_2.36
GLIBC_2.38

I've worked around the issue by unmasking 2.38 test version of Gentoo glibc and re-running bootstrap-prefix.sh.

<prefix>/etc/portage/packages.accept_keywords/glibc:
=sys-libs/glibc-2.38* ~amd64

Maybe bootstrap-prefix.sh could automatically check that, at least if emerge of glibc fails, and fix if needed.

Thanks,
Janusz
Comment 3 Benda Xu gentoo-dev 2023-11-26 12:43:26 UTC
Exactly, Arch host library is just too new.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-26 12:54:09 UTC
It is indeed the reason it's failing but the real issue is that we're not using the just built glibc consistently.
Comment 5 Arsen Arsenović gentoo-dev 2023-11-26 13:45:08 UTC
note that this can happen on gentoo hosts too..

iirc the problem was the use of host tools with modified LD_LIBRARY_PATHs?  sam, do you recall?