Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697712 - sys-devel/distcc-3.3.3 - configure: error: Cannot find libiberty
Summary: sys-devel/distcc-3.3.3 - configure: error: Cannot find libiberty
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
: 680248 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-14 17:01 UTC by Vladi
Modified: 2023-04-14 18:36 UTC (History)
4 users (show)

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


Attachments
config.log (config.log,69.08 KB, text/plain)
2019-10-14 17:19 UTC, Vladi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladi 2019-10-14 17:01:55 UTC
distcc-3.3.3 fails to emerge due to some missing lib

checking whether to use included libpopt... no
checking for poptGetContext in -lpopt... (cached) yes
checking for expandargv in -liberty... no
configure: error: Cannot find libiberty


Reproducible: Always

Steps to Reproduce:
1.emerge -uqD world
2.
3.
Actual Results:  
emerge fails

Expected Results:  
emerge succeeds

❯ cat /var/log/portage/sys-devel:distcc-3.3.3:20191014-165423.log
 * Package:    sys-devel/distcc-3.3.3
 * Repository: gentoo
 * Maintainer: mgorny@gentoo.org cluster@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc ipv6 kernel_linux python_single_target_python3_6 python_targets_python3_6 userland_GNU zeroconf
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
sys-devel/distcc: 53 seconds average for 16 merges
sys-devel/distcc: 32 seconds
sys-devel/distcc: 31 seconds
sys-devel/distcc: 30 seconds
sys-devel/distcc: 35 seconds
sys-devel/distcc: 51 seconds
sys-devel/distcc: 55 seconds
sys-devel/distcc: 1 minute, 8 seconds
sys-devel/distcc: 1 minute, 40 seconds
sys-devel/distcc: 3 minutes, 46 seconds
sys-devel/distcc: 16 seconds
sys-devel/distcc: 40 seconds
sys-devel/distcc: 19 seconds
sys-devel/distcc: 36 seconds
sys-devel/distcc: 50 seconds
sys-devel/distcc: 45 seconds
sys-devel/distcc: 28 seconds
 * 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'
 * CFLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * CXXFLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * FFLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * FCFLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * F77FLAGS='-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu'
 * LDFLAGS='-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32'
 * MAKEOPTS='-j12 -l4'
 * gcc (Gentoo 9.2.0-r1 p2) 9.2.0
 * Linux grendel 5.3.5 #70 SMP PREEMPT Mon Oct 7 13:52:37 PDT 2019 x86_64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz GenuineIntel GNU/Linux
 * Applying distcc-3.0-xinetd.patch ...
 [ ok ]
 * Applying distcc-3.3.2-freedesktop.patch ...
 [ ok ]
 * Applying distcc-3.2_rc1-socks5.patch ...
 [ ok ]
 * Fixing shebang in update-distcc-symlinks.py.
 * Fixing shebang in /var/tmp/portage/sys-devel/distcc-3.3.3/temp/distcc-config.
 * Running eautoreconf in '/var/tmp/portage/sys-devel/distcc-3.3.3/work/distcc-3.3.3' ...
 * Running aclocal ...
 [ ok ]
 * Running autoconf --force ...
 [ ok ]
 * Running autoheader ...
 [ ok ]
 * Running elibtoolize in: distcc-3.3.3/
configure: loading site script /usr/share/config.site
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking for socklen_t... yes
checking if building on Android... no
checking whether /usr/bin/python3.6 version is >= 3.1... yes
checking for /usr/bin/python3.6 version... 3.6
checking for /usr/bin/python3.6 platform... linux
checking for /usr/bin/python3.6 script directory... ${prefix}/lib64/python3.6/site-packages
checking for /usr/bin/python3.6 extension module directory... ${exec_prefix}/lib64/python3.6/site-packages
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... (cached) yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... (cached) none needed
configure: Adding gcc options: -march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -MD -W -Wall -Wimplicit -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wmissing-declarations -Wuninitialized
checking for library containing strerror... none required
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/lib/portage/python3.6/ebuild-helpers/xattr/install -c
checking for inline... inline
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for unistd.h... (cached) yes
checking for sys/types.h... (cached) yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for netinet/in.h... yes
checking for arpa/nameser.h... yes
checking for resolv.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking mcheck.h usability... yes
checking mcheck.h presence... yes
checking for mcheck.h... yes
checking alloca.h usability... yes
checking alloca.h presence... yes
checking for alloca.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking fnmatch.h usability... yes
checking fnmatch.h presence... yes
checking for fnmatch.h... yes
checking for in_port_t... yes
checking for in_addr_t... yes
checking for library containing gethostent... none required
checking for library containing setsockopt... none required
checking for library containing hstrerror... none required
checking for library containing inet_aton... none required
checking for poptGetContext in -lpopt... yes
checking popt.h usability... yes
checking popt.h presence... yes
checking for popt.h... yes
checking whether to use included libpopt... no
checking for poptGetContext in -lpopt... (cached) yes
checking for expandargv in -liberty... no
configure: error: Cannot find libiberty

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-devel/distcc-3.3.3/work/distcc-3.3.3/config.log
 * ERROR: sys-devel/distcc-3.3.3::gentoo failed (configure phase):
 *   econf failed
 * 
 * Call stack:
 *               ebuild.sh, line  125:  Called src_configure
 *             environment, line 5533:  Called econf '--disable-Werror' '--libdir=/usr/lib' '--enable-rfc2553' '--without-gtk' '--without-gnome' '--without-auth' '--with-avahi'
 *        phase-helpers.sh, line  681:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *   		die "$@"
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/distcc-3.3.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/distcc-3.3.3::gentoo'`.
 * The complete build log is located at '/var/log/portage/sys-devel:distcc-3.3.3:20191014-165423.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-devel/distcc-3.3.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/distcc-3.3.3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/distcc-3.3.3/work/distcc-3.3.3'
 * S: '/var/tmp/portage/sys-devel/distcc-3.3.3/work/distcc-3.3.3'
Comment 1 Vladi 2019-10-14 17:03:21 UTC
❯ sudo emerge --info            
Password: 
Portage 2.3.76 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.2.0, glibc-2.29-r2, 5.3.5 x86_64)
=================================================================
System uname: Linux-5.3.5-x86_64-Intel-R-_Core-TM-_i7-8550U_CPU_@_1.80GHz-with-gentoo-2.6
KiB Mem:    16363380 total,   1396624 free
KiB Swap:   16382972 total,  15879336 free
Timestamp of repository gentoo: Mon, 14 Oct 2019 16:10:36 +0000
Head commit of repository gentoo: 47f332f884d5fa9cb05ec36b221e76b26cbd2b92

Head commit of repository lto-overlay: ff5d8e9e5c89eacdfd52e5f367482e9274d37565

Head commit of repository mozilla: d8477059896e7b7a980b34d500a0703fd0bb9850

Head commit of repository mv: 20a69cedc1db309b594a0554033cf146c9899661

Head commit of repository steam-overlay: 5b099b835b5b8dc7f37390e37e44cebba7cc315d

Head commit of repository tlp: c4409992959bd3b98947a68462b91f50e9b1006d

Head commit of repository mva: 72a85ace74f52b5f4846aaeed21d4981cbb88f7a

Head commit of repository throttled: 937b9ec326a5a2fb3f43c1045dccacd199ddaa91

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
distcc 3.3.2 x86_64-pc-linux-gnu [disabled]
ccache version 3.7.2 [disabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.16::gentoo, 3.6.9::gentoo
dev-util/ccache:          3.7.2::gentoo
dev-util/cmake:           3.14.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.2.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000

local-grendel
    location: /usr/local/portage
    masters: gentoo

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

lto-overlay
    location: /var/lib/layman/lto-overlay
    sync-type: git
    sync-uri: https://github.com/InBetweenNames/gentooLTO.git
    masters: gentoo mv
    priority: 50

mozilla
    location: /var/lib/layman/mozilla
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/mozilla.git
    masters: gentoo
    priority: 50

mv
    location: /var/lib/layman/mv
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/user/mv.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

tlp
    location: /var/lib/layman/tlp
    sync-type: git
    sync-uri: git://github.com/dywisor/tlp-portage.git
    masters: gentoo
    priority: 50

mva
    location: /usr/local/portage/mva
    sync-type: git
    sync-uri: https://github.com/msva/mva-overlay.git
    masters: gentoo
    priority: 9999

throttled
    location: /usr/local/portage/throttled
    sync-type: git
    sync-uri: https://github.com/erpalma/throttled-overlay.git
    masters: gentoo
    priority: 9999

Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/easy-rsa /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="-march=skylake -mabm -O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=12 -fuse-linker-plugin -pipe -falign-functions=32"
DISTDIR="/usr/portage/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"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="en bg"
MAKEOPTS="-j12 -l4"
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 aalib acpi adns alsa amd64 apng archive aspell async autoipd autoreplace avahi bash-completion bluetooth branding btrfs bzip2 cairo caps cdda cdinstall cdr cli client-libs crypt cryptsetup cups curl custom-cflags custom-optimization cxx dbus declarative dhcp dolphin dri dri3 dts dvd dvdr egl encode epub exif ffmpeg flac fuse gallium gd gdbm geoclue geoip gif glamor gles gnome-keyring gnutls gphoto2 gps graphite gstreamer haptic hardcoded-tables hddtemp hwaccel i3 ibmacpi iconv icu imagemagick imap imlib introspection iproute2 ipv6 ithreads iwd javascript jpeg jumbo-build kde kdenlive kipi kwallet lame laptop lcms libaom libcaca libinput libkms libnotify libtirpc lm_sensors logrotate lto lzma lzo mad matroska minizip mng mobi mp3 mp4 mpeg mtp multilib musicbrainz mysql ncurses network networkmanager nonfsv4 nptl offensive ogg opengl openmp optimized-qmake pam pango pch pcre pdf pgo phonon pic pie plasma png pnp policykit postproc ppds pulseaudio qml qt5 rar readline rpc rss rtmp s3tc samba sasl sdl seccomp semantic-desktop smi smime smtp speex spell split-usr sqlite srt ssl ssse3 svg swaybar swaybg swaygrab swaylock swaymsg system-cairo system-ffmpeg system-icu system-jpeg system-libevent system-libvpx system-sqlite systemd theora threads tidy tiff tordns truetype udev udisks udisks2 ulaw unicode upower urandom usb user-session userlocales vaapi vim vim-syntax vnc vorbis vpx wayland webp widgets wifi x264 xattr xcb xcomposite xml xv xvid zeroconf zip zlib zsh-completion" ABI_X86="64" 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 avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 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" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="keyboard libinput" KERNEL="linux" L10N="en bg" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" 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" USERLAND="GNU" VIDEO_CARDS="intel i965 iris" 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, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Ben Kohler gentoo-dev 2019-10-14 17:15:22 UTC
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-devel/distcc-3.3.3/work/distcc-3.3.3/config.log
Comment 3 Vladi 2019-10-14 17:19:11 UTC
Created attachment 592680 [details]
config.log
Comment 4 Ben Kohler gentoo-dev 2019-10-14 17:23:52 UTC
This failure is most likely related to all your unsafe CFLAGS and LTO stuff:

lto1: fatal error: bytecode stream in file '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib64/libiberty.a' generated with LTO version 8.0 instead of the expected 8.1
compilation terminated.
lto-wrapper: fatal error: x86_64-pc-linux-gnu-gcc returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-15 04:05:04 UTC
Try rebuilding gcc then.  And probably your whole system.
Comment 6 Kim B. Sindalsen 2019-11-06 08:43:56 UTC
I have the same on two out of four boxes; they're quite identical afaik - one of the boxes work as a binhost and gcc on the three others is actually a binpkg from the binhost.

Distcc builds on the binhost and on one of the others, on the two remaining I have same error: Cannot find libiberty.

I've tried diff'ing the enviroment-log from a working and non-working machine.

tor ~ # diff work_environ fail_environ
56d55
< declare -x DCC_EMAILLOG_WHOM_TO_BLAME=""
82d80
< declare -- ECONF_SOURCE="."
144d141
< declare -x NCURSES_NO_UTF8_ACS="1"
207c204
< declare -x SANDBOX_PREDICT="/var/tmp/portage/sys-devel/distcc-3.3.3/homedir:/dev/crypto"
---
> declare -x SANDBOX_PREDICT="/var/tmp/portage/sys-devel/distcc-3.3.3/homedir:/dev/crypto:/var/cache/fontconfig"
215,217c212,214
< declare -x SSH_CLIENT="2001:470:28:4a6:7560:3a1a:f8cf:260f 61497 22"
< declare -x SSH_CONNECTION="2001:470:28:4a6:7560:3a1a:f8cf:260f 61497 2001:470:28:4a6::7 22"
< declare -x SSH_TTY="/dev/pts/0"
---
> declare -x SSH_CLIENT="2001:470:28:4a6:7560:3a1a:f8cf:260f 61466 22"
> declare -x SSH_CONNECTION="2001:470:28:4a6:7560:3a1a:f8cf:260f 61466 2001:470:28:4a6::6 22"
> declare -x SSH_TTY="/dev/pts/1"
221d217
< declare -x UNCACHED_ERR_FD=""
Comment 7 Kim B. Sindalsen 2019-11-06 12:42:24 UTC
Fixed for me by rebuilding sys-libs/binutils-libs.
Comment 8 andy 2020-03-19 19:57:09 UTC
This happend to me to today with sys-devel/distcc-3.3.3-r1 and Fixed for me by rebuilding sys-libs/binutils-libs.

I have quite the same setup as Vladi but sys-devel/gcc/gcc-10.0.1_pre9999.
Comment 9 Pacho Ramos gentoo-dev 2020-07-25 16:46:13 UTC
*** Bug 680248 has been marked as a duplicate of this bug. ***
Comment 10 immolo 2023-03-26 15:15:36 UTC
I found this one trying install distcc on one of my LTO enabled 23.0 profile machines.

It only seems to effect sys-devel/distcc when GCC has been updated but sys-libs/binutils-libs hasn't been rebuilt with that version when LTO is enabled on both packages. Best solution I have for this is to add a section to the wiki page as from testing it seems very rare to hit however all I have included all my findings in case anyone has a better solution or notices a wider issue this could cause.

https://wiki.gentoo.org/wiki/Distcc#configure:_error:_Cannot_find_libiberty
Comment 11 Kyle Elbert 2023-04-14 18:36:25 UTC
(In reply to immolo from comment #10)
> I found this one trying install distcc on one of my LTO enabled 23.0 profile
> machines.
> 
> It only seems to effect sys-devel/distcc when GCC has been updated but
> sys-libs/binutils-libs hasn't been rebuilt with that version when LTO is
> enabled on both packages. Best solution I have for this is to add a section
> to the wiki page as from testing it seems very rare to hit however all I
> have included all my findings in case anyone has a better solution or
> notices a wider issue this could cause.
> 
> https://wiki.gentoo.org/wiki/Distcc#configure:_error:_Cannot_find_libiberty

this error

lto1: fatal error: bytecode stream in file '/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib64/libiberty.a' generated with LTO version 8.0 instead of the expected 8.1

is not at all distcc nor binutils-libs specific, and is just one of the things you have to watch for with lto. the solution will always be to rebuild the old package, just pass emerge the path and itl figure out what to rebuild for you. emerge -1 /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib64/libiberty.a 

app-portage/lto-rebuild from the lto overlay looks for static archives (.a) built with old gcc versions and can reemerge them.