Attempting to build glibc with gcc 9.2.0 fails. Both with LTO, and without LTO flags. Reproducible: Always Steps to Reproduce: 1. emerge glibc Actual Results: Two passes with the same argument (-amdgpu-argument-reg-usage-info) attempted to be registered! make[2]: *** [Makefile:135: /var/tmp/portage/sys-libs/glibc-2.30-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl/sunrpc/librpc_compat_pic.a] Segmentation fault (core dumped) make[2]: *** Deleting file '/var/tmp/portage/sys-libs/glibc-2.30-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl/sunrpc/librpc_compat_pic.a' make[2]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.30-r4/work/glibc-2.30/sunrpc' make[1]: *** [Makefile:260: sunrpc/subdir_lib] Error 2 make[1]: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.30-r4/work/glibc-2.30' make: *** [Makefile:9: all] Error 2 make: Leaving directory '/var/tmp/portage/sys-libs/glibc-2.30-r4/work/build-amd64-x86_64-pc-linux-gnu-nptl' Portage 2.3.92 (python 3.6.10-final-0, default/linux/amd64/17.1/no-multilib, gcc-9.2.0, glibc-2.30-r3, 5.5.7-gentoo x86_64) ================================================================= System uname: Linux-5.5.7-gentoo-x86_64-AMD_Ryzen_5_2500U_with_Radeon_Vega_Mobile_Gfx-with-gentoo-2.7 KiB Mem: 16048468 total, 11029600 free KiB Swap: 33554428 total, 33298940 free Timestamp of repository gentoo: Fri, 06 Mar 2020 21:30:01 +0000 Head commit of repository gentoo: 4d7c6a5189a1c06d72f8d9d57bfa923a7029e549 sh bash 5.0_p16 ld GNU ld (Gentoo 2.32 p2) 2.32.0 ccache version 3.7.6 [disabled] app-shells/bash: 5.0_p16::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.30.1::gentoo dev-lang/python: 2.7.17-r100::lto-overlay, 3.6.10-r1::lto-overlay, 3.7.6::mv, 3.8.1-r1::lto-overlay dev-util/ccache: 3.7.6::gentoo dev-util/cmake: 3.16.2-r1::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.41.2::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.32-r1::gentoo, 2.33.1-r1::gentoo, 2.34::gentoo sys-devel/gcc: 9.2.0-r4::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: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 booboo location: /var/lib/layman/booboo masters: gentoo priority: 50 dotnet location: /var/lib/layman/dotnet masters: gentoo priority: 50 imaging location: /var/lib/layman/imaging masters: gentoo priority: 50 lto-overlay location: /var/lib/layman/lto-overlay masters: gentoo mv priority: 50 mv location: /var/lib/layman/mv masters: gentoo priority: 50 FireBurn location: /var/lib/layman/FireBurn masters: gentoo priority: 60 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=znver1 -O2 -pipe -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.6/conf" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -march=znver1 -O2 -pipe -pipe" DISTDIR="/var/cache/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 -march=znver1 -O2 -pipe -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 qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -march=znver1 -O2 -pipe -pipe" GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j7" 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 acl adwaita-icon-theme alsa amd64 berkdb bluetooth brotli bzip2 cairo caps clang cli codec2 cpudetection crypt curl cxx dav1d dbus designer dri dri3 egl exif ffmpeg fortran gdbm geos gles2 gold graphite gtk gtk3 http2 iconv icu ipv6 jpeg jpeg2k libnotify libtirpc lm-sensors lto lzma minizip ncurses nptl ogg opencl opengl openmp optimization opus pam pcre pdf pgo png policykit qml qt5 readline seccomp speex split-usr sqlite srt ssl startup-notification strong-optimization svg synaptics system-jsoncpp system-libvpx systemd sysv-utils tcpd theora tiff truetype udev udisks unicode upower vaapi vdpau vim-syntax vorbis vpx vulkan webp webstart x264 x265 xattr xinerama zeromq zlib" ABI_X86="64" 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_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" 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" L10N="en nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU BPF" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25 ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Given that some other packages compile, but gentoo-sources doesn't, specifically on: Two passes with the same argument (-amdgpu-argument-reg-usage-info) attempted to be registered! /bin/sh: line 1: 643873 Segmentation fault (core dumped) ar rcs /usr/src/linux-5.5.8-gentoo/tools/objtool/libsubcmd.a /usr/src/linux-5.5.8-gentoo/tools/objtool/libsubcmd-in.o
I am not quite sure if the subject covers this. While digging deeper it seems to be in ar. Which then goes for LLVM...? (gdb) bt #0 0x00007ffff651468b in ?? () from /usr/lib/llvm/10/lib64/libLLVM-10.so #1 0x0000000000000050 in ?? () #2 0x00000000004e74d0 in ?? () #3 0x00000000004e75d8 in ?? () #4 0x00000006ffffffff in ?? () #5 0x0000000000000001 in ?? () #6 0x00000000004e8a30 in ?? () #7 0x00000000004da1b0 in ?? () #8 0x00000000004e4c40 in ?? () #9 0x00007fffffffae40 in ?? () #10 0x00000000004e4c50 in ?? () #11 0x00007ffff6f63fd8 in ?? () from /usr/lib/llvm/10/lib64/libLLVM-10.so #12 0x00007ffff651270d in llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool) () from /usr/lib/llvm/10/lib64/libLLVM-10.so #13 0x00007ffff523bbba in ?? () from /usr/lib/llvm/10/lib64/libLLVM-10.so #14 0x00007ffff416db47 in __pthread_once_slow () from /lib64/libpthread.so.0 #15 0x00007ffff5216356 in ?? () from /usr/lib/llvm/10/lib64/libLLVM-10.so #16 0x00007ffff416db47 in __pthread_once_slow () from /lib64/libpthread.so.0 #17 0x00007ffff6587bba in ?? () from /usr/lib/llvm/10/lib64/libLLVM-10.so #18 0x00007ffff51c9c00 in LLVMInitializeAMDGPUTarget () from /usr/lib/llvm/10/lib64/libLLVM-10.so #19 0x00007ffff780880e in onload () from /usr/x86_64-pc-linux-gnu/binutils-bin/2.33.1/../2.33.1/../lib/bfd-plugins/LLVMgold.so #20 0x00007ffff7f6985e in ?? () from /usr/lib64/binutils/x86_64-pc-linux-gnu/2.33.1/libbfd-2.33.1.gentoo-sys-devel-binutils-st.so #21 0x00007ffff7f69ad7 in ?? () from /usr/lib64/binutils/x86_64-pc-linux-gnu/2.33.1/libbfd-2.33.1.gentoo-sys-devel-binutils-st.so #22 0x00007ffff7ee2e0a in bfd_check_format_matches () from /usr/lib64/binutils/x86_64-pc-linux-gnu/2.33.1/libbfd-2.33.1.gentoo-sys-devel-binutils-st.so #23 0x00007ffff7edbd99 in ?? () from /usr/lib64/binutils/x86_64-pc-linux-gnu/2.33.1/libbfd-2.33.1.gentoo-sys-devel-binutils-st.so #24 0x00007ffff7eea62a in bfd_close () from /usr/lib64/binutils/x86_64-pc-linux-gnu/2.33.1/libbfd-2.33.1.gentoo-sys-devel-binutils-st.so #25 0x0000000000405055 in ?? () #26 0x00000000004059d8 in ?? () #27 0x0000000000402ea1 in ?? () #28 0x00007ffff7cbaeab in __libc_start_main () from /lib64/libc.so.6 #29 0x000000000040324a in ?? () (gdb) q
It works for me. Please recompile and *attach* the logfiles and paste the emerge info as described on https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket We need to have all information at hand before ticket assignment, so that the maintainer can look after it in one session with minimal number of callbacks. Please reopen this ticket (Status:unconfirmed) afterwards.
Works for you after LLVM-10?
before LLVM-10. Still no logfiles. Reopen, when attached.
After getting in touch on IRC. I have recompiled llvm-10 and clang-10 without lto. This did not overwrite "ar". Afterwhich glibc compiled without issues.