Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 805212

Summary: www-client/firefox: broken binary after qmerge phase
Product: Gentoo Linux Reporter: Thomas Schneider <qsx>
Component: Current packagesAssignee: Mozilla Gentoo Team <mozilla>
Status: RESOLVED UPSTREAM    
Severity: normal CC: grobian
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: ebuild(1) log
emerge --info

Description Thomas Schneider 2021-07-30 11:16:17 UTC
Created attachment 728244 [details]
ebuild(1) log

www-client/firefox (currently 90.0.2, but the error has happened before) consistently produces a broken binary when installed to the system:
```
# file /usr/lib64/firefox/firefox
/usr/lib64/firefox/firefox:          data
# hexdump -C /usr/lib64/firefox/firefox
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000846e0  00 00 00 00 00 00 00 00                           |........|
000846e8

This is not the case in the ${D} tree (even after strip is run).  A workaround is to create a binpkg of firefox and install that, but this is cumbersome, I have to remember to do it, and unfortunately installing the binpkg erased the Portage workdir so I don’t have the build.log anymore.

Because of the aforementioned workdir purge, reproducing this will take me … *checks qlop* around three hours, but should be doable.

For more information, see the attached logs of invoking ebuild(1) manually and `emerge --info` output.

```
root@coruscant ~ 
# grep firefox /etc/portage/package.env/package.env 
www-client/firefox   clang var-tmp keepworktemp
root@coruscant ~ 
# cat /etc/portage/env/{clang,var-tmp,keepworktemp}
CC="clang"
CXX="clang++"
CFLAGS="${CFLAGS} -flto=thin"
CXXFLAGS="${CXXFLAGS} -flto=thin"
LDFLAGS="-fuse-ld=lld -Wl,-O2 -Wl,--as-needed"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
OBJCOPY="llvm-objcopy"
STRIP="llvm-strip"
PORTAGE_TMPDIR="/var/tmp"
FEATURES="${FEATURES} keepwork keeptemp"
```
Comment 1 Thomas Schneider 2021-07-30 11:18:13 UTC
Created attachment 728247 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-01 05:43:56 UTC
CCing grobian b/c of qmerge.
Comment 3 Fabian Groffen gentoo-dev 2021-08-12 19:14:10 UTC
Where does qmerge come into the picture here?  Are we sure this isn't because of the clang/llvm toolchain overrides?
Comment 4 Joonas Niilola gentoo-dev 2023-07-05 07:47:50 UTC
Hopefully fixed now?