|Summary:||www-client/firefox[clang]: building fails if LDFLAGS not manually overridden (ld.lld: error: undefined symbol: _Unwind_Resume)|
|Product:||Gentoo Linux||Reporter:||Adel KARA SLIMANE <adel.ks>|
|Component:||Current packages||Assignee:||Mozilla Gentoo Team <mozilla>|
|Severity:||normal||CC:||herrtimson, ionen, toralf|
|Package list:||Runtime testing required:||---|
Firefox build.log without fix
Description Adel KARA SLIMANE 2021-05-27 13:01:14 UTC
Created attachment 711735 [details] Firefox build.log without fix Hello, I was failing to build Firefox for a while thinking it will get sorted out with an update. But it did not. While reading the Clang Gentoo Wiki , I learned about building packages with clang and they suggest the following env update in a per-package basis: /etc/portage/env/compiler-clang ``` CC="clang" CXX="clang++" LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind" ``` After I did this for Firefox, it could compile properly. Please find attached the build.log of Firefox without the fix above (so emerged as-is without any change), called `firefox-build-fail.7z`.
Comment 2 Adel KARA SLIMANE 2021-05-27 13:02:07 UTC
Created attachment 711744 [details] emerge --info
Comment 3 Adel KARA SLIMANE 2021-05-27 13:02:39 UTC
Forgot the put the link for the Clang wiki   https://wiki.gentoo.org/wiki/Clang
Comment 4 Ionen Wolkens 2021-05-27 17:52:39 UTC
Created attachment 711780 [details] firefox-build-fail.log.xz (please don't use 7z for logs, re-attaching your log using xz for convenience)
Comment 5 Adel KARA SLIMANE 2021-05-27 17:54:47 UTC
Noted! I will use `xz` to compress logs from now on.
Comment 6 Ionen Wolkens 2021-05-27 17:58:11 UTC
9:15.60 ld.lld: error: undefined symbol: _Unwind_Resume Are you using default-* flags on sys-devel/clang by any chances? "Normally" setting anything clang-related isn't needed for firefox[clang] `emerge -pvq sys-devel/clang` output might help Probably(?) a duplicate of bug #791430 (In reply to Adel KARA SLIMANE from comment #5) > Noted! I will use `xz` to compress logs from now on. Well, only when logs are over 1MB though, leave uncompressed otherwise.
Comment 7 Adel KARA SLIMANE 2021-05-27 18:04:32 UTC
> Are you using default-* flags on sys-devel/clang by any chances? "Normally" setting anything clang-related isn't needed for firefox[clang] Yes I do have `default-compiler-rt default-lld` USE flags enabled. Now that you bring it up this must be the culprit ! ``` [ebuild R ] sys-devel/clang-12.0.0-r1 USE="default-compiler-rt default-lld static-analyzer xml -debug -default-libcxx -doc -test" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARC -ARM -AVR (-CSKY) -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore" PYTHON_SINGLE_TARGET="python3_8 -python3_7 -python3_9" ``` > Probably(?) a duplicate of bug #791430 It really seems like it! And I seem to have more information on the matter, then. I will post there my fix and see if it fixes his issue. > Well, only when logs are over 1MB though, leave uncompressed otherwise. Yes, exactly.