Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 707866

Summary: sys-libs/binutils-libs-2.34 fails to build (LTO?)
Product: Gentoo Linux Reporter: Patrick Lauer <patrick>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Patrick Lauer gentoo-dev 2020-02-02 07:15:52 UTC
/bin/sh ./libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -m32 -std=gnu99 -Wall -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -pedantic -Wno-long-long   -O2 -pipe -march=native -flto=4 -fuse-linker-plugin -version-info 0:0:0  -Wl,--version-script='/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34/libctf/libctf.ver' -O2 -flto=4 -o libctf-nobfd.la -rpath /usr/lib32 ctf-archive.lo ctf-dump.lo ctf-create.lo ctf-decl.lo ctf-error.lo ctf-hash.lo ctf-labels.lo ctf-link.lo ctf-lookup.lo ctf-open.lo ctf-string.lo ctf-subr.lo ctf-types.lo ctf-util.lo  -L/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34-abi_x86_32.x86/libctf/../libiberty/pic -liberty -lz -ldl
mv -f .deps/ctf-open-bfd.Tpo .deps/ctf-open-bfd.Plo
/bin/sh ./libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -m32 -std=gnu99 -Wall -W -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -pedantic -Wno-long-long   -O2 -pipe -march=native -flto=4 -fuse-linker-plugin -version-info 0:0:0  -Wl,--version-script='/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34/libctf/libctf.ver' -O2 -flto=4 -o libctf.la -rpath /usr/lib32 ctf-archive.lo ctf-dump.lo ctf-create.lo ctf-decl.lo ctf-error.lo ctf-hash.lo ctf-labels.lo ctf-link.lo ctf-lookup.lo ctf-open.lo ctf-string.lo ctf-subr.lo ctf-types.lo ctf-util.lo  ctf-open-bfd.lo -Wl,/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34-abi_x86_32.x86/libctf/../bfd/.libs/libbfd.so -L/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34-abi_x86_32.x86/libctf/../libiberty/pic -liberty -lz -ldl
libtool: link: x86_64-pc-linux-gnu-gcc -m32 -shared  -fPIC -DPIC  .libs/ctf-archive.o .libs/ctf-dump.o .libs/ctf-create.o .libs/ctf-decl.o .libs/ctf-error.o .libs/ctf-hash.o .libs/ctf-labels.o .libs/ctf-link.o .libs/ctf-lookup.o .libs/ctf-open.o .libs/ctf-string.o .libs/ctf-subr.o .libs/ctf-types.o .libs/ctf-util.o   -L/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34-abi_x86_32.x86/libctf/../libiberty/pic -liberty -lz -ldl  -m32 -march=native -Wl,--version-script=/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34/libctf/libctf.ver   -Wl,-soname -Wl,libctf-nobfd.so.0 -o .libs/libctf-nobfd.so.0.0.0
libtool: link: x86_64-pc-linux-gnu-gcc -m32 -shared  -fPIC -DPIC  .libs/ctf-archive.o .libs/ctf-dump.o .libs/ctf-create.o .libs/ctf-decl.o .libs/ctf-error.o .libs/ctf-hash.o .libs/ctf-labels.o .libs/ctf-link.o .libs/ctf-lookup.o .libs/ctf-open.o .libs/ctf-string.o .libs/ctf-subr.o .libs/ctf-types.o .libs/ctf-util.o .libs/ctf-open-bfd.o   -L/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34-abi_x86_32.x86/libctf/../libiberty/pic -liberty -lz -ldl  -m32 -march=native -Wl,--version-script=/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34/libctf/libctf.ver -Wl,/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34-abi_x86_32.x86/libctf/../bfd/.libs/libbfd.so   -Wl,-soname -Wl,libctf.so.0 -o .libs/libctf.so.0.0.0
libtool: link: (cd ".libs" && rm -f "libctf-nobfd.so.0" && ln -s "libctf-nobfd.so.0.0.0" "libctf-nobfd.so.0")
libtool: link: (cd ".libs" && rm -f "libctf-nobfd.so" && ln -s "libctf-nobfd.so.0.0.0" "libctf-nobfd.so")
libtool: link: ( cd ".libs" && rm -f "libctf-nobfd.la" && ln -s "../libctf-nobfd.la" "libctf-nobfd.la" )
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-libs/binutils-libs-2.34/temp/libctf.so.0.0.0.iDxKnV.ltrans0.ltrans.o: relocation R_386_GOTOFF against undefined symbol `_xexit_cleanup' can not be used when making a shared object
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:546: libctf.la] Error 1
make[3]: Leaving directory '/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34-abi_x86_32.x86/libctf'
make[2]: *** [Makefile:443: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34-abi_x86_32.x86/libctf'
make[1]: *** [Makefile:8416: all-libctf] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-libs/binutils-libs-2.34/work/binutils-2.34-abi_x86_32.x86'
make: *** [Makefile:853: all] Error 2
 * ERROR: sys-libs/binutils-libs-2.34::gentoo failed (compile phase):
 *   emake failed

Portage 2.3.86 (python 3.6.10-final-0, default/linux/amd64/17.0, gcc-9.2.0, glibc-2.30-r3, 5.4.10-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.4.10-gentoo-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    32928232 total,  16712120 free
KiB Swap:          0 total,         0 free
sh bash 5.0_p11
ld GNU ld (Gentoo 2.34 p1) 2.34.0
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.1::gentoo
dev-util/cmake:           3.16.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.34::gentoo
sys-devel/gcc:            9.2.0-r3::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

gentoo
    location: /home/me/code/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: no

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -flto=4 -fuse-linker-plugin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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="-O2 -pipe -march=native -flto=4 -fuse-linker-plugin"
DISTDIR="/chroot/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/etc/X11/xinit/xinitrc.d/80-dbus /usr/bin/dbus-launch"
LANG="en_US.utf8"
LDFLAGS="-O2 -flto=4"
MAKEOPTS="-j8"
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"
USE="X acl alsa amd64 apng berkdb bzip2 cli crypt cups cxx dri ffmpeg fortran gdbm glamor gmp gpo iconv icu ipv6 lapack libtirpc minizip multilib ncurses nls nptl opencl opengl openmp pam pcre pgo readline seccomp split-usr sqlite ssl tcpd truetype udev unicode vdpau vulkan xattr xvmc zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="aes avx f16c fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" 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 keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_7 python3_6" RUBY_TARGETS="ruby25" USERLAND="GNU" VIDEO_CARDS="radeon r600 radeonsi amdgpu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-02 11:34:27 UTC
Works fine here on:
- ~x86
- ~amd64
- ~amd64 -march=native
- ~amd64 -flto=4

Please attach full build.log. I am specifically interested in your ranlib tool. Make sure you use RANLIB=gcc-ranlib. I'm not sure 'ranlib' would work.

"""
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-libs/binutils-libs-2.34/temp/libctf.so.0.0.0.iDxKnV.ltrans0.ltrans.o: relocation R_386_GOTOFF against undefined symbol `_xexit_cleanup' can not be used when making a shared object
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
"""

Missing '_xexit_cleanup' symbol is supposed to be defined in static local libibery.a library. I'd like to see how it was built.
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-18 19:46:33 UTC
Feel free to reopen when you have more logs.