Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 751787 - mail-client/thunderbird-78.4.0 and www-client/firefox-82.0.1 fails with "error: '((& arr[0]) != 0)' is not a constant expression"
Summary: mail-client/thunderbird-78.4.0 and www-client/firefox-82.0.1 fails with "erro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 756688 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-10-29 18:52 UTC by Steffen Hau
Modified: 2020-11-25 13:21 UTC (History)
2 users (show)

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


Attachments
mail-client/thunderbird-78.4.0 build.log (thunderbird-78.4.0-build.log.xz,282.45 KB, application/x-xz)
2020-10-29 18:53 UTC, Steffen Hau
Details
www-client/firefox-82.0.1 build.log (firefox-82.0.1-build.log.xz,520.75 KB, application/x-xz)
2020-10-29 18:54 UTC, Steffen Hau
Details
mail-client/thunderbird-78.4.0 build.log with sane CFLAGS (thunderbird-78.4.0-sane-cflags-build.log.xz,91.29 KB, application/x-xz)
2020-11-02 18:46 UTC, Steffen Hau
Details
mail-client/thunderbird-78.4.0 build.log with sane CFLAGS and LDFLAGS (thunderbird-78.4.0-sane-cflags-ldflags-build.log.xz,92.19 KB, application/x-xz)
2020-11-02 18:47 UTC, Steffen Hau
Details
testing-amd64.pkglist.txt (testing-amd64.pkglist.txt,49.63 KB, text/plain)
2020-11-02 23:15 UTC, Thomas Deutschmann (RETIRED)
Details
stable-amd64.pkglist.txt (stable-amd64.pkglist.txt,32.69 KB, text/plain)
2020-11-02 23:15 UTC, Thomas Deutschmann (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Hau 2020-10-29 18:52:28 UTC
See attached build.logs of both packages.

emerge --info firefox thunderbird
Portage 3.0.8 (python 3.8.6-final-0, default/linux/amd64/17.1/systemd, gcc-10.2.0, glibc-2.32-r2, 5.8.3-HAUIHAU x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.8.3-HAUIHAU-x86_64-Intel-R-_Core-TM-_i5-6200U_CPU_@_2.30GHz-with-glibc2.2.5
KiB Mem:     8031524 total,   2432100 free
KiB Swap:   16777208 total,   9995704 free
Timestamp of repository gentoo: Wed, 28 Oct 2020 08:35:25 +0000
Head commit of repository gentoo: 57ff709ab90b31ba7724723b3031e8e6f774928c

sh bash 5.0_p18
ld GNU gold (Gentoo 2.35.1 p1 2.35.1) 1.16
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3-r1::gentoo
dev-lang/python:          2.7.18-r4::gentoo, 3.8.6::gentoo, 3.9.0::gentoo
dev-util/cmake:           3.18.4::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2::gentoo
sys-devel/binutils:       2.35.1::gentoo
sys-devel/gcc:            10.2.0-r2::gentoo
sys-devel/gcc-config:     2.3.2::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.9::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

hauihau
    location: /usr/local/portage/hauihau
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe -flto=5 -fuse-linker-plugin"
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"
CXXFLAGS="-march=native -O3 -pipe -flto=5 -fuse-linker-plugin -fno-delete-null-pointer-checks -flifetime-dse=1"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --keep-going=y --quiet-build=y --quiet-fail=y --with-bdeps=y --changed-deps-report=n"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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 fakeroot fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch parallel-install 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 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.utf8"
LDFLAGS="-march=native -O3 -pipe -flto=5 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe"
LINGUAS="de"
MAKEOPTS="-j5"
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="/home/gentoo/tmp/"
USE="X a52 aac aalib acl alsa amd64 avx avx2 bash-completion berkdb bluetooth bluray branding bzip2 cairo caps cdda cddb cdparanoia cdr cli crypt cups curl cxx dbus dga dri dts dv dvd egl encode exif ffmpeg flac fontconfig fortran ftp gd gdbm gif gmp gstreamer iconv icu imagemagick imlib ipv6 jpeg jpeg2k kde kerberos lame libcaca libglvnd libnotify libsamplerate libtirpc lzma lzo mad matroska mmx mmxext mng mp3 mpeg mtp multilib musepack ncurses networkmanager nls nptl nsplugin ogg openal opengl openmp opus pam pcre pdf png policykit pulseaudio qt5 quicktime readline seccomp sndfile spell split-usr sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 svg syslog systemd tcpd theora threads tiff truetype udev unicode upower usb v4l vaapi vcd vim-syntax vorbis wavpack wayland webkit x264 xattr xcb xcomposite xinerama xml xmp xorg xosd xpm xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" 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="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="i965 intel 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, INSTALL_MASK, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

www-client/firefox-80.0.1-r1::gentoo was built with the following:
USE="custom-cflags custom-optimization dbus gmp-autoupdate lto openh264 pulseaudio screenshot system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -bindist -clang -debug -eme-free -geckodriver -hardened -hwaccel -jack -pgo -screencast (-selinux) -test -wifi" ABI_X86="(64)" CPU_FLAGS_X86="avx2" L10N="de -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -cak -cs -cy -da -dsb -el -en-CA -en-GB -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 -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tr -uk -ur -uz -vi -xh -zh-CN -zh-TW"
CFLAGS="-march=native -pipe -fuse-linker-plugin"
CXXFLAGS="-march=native -pipe -fuse-linker-plugin -fno-delete-null-pointer-checks -flifetime-dse=1 -flifetime-dse=1"
FEATURES="strict sfperms userpriv config-protect-if-modified userfetch pid-sandbox unmerge-orphans preserve-libs ipc-sandbox assume-digests fixlafiles distlocks xattr binpkg-docompress parallel-fetch unmerge-logs unknown-features-warn binpkg-dostrip usersandbox metadata-transfer multilib-strict news protect-owned fakeroot merge-sync qa-unresolved-soname-deps sandbox binpkg-logs usersync network-sandbox parallel-install ebuild-locks"
LDFLAGS="-march=native -pipe -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,--compress-debug-sections=zlib"


mail-client/thunderbird-68.12.0::gentoo was built with the following:
USE="custom-cflags custom-optimization dbus gmp-autoupdate lto pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-sqlite system-webp wayland -bindist -clang -debug -eme-free -hardened -jack -lightning (-pgo) (-selinux) -startup-notification -system-libvpx -test -wifi" ABI_X86="(64)" CPU_FLAGS_X86="avx2" L10N="de -ar -ast -be -bg -br -ca -cak -cs -cy -da -dsb -el -en-GB -es-AR -es-ES -et -eu -fi -fr -fy -ga -gd -gl -he -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -ko -lt -ms -nb -nl -nn -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -sq -sr -sv -tr -uk -uz -vi -zh-CN -zh-TW"
CFLAGS="-march=native -pipe -fuse-linker-plugin"
CXXFLAGS="-march=native -pipe -fuse-linker-plugin -fno-delete-null-pointer-checks -flifetime-dse=1 -flifetime-dse=1 -flto"
FEATURES="config-protect-if-modified merge-sync userpriv unmerge-logs assume-digests pid-sandbox distlocks unmerge-orphans ebuild-locks ipc-sandbox fixlafiles multilib-strict protect-owned metadata-transfer userfetch usersandbox binpkg-dostrip binpkg-docompress preserve-libs network-sandbox sandbox strict usersync qa-unresolved-soname-deps sfperms parallel-install unknown-features-warn parallel-fetch news binpkg-logs fakeroot xattr"
LDFLAGS="-march=native -pipe -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe -Wl,-rpath=/usr/lib64/thunderbird,--enable-new-dtags -Wl,--compress-debug-sections=zlib"


As the ebuild switched from eclass and use flags are changed, here is also the output of emerge -pv1 firefox thunderbird:
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] www-client/firefox-82.0.1:0/82::gentoo [80.0.1-r1:0/0::gentoo] USE="dbus gmp-autoupdate lto openh264 pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp wayland -clang -debug -eme-free -geckodriver -hardened -hwaccel -jack -pgo -screencast (-selinux) -wifi (-bindist%) (-custom-cflags%*) (-custom-optimization%*) (-screenshot%*) (-test%)" CPU_FLAGS_X86="(-avx2%*)" L10N="de -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia% -cak -cs -cy -da -dsb -el -en-CA -en-GB -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 -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -ne% -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tl% -tr -trs% -uk -ur -uz -vi -xh -zh-CN -zh-TW" 0 KiB
[ebuild     U  ] mail-client/thunderbird-78.4.0:0/78::gentoo [68.12.0:0/0::gentoo] USE="dbus lto openh264%* pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx* system-webp wayland -clang -debug -eme-free -hardened -jack (-pgo) (-selinux) -wifi (-bindist%) (-custom-cflags%*) (-custom-optimization%*) (-gmp-autoupdate%*) (-lightning%) (-startup-notification%) (-system-sqlite%*) (-test%)" CPU_FLAGS_X86="(-avx2%*)" L10N="de -af% -ar -ast -be -bg -br -ca -cak -cs -cy -da -dsb -el -en-CA% -en-GB -es-AR -es-ES -et -eu -fa% -fi -fr -fy -ga -gd -gl -he -hr -hsb -hu -hy -id -is -it -ja -ka -kab -kk -ko -lt -ms -nb -nl -nn -pa% -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -sq -sr -sv -th% -tr -uz -vi -zh-CN -zh-TW (-uk%)" 0 KiB


Reproducible: Always
Comment 1 Steffen Hau 2020-10-29 18:53:35 UTC
Created attachment 669206 [details]
mail-client/thunderbird-78.4.0 build.log
Comment 2 Steffen Hau 2020-10-29 18:54:08 UTC
Created attachment 669209 [details]
www-client/firefox-82.0.1 build.log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-29 19:57:25 UTC
How about with vanilla CFLAGS?

CFLAGS="-O2 -march=native -pipe"
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2020-10-29 20:40:29 UTC
And please fix your LDFLAGS.
Comment 5 Steffen Hau 2020-11-01 13:43:40 UTC
(In reply to Sam James from comment #3)
> How about with vanilla CFLAGS?
> 
> CFLAGS="-O2 -march=native -pipe"

My Flags have worked without any issues with prior versions. FF/TB have both a lto use flag, so why should I remove the flags?
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-01 13:46:22 UTC
(In reply to Steffen Hau from comment #5)
> (In reply to Sam James from comment #3)
> > How about with vanilla CFLAGS?
> > 
> > CFLAGS="-O2 -march=native -pipe"
> 
> My Flags have worked without any issues with prior versions. FF/TB have both
> a lto use flag, so why should I remove the flags?

Because it's important to figure out where the issue is. Plus the LTO flags *add things for you*, so you don't need to set it yourself.

Please engage with us on bugs.
Comment 7 Steffen Hau 2020-11-01 13:48:03 UTC
(In reply to Thomas Deutschmann from comment #4)
> And please fix your LDFLAGS.

I don't see what I can fix in my LDFLAGS. They worked with previous versions without any issue.
Comment 8 Steffen Hau 2020-11-01 13:53:06 UTC
(In reply to Sam James from comment #6)
> (In reply to Steffen Hau from comment #5)
> > (In reply to Sam James from comment #3)
> > > How about with vanilla CFLAGS?
> > > 
> > > CFLAGS="-O2 -march=native -pipe"
> > 
> > My Flags have worked without any issues with prior versions. FF/TB have both
> > a lto use flag, so why should I remove the flags?
> 
> Because it's important to figure out where the issue is. Plus the LTO flags
> *add things for you*, so you don't need to set it yourself.
> 
> Please engage with us on bugs.

I need the flags for other packages which do not add things for me. If you have a look at the ebuilds, they are filtering out -flto from *FLAGS in src_configure. If I remove them, it would make no difference. The only difference would be -O2 vs. -O3.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-01 13:55:47 UTC
(In reply to Steffen Hau from comment #8)
> 
> I need the flags for other packages which do not add things for me. If you
> have a look at the ebuilds, they are filtering out -flto from *FLAGS in
> src_configure. If I remove them, it would make no difference. The only
> difference would be -O2 vs. -O3.

I was just asking for you to re-attempt to attempt to narrow down the problem. The Mozilla build system is not simple.
Comment 10 Steffen Hau 2020-11-01 14:04:23 UTC
(In reply to Sam James from comment #9)
> (In reply to Steffen Hau from comment #8)
> > 
> > I need the flags for other packages which do not add things for me. If you
> > have a look at the ebuilds, they are filtering out -flto from *FLAGS in
> > src_configure. If I remove them, it would make no difference. The only
> > difference would be -O2 vs. -O3.
> 
> I was just asking for you to re-attempt to attempt to narrow down the
> problem. The Mozilla build system is not simple.

I totally understand your approach to narrow down the cause. But there is really no need to adjust and *FLAGS, because according to the build.logs the ebuild has already done what you suggested:
* Current CFLAGS:    -march=native -O3 -pipe -flto=9 -fuse-linker-plugin
* Current LDFLAGS:   -march=native -O3 -pipe -flto=9 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe
* Current RUSTFLAGS:
true
* Build CFLAGS:    -march=native -pipe -fuse-linker-plugin
* Build LDFLAGS:   -march=native -pipe -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe -Wl,--compress-debug-sections=zlib -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags
* Build RUSTFLAGS:
Comment 11 Steffen Hau 2020-11-01 14:15:39 UTC
I have adjusted the CFLAGS from -O3 to -O2 with a package.env override and the issue persists.
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2020-11-01 14:22:21 UTC
You are the only one having this problem at the moment. You want help from us. If you are unwilling to help looking into this "because it worked for you in the past" there is nothing we can do for you. 

You even have CFLAGS in LDFLAGS. That is not valid. Previous firefox ebuilds filtered invalid flags but we no longer do that for you.

Nobody is going to spend time on anything like that.

Closing as CANTFIX because I really don't know how we can help you without a minimum of assistance. Keep in mind that you have the problem, on our systems we have a working firefox package...
Comment 13 Steffen Hau 2020-11-01 15:42:17 UTC
(In reply to Thomas Deutschmann from comment #12)
> You are the only one having this problem at the moment. You want help from
> us. If you are unwilling to help looking into this "because it worked for
> you in the past" there is nothing we can do for you. 
Sorrry, but where did I say that I'm unwilling to help? Is it forbidden to ask *why* I should change things which have worked before without any issues?


> You even have CFLAGS in LDFLAGS. That is not valid. Previous firefox ebuilds
> filtered invalid flags but we no longer do that for you.
Please give me a source for your assertion that CFLAGS are not valid in LDFLAGS. If you want to use LTO, you have to at least add -flto to LDFLAGS, a lot of blogs suggested to just add CFLAGS to LDFLAGS as this does no harm, also Debian mentions that https://wiki.debian.org/LTO.

And just for clarification: none of my flags are invalid, previous firefox ebuilds didn't filter any of them. 

Flags according to emerge --info:
CFLAGS="-march=native -O3 -pipe -flto=5 -fuse-linker-plugin"
CXXFLAGS="-march=native -O3 -pipe -flto=5 -fuse-linker-plugin -fno-delete-null-pointer-checks -flifetime-dse=1"
LDFLAGS="-march=native -O3 -pipe -flto=5 -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe"

Flags tb-68/ff-80 was installed with:
CFLAGS="-march=native -pipe -fuse-linker-plugin"
CXXFLAGS="-march=native -pipe -fuse-linker-plugin -fno-delete-null-pointer-checks -flifetime-dse=1 -flifetime-dse=1"
LDFLAGS="-march=native -pipe -fuse-linker-plugin -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe -Wl,-rpath=/usr/lib64/firefox,--enable-new-dtags -Wl,--compress-debug-sections=zlib"

You may have seen that by yourself if you would have looked long enough at the info I provided in comment #1.


> Nobody is going to spend time on anything like that.
> 
> Closing as CANTFIX because I really don't know how we can help you without a
> minimum of assistance. Keep in mind that you have the problem, on our
> systems we have a working firefox package...
This was a bit too fast, wasn't it? Look at comment 11, I have done what Sam asked and that did not change anything. While writing these lines, I have also tried to compile both with no customized LDFLAGS, nothing changed. So, if you have a working firefox package, wouldn't it make more sense to tell me, what FLAGS you have used and ask me to try to compile TB/FF with these flags?
Comment 14 Steffen Hau 2020-11-02 18:44:20 UTC
I tried to see what else may cause the error, so I tried to compile TB with LTO disabled (*FLAGS=-fno-lto and USE=-lto) and I have still the error with the const.

Second try:  I created a package.env file for TB with the content:
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS} -fno-delete-null-pointer-checks -flifetime-dse=1"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--gc-sections -Wl,--icf=safe"
and I still have the error with the const.

Third attempt: I also removed my "special" LDFLAGS completely and the error with const is still there.

I'll attach both build.log of attempt two and three for comparison. (I've chosen TB as the error occurs at the beggining.)

I hope I showed you enough will to find the cause of this issue, even though changing *FLAGS have sadly fixed nothing.

May I suggest that we compare the e.g. packages and versions needed to compile TB/FF between your working systems and my "broken" systems?
Comment 15 Steffen Hau 2020-11-02 18:46:58 UTC
Created attachment 669791 [details]
mail-client/thunderbird-78.4.0 build.log with sane CFLAGS
Comment 16 Steffen Hau 2020-11-02 18:47:25 UTC
Created attachment 669794 [details]
mail-client/thunderbird-78.4.0 build.log with sane CFLAGS and LDFLAGS
Comment 17 Thomas Deutschmann (RETIRED) gentoo-dev 2020-11-02 19:27:03 UTC
It's enough to focus on one program for now, I suggest firefox (thunderbird is based on firefox).

Download latest stage3, chroot into that environment and try to reproduce. Please tell us if you need more instructions on this.

Once you are able to reproduce the issue in a clean stage3 environment please post how to reproduce.
Comment 18 Steffen Hau 2020-11-02 20:09:26 UTC
emerge -pve firefox
[snip]
Total: 497 Packages (7 upgrades, 490 reinstalls)

...installing firefox in a stage3 chroot will take a couple of hours. Before I start with that, what about my last question to compare the systems? I can attach the complete output of the above command to compare the package versions and enabled/disabled use flags..
Comment 19 Steffen Hau 2020-11-02 20:12:34 UTC
And for clarification: what do you understand by "clean"? I guess that even differing use flags of depending packages may be the cause of issues. I don't want to waste CPU hours by multiple change use flags and rebuild cycles.
Comment 20 Thomas Deutschmann (RETIRED) gentoo-dev 2020-11-02 23:15:00 UTC
Created attachment 669803 [details]
testing-amd64.pkglist.txt

I am not sure how comparing packages should work but sure.


Clean environment means that the steps to reproduce the problems start with unpacking latest stage3 archive from https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/current-stage3-amd64/. This will be your basis. Now you can be sure that *no* other interfering packages *or settings* are installed. In theory you would just do

`echo "www-client/firefox lto" >> /etc/portage/package.use` (because it looks like you are interested in LTO)
`emerge firefox`

Now you will hopefully see that firefox-78.x emerges without any problems which proofs that there is no general problem with the package (but that's not the important point here, we are happy to accept any found bug). If this is working for you you, you can now add you changes step by step and will hopefully find the reason what's causing the failure you are currently experiencing.
Comment 21 Thomas Deutschmann (RETIRED) gentoo-dev 2020-11-02 23:15:13 UTC
Created attachment 669806 [details]
stable-amd64.pkglist.txt
Comment 22 Thomas Deutschmann (RETIRED) gentoo-dev 2020-11-02 23:24:00 UTC
If you are using IRC, feel free to join us in #gentoo-moz at Freenode which might speed this up.
Comment 23 Steffen Hau 2020-11-11 18:22:36 UTC
(In reply to Thomas Deutschmann from comment #20)
> Created attachment 669803 [details]
> testing-amd64.pkglist.txt
> 
> I am not sure how comparing packages should work but sure.
Looking at your list showed me within a couple of seconds a major difference between your system and mine: opposed to me you have the clang USE flag enabled! Perhaps you have missed that important diference..

I've enabled the flag too and TB/FF compiled without the issue, so we have a winner here: GCC is not happy with the code while clang is. How to we go on with that? Would you mind reporting the issue upstream?
Comment 24 Thomas Deutschmann (RETIRED) gentoo-dev 2020-11-11 20:27:40 UTC
Well, I tested both like you can see: ESR is using GCC.

I cannot reproduce with latest stable and unstable GCC.

So no, sorry. I am not going to report something upstream I cannot reproduce by myself.
Comment 25 Steffen Hau 2020-11-15 10:12:13 UTC
I had some spare time to continue investigating. I wanted to share my result with you: I came to the conclusion that "-fno-delete-null-pointer-checks" is causing the error when GCC is used. I've added that compiler option to my global CXXFLAGS back in the time when GCC-6 was released (together with -flifetime-dse=1) because of many broken packages (like QT/KDE Plasma) at that time. I've removed them both from my global CXXFLAGS and TB/FF compiled without any issues with the latest GCC (10.2.0).

Thank you for your time and sorry for bothering you!
Comment 26 flippynelle 2020-11-25 13:21:46 UTC
*** Bug 756688 has been marked as a duplicate of this bug. ***