libmozgtk not linked in with --as-needed
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox-esr78 unaffected, firefox88 unaffected, firefox89 unaffected, firefox90 fixed)
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox88 | --- | unaffected |
firefox89 | --- | unaffected |
firefox90 | --- | fixed |
People
(Reporter: streetwalkermc, Assigned: glandium)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Bug 1706452 reintroduced an empty libmozgtk to load GTK before libmozwayland, but building with --as-needed
results in libmozgtk being dropped by the linker, and not appearing in dependentlibs.list.
The fix attempts to handle this situation, but in practice it doesn't look like this is working right. This was observed in the nightly builds provided by Arch Linux's Firefox package maintainer (https://pkgbuild.com/~heftig/packages/firefox-nightly/PKGBUILD). This package uses lld and Arch sets --as-needed
distribution-wide. Jan has confirmed that dropping this linker flag does indeed result in libxul linking against libmozgtk, but pulls in a lot of otherwise unnecessary dependencies (https://bugzilla.mozilla.org/show_bug.cgi?id=1706452#c28)
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
When the linker defaults to --as-needed, libmozgtk ends up not linked
to libxul because libxul doesn't use anything from it.
We solve the problem by adding a symbol to mozgtk and have libxul use
it.
In bug 1377445, we moved XShmQueryExtension to mozglue. While libxul
currently doesn't use the symbol (it's a workaround for system
libraries), we can move the function back to mozgtk and add a dummy
call.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
(In reply to novenary from comment #0)
but pulls in a lot of otherwise unnecessary dependencies (https://bugzilla.mozilla.org/show_bug.cgi?id=1706452#c28)
The lists are identical, except for the order and libmozgtk.so.
dependentlibs.list only lists the libraries that are bundled together with Firefox, I think Jan means those libraries end up linking against system libraries they don't need.
Updated•3 years ago
|
Comment 4•3 years ago
|
||
Set release status flags based on info from the regressing bug 1377445
Comment 6•3 years ago
|
||
bugherder |
Description
•