Build failure with mold linker: DT_RELR without GLIBC_ABI_DT_RELR dependency
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr102 unaffected, firefox-esr115 unaffected, firefox116 wontfix, firefox117 fixed, firefox118 fixed)
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox-esr115 | --- | unaffected |
firefox116 | --- | wontfix |
firefox117 | --- | fixed |
firefox118 | --- | fixed |
People
(Reporter: amit.prakash.ambasta, Assigned: glandium)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
419 bytes,
text/plain
|
Details | |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
Steps to reproduce:
- Configure mozbuild to use mold
ac_add_options --enable-linker=mold
- Build firefox
./mach build -j1
Actual results:
Build failure with
2:03.77 error: failed to run custom build command for proc-macro2 v1.0.59
2:03.77 note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
2:03.77 Caused by:
2:03.77 process didn't exit successfully: /home/firefox/firefox_build/release/build/proc-macro2-5215be08b7af038e/build-script-build
(exit status: 127)
2:03.77 --- stderr
2:03.77 /home/firefox/firefox_build/release/build/proc-macro2-5215be08b7af038e/build-script-build: error while loading shared libraries: /home/firefox/firefox_build/release/build/proc-macro2-5215be08b7af038e/build-script-build: DT_RELR without GLIBC_ABI_DT_RELR dependency
Expected results:
Build should succeed.
Reporter | ||
Comment 1•10 months ago
|
||
Added mozconfig used to build firefox
Comment 2•10 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox Build System::General' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•10 months ago
|
||
I am facing the same issue on Arch linux when building either librewolf or firedragon from source. It appears to be a regression, as the 115 version still builds successfully. My error log (trying to compile firewolf 116):
error: failed to run custom build command for proc-macro2 v1.0.59
0:42.35 note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
0:42.35 Caused by:
0:42.35 process didn't exit successfully: /compile/makepkg/firedragon/src/firefox-116.0.1/obj/release/build/proc-macro2-c90cdd8afb47e91e/build-script-build
(exit status: 127)
0:42.35 --- stderr
0:42.35 /compile/makepkg/firedragon/src/firefox-116.0.1/obj/release/build/proc-macro2-c90cdd8afb47e91e/build-script-build: error while loading shared libraries: /compile/makepkg/firedragon/src/firefox-116.0.1/obj/release/build/proc-macro2-c90cdd8afb47e91e/build-script-build: DT_RELR without GLIBC_ABI_DT_RELR dependency
0:42.58 make[4]: *** [/compile/makepkg/firedragon/src/firefox-116.0.1/config/makefiles/rust.mk:434: force-cargo-library-build] Error 101
0:42.58 make[3]: *** [/compile/makepkg/firedragon/src/firefox-116.0.1/config/recurse.mk:72: toolkit/library/rust/target] Error 2
0:42.58 make[3]: *** Waiting for unfinished jobs....
Assignee | ||
Comment 4•10 months ago
|
||
This is a bug in mold. https://github.com/rui314/mold/issues/653#issuecomment-1670274638
We'll have to work around it... in the meantime, please use another linker.
Assignee | ||
Comment 5•10 months ago
|
||
Updated•10 months ago
|
Comment 6•10 months ago
|
||
Set release status flags based on info from the regressing bug 1839743
Comment 7•10 months ago
|
||
This issue appears to have been fixed by mold with commit f467ad1add2ab6e381e0e458f026df197e63d487
: https://github.com/rui314/mold/commit/f467ad1add2ab6e381e0e458f026df197e63d487
Librewolf 116 now compiles successfully with the AUR-package mold-git
(only relevant for archlinux users).
(In reply to Mike Hommey [:glandium] from comment #4)
This is a bug in mold. https://github.com/rui314/mold/issues/653#issuecomment-1670274638
We'll have to work around it... in the meantime, please use another linker.
Would a workaround still be required if it is already fixed in the linker?
Assignee | ||
Comment 8•10 months ago
|
||
Would a workaround still be required if it is already fixed in the linker?
Already released versions of the linker are not fixed. There's also no version containing the fix currently.
Comment 9•10 months ago
|
||
(In reply to Mike Hommey [:glandium] from comment #8)
Would a workaround still be required if it is already fixed in the linker?
Already released versions of the linker are not fixed. There's also no version containing the fix currently.
You are correct, I am not quite sure when the next release for mold will be. It might still be useful to find a workaround.
Also, it looks like I might've spoken too soon. The first build succeeded, but the second (PGO) build failed. I will retry tomorrow to check whether or not this is a one-off issue.
Comment 10•9 months ago
|
||
Small update: it appears only PGO builds fail when using mold-git. The new error message:
24:40.58 mold: fatal: /tmp/lto-llvm-a1d87e.o: REL-type relocation table is not supported for this target
24:40.60 clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
24:40.61 make[4]: *** [/home/maxy/.cache/paru/clone/librewolf/src/librewolf-116.0.2-1/config/rules.mk:532: libmozsqlite3.so] Error 1
24:40.61 make[3]: *** [/home/maxy/.cache/paru/clone/librewolf/src/librewolf-116.0.2-1/config/recurse.mk:72: config/external/sqlite/target] Error 2
I am not quite sure if this is an issue with mold or firefox, so I have made a bug report on their github page too: https://github.com/rui314/mold/issues/1085.
Comment 11•9 months ago
|
||
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/721a5102bc50 Don't use -z,pack-relative-relocs when it would lead to a ld.so error. r=firefox-build-system-reviewers,ahochheiden
Comment 12•9 months ago
|
||
bugherder |
Comment 13•9 months ago
|
||
The patch landed in nightly and beta is affected.
:glandium, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox117
towontfix
.
For more information, please visit BugBot documentation.
Updated•9 months ago
|
Assignee | ||
Comment 14•9 months ago
|
||
Comment on attachment 9348012 [details]
Bug 1847697 - Don't use -z,pack-relative-relocs when it would lead to a ld.so error.
Beta/Release Uplift Approval Request
- User impact if declined: Startup failure in some build configurations
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): NPOTB
- String changes made/needed: N/A
- Is Android affected?: No
Comment 15•9 months ago
|
||
Comment on attachment 9348012 [details]
Bug 1847697 - Don't use -z,pack-relative-relocs when it would lead to a ld.so error.
Approved for 117.0b8.
Comment 16•9 months ago
|
||
uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/cdb782230844
Updated•9 months ago
|
Comment 17•8 months ago
|
||
(In reply to maxy.visser from comment #10)
Small update: it appears only PGO builds fail when using mold-git. The new error message:
24:40.58 mold: fatal: /tmp/lto-llvm-a1d87e.o: REL-type relocation table is not supported for this target 24:40.60 clang-15: error: linker command failed with exit code 1 (use -v to see invocation) 24:40.61 make[4]: *** [/home/maxy/.cache/paru/clone/librewolf/src/librewolf-116.0.2-1/config/rules.mk:532: libmozsqlite3.so] Error 1 24:40.61 make[3]: *** [/home/maxy/.cache/paru/clone/librewolf/src/librewolf-116.0.2-1/config/recurse.mk:72: config/external/sqlite/target] Error 2
I am not quite sure if this is an issue with mold or firefox, so I have made a bug report on their github page too: https://github.com/rui314/mold/issues/1085.
Side note, someone also recently filed this^ build error as bug 1854331 in this bugzilla instance.
Description
•