Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 792483 - www-client/firefox[clang]: building fails if LDFLAGS not manually overridden (ld.lld: error: undefined symbol: _Unwind_Resume)
Summary: www-client/firefox[clang]: building fails if LDFLAGS not manually overridden ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
: 792675 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-27 13:01 UTC by Adel KARA SLIMANE
Modified: 2021-06-01 15:00 UTC (History)
3 users (show)

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


Attachments
Firefox build.log without fix (firefox-build-fail.7z,339.20 KB, application/x-7z-compressed)
2021-05-27 13:01 UTC, Adel KARA SLIMANE
Details
emerge -pqv (emerge-pqv,733 bytes, text/plain)
2021-05-27 13:01 UTC, Adel KARA SLIMANE
Details
emerge --info (emerge-info,8.72 KB, text/plain)
2021-05-27 13:02 UTC, Adel KARA SLIMANE
Details
firefox-build-fail.log.xz (firefox-build-fail.log.xz,320.78 KB, application/x-xz)
2021-05-27 17:52 UTC, Ionen Wolkens
Details

Note You need to log in before you can comment on or make changes to this bug.
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 [1], 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 1 Adel KARA SLIMANE 2021-05-27 13:01:34 UTC
Created attachment 711738 [details]
emerge -pqv
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 [1]

[1] https://wiki.gentoo.org/wiki/Clang
Comment 4 Ionen Wolkens gentoo-dev 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 gentoo-dev 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.
Comment 8 Toralf Förster gentoo-dev 2021-05-28 18:57:12 UTC
*** Bug 792675 has been marked as a duplicate of this bug. ***