[Linux] Fails to build with gcc and --enable-lto
Categories
(Firefox Build System :: General, defect)
Tracking
(firefox83 fixed)
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: stransky, Assigned: glandium)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
When gcc, PGO and --enable-lto is used, Firefox fails to build. plugin-container fails to link with:
/usr/bin/g++ -std=gnu++17 -o ../../dist/bin/plugin-container [...]
/usr/bin/ld: warning: libmozgtk.so, needed by ../../toolkit/library/build/libxul.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: ../../toolkit/library/build/libxul.so: undefined reference to gtk_file_chooser_set_do_overwrite_confirmation' /usr/bin/ld: ../../toolkit/library/build/libxul.so: undefined reference to
gtk_main_iteration'
[...]
The link chain is libxul.so -> libmozgtk_stub.so -> libmozgtk.so, but there isn't a build dependency between libmozgtk_stub.so and libmozgtk.so.
As there's no dependency between libxul.so/libmozgtk.so in the build system on the second phase of PGO build only libmozgtk_stub.so so at widget/gtk/mozgtk/stub directory is built and widget/gtk/mozgtk/gtk3 and widget/gtk/mozgtk/gtk2 are missing.
when I manually trigger linking of widget/gtk/mozgtk/gtk3, libmozgtk.so is created and plugin-container is linked correctly.
Mike, how is this handled with clang? Do you allow undefined dependencies for libxul.so or so?
Thanks.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Wow, this is race condition that has been possible since bug 1573566 but apparently never happened until now, I'm baffled.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Bug 1573566 moved libxul from toolkit/library to toolkit/library/build,
and that should be reflected in config/recurse.mk.
It's amazing the race condition hasn't caused problems earlier than now.
Assignee | ||
Comment 3•4 years ago
|
||
Martin, can you confirm it works for you?
Comment 6•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•