emerge fails with this primary cause: /var/tmp/portage/dev-libs/elfutils-0.170-r1/work/elfutils-0.170/src/readelf.c:313:10: error: 'error_message_count' undeclared (first use in this function) return error_message_count != 0; Observed on two machines with different setup: emerge --info Portage 2.3.13 (python 2.7.14-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.25-r9, 4.13.12-gentoo x86_64) ================================================================= System uname: Linux-4.13.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-4810MQ_CPU_@_2.80GHz-with-gentoo-2.4.1 KiB Mem: 16340808 total, 3477228 free KiB Swap: 8388604 total, 8388604 free Timestamp of repository gentoo: Tue, 12 Dec 2017 12:00:01 +0000 Head commit of repository gentoo: 07c1b8ca23fa108ce7b02e912f8cee46096247cf sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.29.1 p3) 2.29.1 app-shells/bash: 4.3_p48-r1::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.3::gentoo dev-lang/python: 2.7.14-r1::gentoo, 3.4.5-r1::gentoo, 3.5.4-r1::gentoo, 3.6.3-r1::gentoo dev-util/cmake: 3.8.2::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.34.11::gentoo sys-apps/sandbox: 2.10-r4::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r2::gentoo, 1.14.1-r1::gentoo, 1.15.1-r1::gentoo sys-devel/binutils: 2.25.1-r1::gentoo, 2.26.1::gentoo, 2.28-r2::gentoo, 2.28.1::gentoo, 2.29.1-r1::gentoo sys-devel/gcc: 4.5.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo, 6.4.0::gentoo, 7.2.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.25-r9::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: science location: /var/lib/layman/science masters: gentoo priority: 0 crossdev location: /opt/portage masters: gentoo science priority: 1 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb /var/lib/i2pd/certificates" 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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.supp.name/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://147.251.48.205/pub/linux/gentoo/ http://gentoo.mirror.dkm.cz/pub/gentoo/ http://86.49.49.49/pub/gentoo/ ftp://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://141.76.119.131/pub/mirrors/gentoo ftp://ftp.sh.cvut.cz/MIRRORS/gentoo ftp://mirror.switch.ch/mirror/gentoo/ http://gentoo.supp.name/ rsync://gentoo.mirror.dkm.cz/gentoo/ http://gentoo.mirror.web4u.cz/" LANG="C" LDFLAGS="-Wl,-O1 -Wl,--as-needed" 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="/scratch/tmp" USE="X acl aes alsa amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gcj gdbm hal iconv ipv6 lapack latex mbox mmx modules multilib multislot ncurses nls nptl openmp pam pcre readline seccomp session sse sse2 sse3 sse4 ssl static-libs systemtap tcpd tetex unicode xattr zlib" ABI_X86="64 32" 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="kexi words flow plan sheets stage tables krita karbon braindump author" 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 isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="cs de en nl sk" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau vesa nv fbdev v4l vga" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS gcc --version gcc (Gentoo 5.4.0-r3 p1.3, pie-0.6.5) 5.4.0 and emerge --info Portage 2.3.13 (python 3.4.5-final-0, hardened/linux/amd64, gcc-5.4.0, glibc-2.25-r9, 4.8.17-hardened-r2 x86_64) ================================================================= System uname: Linux-4.8.17-hardened-r2-x86_64-Intel-R-_Pentium-R-_CPU_N4200_@_1.10GHz-with-gentoo-2.4.1 KiB Mem: 8005620 total, 5450120 free KiB Swap: 11718652 total, 11718652 free Timestamp of repository gentoo: Mon, 11 Dec 2017 15:30:02 +0000 Head commit of repository gentoo: bda5bf4fcbedd8e7ef372b3b6296a320d0079e41 sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.29.1 p3) 2.29.1 app-shells/bash: 4.3_p48-r1::gentoo dev-lang/perl: 5.24.3::gentoo dev-lang/python: 2.7.14::gentoo, 3.4.5::gentoo, 3.5.4::gentoo dev-util/cmake: 3.8.2::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/openrc: 0.34.9::gentoo sys-apps/sandbox: 2.10-r4::gentoo sys-devel/autoconf: 2.69::gentoo sys-devel/automake: 1.15.1-r1::gentoo sys-devel/binutils: 2.28.1::gentoo, 2.29.1-r1::gentoo sys-devel/gcc: 5.4.0-r3::gentoo, 6.4.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.25-r9::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/gnupg/qualified.txt /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.supp.name/ http://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.fi.muni.cz/pub/linux/gentoo/ rsync://mirror.dkm.cz/gentoo/ http://mirror.dkm.cz/gentoo/ https://mirror.dkm.cz/gentoo/ ftp://mirror.dkm.cz/gentoo/ ftp://gentoo.mirror.web4u.cz/ http://gentoo.mirror.web4u.cz/ http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ rsync://mirror.eu.oneandone.net/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo rsync://mirror.netcologne.de/gentoo/ http://mirror.netcologne.de/gentoo/ ftp://mirror.netcologne.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ rsync://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ ftp://ftp.halifax.rwth-aachen.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo" LANG="C" LDFLAGS="-Wl,-O1 -Wl,--as-needed" 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="acl aes alsa amd64 berkdb bzip2 cli cracklib crypt cxx dlz dri fortran fuse gdbm hal hardened iconv ipv6 justify mbox modules multilib multislot ncurses nls nptl openmp pam pcre pie readline seccomp session ssl ssp static-libs systemtap tcpd unicode urandom xattr xtpax zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" 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 isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" 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" LINGUAS="cs en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel" 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, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS gcc --version gcc (Gentoo Hardened 5.4.0-r3 p1.7, pie-0.6.5) 5.4.0
Thank you for the report. Please *attach* the logfiles, https://wiki.gentoo.org/wiki/Bugzilla/Bug_report_guide#Report_a_build-time_bug_.28emerge_failed.29 and reopen this ticket (Status:unconfirmed).
Created attachment 511730 [details] build.log
Added the build.log as requested.
Does it still happen for you? If it does can you expand -march-native into set of options? https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide#Expand_-march.3Dnative.2C_exact_gcc_version_and_other_system-specific_options
Created attachment 565504 [details] build.log
I am getting another error when emerging elfutils-0.173-r1 now: /scratch/tmp/portage/dev-libs/elfutils-0.173-r1/work/elfutils-0.173/src/strings.c: In function 'main': /scratch/tmp/portage/dev-libs/elfutils-0.173-r1/work/elfutils-0.173/src/strings.c:186:6: warning: implicit declaration of function 'error'; did you mean 'perror'? [-Wimplicit-function-declaration] error (0, errno, gettext ("cannot open '%s'"), argv[remaining]); ^~~~~ perror make[2]: *** [Makefile:726: readelf.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /scratch/tmp/portage/dev-libs/elfutils-0.173-r1/work/elfutils-0.173/src/ar.c: In function 'main': /scratch/tmp/portage/dev-libs/elfutils-0.173-r1/work/elfutils-0.173/src/ar.c:181:2: warning: implicit declaration of function 'error'; did you mean 'perror'? [-Wimplicit-function-declaration] error (1, 0, gettext ("\ ^~~~~ perror make[1]: *** [Makefile:485: all-recursive] Error 1 make: *** [Makefile:401: all] Error 2 * ERROR: dev-libs/elfutils-0.173-r1::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-libs/elfutils-0.173-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-libs/elfutils-0.173-r1::gentoo'`. * The complete build log is located at '/scratch/tmp/portage/dev-libs/elfutils-0.173-r1/temp/build.log'. * The ebuild environment file is located at '/scratch/tmp/portage/dev-libs/elfutils-0.173-r1/temp/environment'. * Working directory: '/scratch/tmp/portage/dev-libs/elfutils-0.173-r1/work/elfutils-0.173-abi_x86_32.x86' * S: '/scratch/tmp/portage/dev-libs/elfutils-0.173-r1/work/elfutils-0.173' >>> Failed to emerge dev-libs/elfutils-0.173-r1, Log file: >>> '/scratch/tmp/portage/dev-libs/elfutils-0.173-r1/temp/build.log' * Messages for package dev-libs/elfutils-0.173-r1: * ERROR: dev-libs/elfutils-0.173-r1::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=dev-libs/elfutils-0.173-r1::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-libs/elfutils-0.173-r1::gentoo'`. * The complete build log is located at '/scratch/tmp/portage/dev-libs/elfutils-0.173-r1/temp/build.log'. * The ebuild environment file is located at '/scratch/tmp/portage/dev-libs/elfutils-0.173-r1/temp/environment'. * Working directory: '/scratch/tmp/portage/dev-libs/elfutils-0.173-r1/work/elfutils-0.173-abi_x86_32.x86' * S: '/scratch/tmp/portage/dev-libs/elfutils-0.173-r1/work/elfutils-0.173' emerge --info Portage 2.3.60 (python 3.4.8-final-0, default/linux/amd64/17.0, gcc-8.2.0, glibc-2.27-r6, 4.20.6-gentoo x86_64) ================================================================= System uname: Linux-4.20.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-4810MQ_CPU_@_2.80GHz-with-gentoo-2.6 KiB Mem: 16332992 total, 506100 free KiB Swap: 66096208 total, 66096208 free Timestamp of repository gentoo: Fri, 15 Feb 2019 11:30:01 +0000 Head commit of repository gentoo: 75d21d5a534c45bae232670ca0e14f385fcf2bc8 sh bash 4.4_p23-r1 ld GNU ld (Gentoo 2.30 p5) 2.30.0 app-shells/bash: 4.4_p23-r1::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.26.2::gentoo dev-lang/python: 2.7.15::gentoo, 3.4.8::gentoo, 3.5.5::gentoo, 3.6.5::gentoo dev-util/cmake: 3.9.6::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.38.3-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.14.1-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.25.1-r1::gentoo, 2.26.1::gentoo, 2.28-r2::gentoo, 2.28.1::gentoo, 2.29.1-r1::gentoo, 2.30-r4::gentoo sys-devel/gcc: 4.5.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo, 6.4.0-r5::gentoo, 7.2.0-r1::gentoo, 7.3.0-r6::gentoo, 8.2.0-r6::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.20::gentoo (virtual/os-headers) sys-libs/glibc: 2.27-r6::gentoo Repositories: gentoo location: /usr/portage 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-metamanifest: yes sync-rsync-verify-max-age: 24 science location: /var/lib/layman/science masters: gentoo priority: 1 crossdev location: /opt/portage masters: gentoo science priority: 2 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb /var/lib/i2pd/certificates" 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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe" 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 splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.supp.name/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://147.251.48.205/pub/linux/gentoo/ http://gentoo.mirror.dkm.cz/pub/gentoo/ http://86.49.49.49/pub/gentoo/ ftp://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://141.76.119.131/pub/mirrors/gentoo ftp://ftp.sh.cvut.cz/MIRRORS/gentoo ftp://mirror.switch.ch/mirror/gentoo/ http://gentoo.supp.name/ rsync://gentoo.mirror.dkm.cz/gentoo/ http://gentoo.mirror.web4u.cz/" LANG="C" LC_ALL="czech" LDFLAGS="-Wl,-O1 -Wl,--as-needed" 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="/scratch/tmp" USE="X acl aes alsa amd64 berkdb bzip2 cli crypt cxx dri fortran gcj gdbm hal iconv ipv6 lapack latex libtirpc linguas_cs linguas_de linguas_en linguas_nl linguas_sk mbox mmx multilib multislot ncurses nls nptl openmp pam pcre readline seccomp sse sse2 sse3 sse4 ssl static-libs systemtap tcpd tetex unicode xattr zlib" ABI_X86="64 32" 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="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" 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="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_4 python3_5 python_3_6 python_3_7" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau vesa nv fbdev v4l vga" 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, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
The following warning: /scratch/tmp/portage/dev-libs/elfutils-0.173-r1/work/elfutils-0.173/lib/xmalloc.c:53:5: warning: implicit declaration of function 'error'; did you mean 'errno'? [-Wimplicit-function-declarati on] error (EXIT_FAILURE, 0, _("memory exhausted")); ^~~~~ suggests that your <error.h> header does not expose error() for some reason. I wonder if it's a bug similar to bug #641326 where glibc upgrade requires a gcc rebuild. Try to rebuild current gcc and recheck if it fixes the issue. If it's another instance of the above it should fix it.
I have re-emerged gcc-8.2.0-r6, but the error remains exactly the same.
Aha. Let's explore your build failure in more detail then. Is <error.h> functional on it's own for you? Run this and post the full output: $ printf '#include <error.h>\nint main() {\n error(0,1,"error");\n }\n' | gcc -Wall -x c - -o /dev/null
There seems to be a general problem with the include file: printf '#include <error.h>\nint main() {\n error(0,1,"error");\n }\n' |gcc -Wall -x c - -o /dev/null <stdin>: In function 'main': <stdin>:3:2: warning: implicit declaration of function 'error'; did you mean 'ma_error'? [-Wimplicit-function-declaration] It is independent on compiler version, I tried with gcc-config two older ones as well.
I found the problem - some non-gentoo package installed via ./configure;make created /usr/local/include/error.h which took precedence over the /usr/include/error.h file. After removing it all works, so it had actually nothing to do with elfutils. However, I think that if would be a good idea if the emerge command sanitizes by default the environment so that only gentoo's system files are considered for #include etc.
(In reply to Jiri Pittner from comment #11) > I found the problem - some non-gentoo package installed via ./configure;make > created /usr/local/include/error.h which took precedence over the > /usr/include/error.h file. After removing it all works, so it had actually > nothing to do with elfutils. Woohoo! > However, I think that if would be a good idea if the emerge command > sanitizes > by default the environment so that only gentoo's system files are considered > for #include etc. Yeah. I believe it's gcc's and binutils' behaviour to search for /usr/local/ first to allow users to override system defaults easier: $ ld --verbose | fgrep local ...SEARCH_DIR("/usr/local/lib64");... $ LANG=C gcc --verbose -x c -c /dev/null -o /dev/null 2>&1 | fgrep local/include ignoring nonexistent directory "/usr/local/include" Unfortunately it's a bit hard to implement as it's overriding behaviour is expected semantics for linux system. Having an optional warning about files being resolved from there would be nice. But I Gentoo should not do it downstream. It should be an upstream option.