Firefox 51.0.1 is failing to build on my system with GCC 6.3.0, with an error seemingly coming from a GCC header. I'll attach the full build log, but the error is: In file included from /var/tmp/portage/www-client/firefox-51.0.1/work/firefox-51.0.1/ff/dist/system_wrappers/cmath:3:0, from /var/tmp/portage/www-client/firefox-51.0.1/work/firefox-51.0.1/ff/dist/stl_wrappers/cmath:44, from /var/tmp/portage/www-client/firefox-51.0.1/work/firefox-51.0.1/ff/dist/include/nsMathUtils.h:11, from /var/tmp/portage/www-client/firefox-51.0.1/work/firefox-51.0.1/ff/dist/include/nsCoord.h:11, from /var/tmp/portage/www-client/firefox-51.0.1/work/firefox-51.0.1/ff/dist/include/nsSize.h:9, from /var/tmp/portage/www-client/firefox-51.0.1/work/firefox-51.0.1/ff/dist/include/MediaData.h:9, from /var/tmp/portage/www-client/firefox-51.0.1/work/firefox-51.0.1/media/libstagefright/binding/Adts.cpp:6, from /var/tmp/portage/www-client/firefox-51.0.1/work/firefox-51.0.1/ff/media/libstagefright/Unified_cpp_media_libstagefright0.cpp:2: /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6.3.0/cmath:619:11: error: '::isinf' has not been declared using ::isinf; ^~~~~ /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6.3.0/cmath:646:11: error: '::isnan' has not been declared using ::isnan; ^~~~~ Firefox 51.0 did not have this problem. It tries to emerge as follows: [ebuild U ] www-client/firefox-51.0.1::gentoo [51.0::gentoo] USE="dbus gmp-autoupdate hardened jemalloc pulseaudio (skia) -bindist -custom-cflags -custom-optimization -debug -gtk2 -hwaccel -jack (-neon) -pgo (-rust) (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite {-test} -wifi" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" 0 KiB Reproducible: Always Portage 2.3.2 (python 2.7.13-final-0, funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-6.3.0, glibc-2.23-r3, 4.9.9-hardened x86_64) ================================================================= System uname: Linux-4.9.9-hardened-x86_64-Intel-R-_Core-TM-_i7-3930K_CPU_@_3.20GHz-with-gentoo-2.2.1 KiB Mem: 65949152 total, 3431812 free KiB Swap: 2283348 total, 2283348 free sh bash 4.3_p48 ld GNU ld (Funtoo 2.25) 2.25.0 app-shells/bash: 4.3_p48::gentoo dev-java/java-config: 2.2.0-r3::gentoo dev-lang/perl: 5.24.0-r2::gentoo dev-lang/python: 2.7.13::gentoo, 3.4.6::gentoo dev-util/cmake: 3.7.2::gentoo sys-apps/baselayout: 2.2.1::gentoo sys-apps/openrc: 0.23.2::gentoo sys-apps/sandbox: 2.10-r3::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo sys-devel/automake: 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.25-r2::gentoo sys-devel/gcc: 6.3.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r2::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r3::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: git://github.com/funtoo/ports-2012.git priority: -1000 steam-overlay location: /var/lib/layman/steam-overlay masters: gentoo priority: 50 Installed sets: @toolchain ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=corei7 -O2 -pipe -maes -fomit-frame-pointer -fno-stack-protector -freorder-blocks-and-partition -frename-registers -fweb -fgcse-las -fgcse-sm -fgcse-after-reload -fpredictive-commoning -fipa-pta -ftree-loop-ivcanon -ftree-loop-im -fivopts -ftracer -ftree-partial-pre -ftree-loop-distribution -ftree-loop-distribute-patterns -ftree-loop-if-convert -ftree-vectorize " CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=corei7 -O2 -pipe -maes -fomit-frame-pointer -fno-stack-protector -freorder-blocks-and-partition -frename-registers -fweb -fgcse-las -fgcse-sm -fgcse-after-reload -fpredictive-commoning -fipa-pta -ftree-loop-ivcanon -ftree-loop-im -fivopts -ftracer -ftree-partial-pre -ftree-loop-distribution -ftree-loop-distribute-patterns -ftree-loop-if-convert -ftree-vectorize " DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=corei7 -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" INSTALL_MASK="/etc/systemd/ /usr/lib/systemd/ /lib/systemd/" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -fuse-linker-plugin -s -Wl,-z,now" MAKEOPTS="-j13" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl alsa amd64 apng berkdb bluray bzip2 cdda cddb cdio cdr consolekit cracklib crypt cups cxx d3d9 dbus declarative dri dts dvd dvdr dvdread encode exif faac faad ffmpeg flac gdbm gif glamor gpm hardened ico iconv icu ieee1394 ios ipod ipv6 jpeg jpeg2k kde kipi lame libass libguess libmpeg2 lm_sensors mad matroska mjpeg mmx modules mp3 mpeg mtp mudflap multilib ncurses nls nptl nsplugin ogg opengl openmp osmesa pam pax_kernel pcre pdf phonon pic plasma png policykit postproc pppd pulseaudio python qml qt5 quicktime readline resolvconf scanner semantic-desktop sndfile sse sse2 ssl svg taglib tcpd theora tiff truetype twolame udev unicode urandom usb v4l vorbis vpx wav wavpack webp widgets win32codecs wmf x264 x265 xattr xcomposite xinerama xml xscreensaver xtpax xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel ice1724 intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 authn_core authz_core socache_shmcb unixd" 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 popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 pc" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21 ruby22 ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="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: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Created attachment 464924 [details] Build log with MAKEOPTS=-j1
I've just gotten the same type of error trying to emerge mail-client/thunderbird: x86_64-pc-linux-gnu-g++ -o Unified_cpp_media_libstagefright0.o -c -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/tbird/dist/stl_wrappers -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/tbird/dist/system_wrappers -include /var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/config/gcc_hidden.h -DANDROID_SMP=0 -DLOG_NDEBUG=1 -D_GLIBCXX_OS_DEFINES -DHAVE_SYS_UIO_H -DFAKE_LOG_DEVICE -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright -I. -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright/binding/include -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright/frameworks/av/include -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright/frameworks/av/include/media/stagefright/foundation -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright/frameworks/av/media/libstagefright -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright/stubs/empty -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright/stubs/include -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright/stubs/include/media/stagefright/foundation -I/var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright/system/core/include -I../../dist/include -I/usr/include/nspr -I/usr/include/nss -fPIC -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/Unified_cpp_media_libstagefright0.o.pp -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -march=corei7 -pipe -fno-stack-protector -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2 -Wno-return-type -w -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -freorder-blocks -Os -fomit-frame-pointer -Wno-format -Wno-format-security -Wno-multichar -Wno-sign-compare -Wno-unused /var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/tbird/media/libstagefright/Unified_cpp_media_libstagefright0.cpp In file included from /var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/tbird/dist/stl_wrappers/cmath:58:0, from ../../dist/include/nsMathUtils.h:11, from ../../dist/include/nsCoord.h:11, from ../../dist/include/nsSize.h:9, from ../../dist/include/MediaData.h:9, from /var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/mozilla/media/libstagefright/binding/Adts.cpp:6, from /var/tmp/portage/mail-client/thunderbird-45.8.0/work/thunderbird-45.8.0/tbird/media/libstagefright/Unified_cpp_media_libstagefright0.cpp:2: /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6.3.0/cmath:619:11: error: '::isinf' has not been declared using ::isinf; ^~~~~ /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6.3.0/cmath:646:11: error: '::isnan' has not been declared using ::isnan; The same thing happens with thunderbird-45.7.0, my currently installed version, which had compiled fine with gcc-6.3.0 before. I did some digging on my system to try and see what changed between now and the last time it was successfully built, and according to genlop I've since updated sys-kernel/linux-headers (4.3 to 4.9) and sys-libs/glibc (2.22 to 2.23-r3). I just tried reverting the linux-headers update and building firefox, but that failed... which suggests to me that glibc is the culprit, as I can't find anything else in my emerge log that might have had this effect.
i'am also getting the same error with all stable Versions of firefox. tried -j1 - with or without ccache - no luck. ## emerge --info Portage 2.3.2 (python 2.7.13-final-0, funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-6.3.0, glibc-2.23-r3, 4.10.1-ck x86_64) ================================================================= System uname: Linux-4.10.1-ck-x86_64-Intel-R-_Xeon-R-_CPU_E3-1245_v5_@_3.50GHz-with-gentoo-2.2.1 KiB Mem: 32910320 total, 19030760 free KiB Swap: 4194300 total, 4194300 free sh bash 4.3_p48 ld GNU ld (Funtoo 2.25) 2.25.0 ccache version 3.3.4 [enabled] app-shells/bash: 4.3_p48::gentoo dev-lang/perl: 5.24.0-r2::gentoo dev-lang/python: 2.7.13::gentoo, 3.4.6::gentoo, 3.5.2::gentoo, 3.6.0::gentoo dev-util/ccache: 3.3.4::gentoo dev-util/cmake: 3.7.2::gentoo sys-apps/baselayout: 2.2.1::gentoo sys-apps/openrc: 0.23.2::gentoo sys-apps/sandbox: 2.10-r3::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo sys-devel/automake: 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.25-r2::gentoo sys-devel/gcc: 6.3.0::overlayee, 7.0.0_pre9999::overlayee sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r3::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: git://github.com/funtoo/ports-2012.git priority: -1000 compiz-reloaded location: /var/lib/portage-overlays/compiz-reloaded sync-type: git sync-uri: https://github.com/kajzersoze/compiz-reloaded-overlay masters: gentoo overlayee location: /usr/local/overlayee/local masters: gentoo gentoo-mate location: /var/lib/layman/gentoo-mate masters: gentoo priority: 50 torbrowser location: /var/lib/layman/torbrowser masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" 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="-march=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--alphabetical --keep-going --with-bdeps=y --complete-graph --usepkg" FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=native -O2 -pipe" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo" INSTALL_MASK="/etc/systemd/ /usr/lib/systemd/ /lib/systemd/" LANG="de_DE.UTF-8" LDFLAGS="-march=native -O2 -pipe" LINGUAS="de en" MAKEOPTS="-j9 -s" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa alsaplugins amd64 apng appindicator base berkdb branding bzip2 cairo caja cdda cddb cdr cleartype cleartype_hinting consolekit corefonts cracklib crypt cxx dbus device-mapper dhcpd dts dvb dvbpsi dvd dvdarchive dvdnav dvdr encode evdev exif extras faac faad ffmpeg flac fontconfig fonts gdbm gdu gif gpm gtk gtk3 ico iconv icu image-converter introspection ipod ipv6 jpeg jpeg2k lame lcms libass libburn libguess libmpeg2 libnotify lirc mad mate matroska mjpeg mmx modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl ogg opengl openmp openrc-force pam pcre pdf png policykit postproc pulseaudio python qt5 quicktime rar readline resolvconf sndfile sse sse2 ssl startup-notification svg taglib tcpd themes theora tiff truetype twolame type1 udev udisks ungoogled unicode usb v4l vdpau vorbis vpx wav wavpack webp widevine win32codecs wmf x264 x265 xattr xcomposite xinerama xml xrandr xscreensaver xvid xvmc zlib zvbi" ABI_X86="64" ALSA_CARDS="emu10k1 hda-intel usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 authn_core authz_core socache_shmcb unixd" 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="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" DVB_CARDS="usb-dib0700" 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="evdev keyboard mouse" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" LIRC_DEVICES="devinput" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21 ruby22 ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia" 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: CPPFLAGS, CTARGET, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Still experiencing this with Firefox 52.0.1.
Same thing is happening with 53.0.
Patches welcome -- I don't have a system with gcc-6.3 available yet to reproduce. As soon as I have the resources I'll see about a fix.
Could you try 53.0 again with default CFLAGS and CXXFLAGS ? ie, "-O2 -march=native -pipe" ? Also please don't use ccache or distcc, in case you are.
Setting those cflags in package.env didn't work, but I'm pretty sure that's because firefox uses its own cflags unless USE=custom-cflags is set. So I tried setting that... no dice, same error. FYI, my last successful build of Firefox was: www-client/firefox-51.0::gentoo was built with the following: USE="dbus gmp-autoupdate hardened jemalloc pulseaudio (skia) -bindist -custom-cflags -custom-optimization -debug -gtk2 -hwaccel -jack (-neon) -pgo (-rust) (-selinux) -startup-notification (-system-cairo) -system-harfbuzz -system-icu -system-jpeg -system-libevent -system-libvpx -system-sqlite -test -wifi" L10N="-ach -af -an -ar -as -ast -az -bg -bn-BD -bn-IN -br -bs -ca -cak -cs -cy -da -de -dsb -el -en-GB -en-ZA -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -id -is -it -ja -ka -kk -km -kn -ko -lij -lt -lv -mai -mk -ml -mr -ms -nb -nl -nn -or -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -uz -vi -xh -zh-CN -zh-TW" CFLAGS="-march=corei7 -pipe -fno-stack-protector" CXXFLAGS="-march=corei7 -pipe -fno-stack-protector -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,now -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,-z,relro,-z,now" That was actually after I updated to GCC 6, according to genlop - but I haven't had a successful build since updating glibc to 2.23-r3 (from 2.22). So maybe GCC 6 isn't the problem after all... I thought it was since the file where the error occurred (cmath) belonged to gcc.
So, I just did a fresh install on a new PC, using GCC 6 right off the bat, and what do you know, Firefox and Thunderbird both compiled successfully first try. New emerge --info: Portage 2.3.2 (python 2.7.13-final-0, funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-6.3.0, glibc-2.23-r3, 4.10.17-gentoo x86_64) ================================================================= System uname: Linux-4.10.17-gentoo-x86_64-Intel-R-_Core-TM-_i7-7700K_CPU_@_4.20GHz-with-gentoo-2.2.1 KiB Mem: 32918808 total, 29796636 free KiB Swap: 4194300 total, 4194300 free sh bash 4.3_p48 ld GNU ld (Funtoo 2.25) 2.25.0 app-shells/bash: 4.3_p48::gentoo dev-lang/perl: 5.24.0-r2::gentoo dev-lang/python: 2.7.13::gentoo, 3.4.6::gentoo dev-util/cmake: 3.8.1::gentoo sys-apps/baselayout: 2.2.1::gentoo sys-apps/openrc: 0.23.2::gentoo sys-apps/sandbox: 2.10-r3::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r2::gentoo sys-devel/automake: 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo sys-devel/binutils: 2.25-r2::gentoo sys-devel/gcc: 5.4.0::gentoo, 6.3.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r3::gentoo Repositories: gentoo location: /usr/portage sync-type: git sync-uri: git://github.com/funtoo/ports-2012.git priority: -1000 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -mtune=native -pipe -maes -fomit-frame-pointer -fno-stack-protector -freorder-blocks-and-partition -frename-registers -fweb -fgcse-las -fgcse-sm -fgcse-after-reload -fpredictive-commoning -fipa-pta -ftree-loop-ivcanon -ftree-loop-im -fivopts -ftracer -ftree-partial-pre -ftree-loop-distribution -ftree-loop-distribute-patterns -ftree-loop-if-convert -ftree-vectorize " CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /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 -march=native -mtune=native -pipe -maes -fomit-frame-pointer -fno-stack-protector -freorder-blocks-and-partition -frename-registers -fweb -fgcse-las -fgcse-sm -fgcse-after-reload -fpredictive-commoning -fipa-pta -ftree-loop-ivcanon -ftree-loop-im -fivopts -ftracer -ftree-partial-pre -ftree-loop-distribution -ftree-loop-distribute-patterns -ftree-loop-if-convert -ftree-vectorize " DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-mtune=generic -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -fuse-linker-plugin -s -Wl,-z,now" MAKEOPTS="-j9" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl alsa amd64 apng berkdb bluray bzip2 cdda cddb cdio cdr consolekit cracklib crypt cups cxx dbus declarative dri dts dvd dvdr dvdread encode exif faac faad ffmpeg flac gdbm gif gpm ico iconv icu ieee1394 introspection ios ipod ipv6 jpeg jpeg2k kde kipi lame libass libguess libmpeg2 mad matroska mjpeg mmx modules mp3 mpeg mtp mudflap multilib ncurses nls nptl nsplugin ogg opengl openmp pam pcre pdf phonon plasma png policykit postproc pppd python qml qt5 quicktime readline resolvconf semantic-desktop sndfile sse sse2 ssl svg taglib tcpd theora tiff truetype twolame udev unicode v4l vorbis vpx wav wavpack webp widgets win32codecs wmf x264 x265 xattr xcomposite xinerama xml xscreensaver xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel ice1724 intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 authn_core authz_core socache_shmcb unixd" 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 pc" INPUT_DEVICES="evdev synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="NVPTX" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21 ruby22 ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia" 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: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
It appears that gcc installs a header file ( /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6/x86_64-pc-linux-gnu/bits/c++config.h ) with configuration information. When you upgrade glibc (I went from 2.22-r4 to 2.25-r2), some of that information changes and is no longer correct, causing the error. Recompiling gcc fixed this issue for me, and allowed firefox to be compiled sucessfully. I'm not sure what Gentoo can do about this, except maybe yell this from some rooftops?
Adding toolchain@g.o to CC so they can comment on this.
If you feel I have closed your bug and it is still a current issue, please reopen and update it completely. We will not work bugs that have no ebuild in tree any longer or can not be reproduced with a current system. Thank You for your support and understanding The Mozilla Team