Undefined symbol aom_codec_control first referenced in file ../../../image/decoders/Unified_cpp_image_decoders0.o
Categories
(Core :: Audio/Video: Web Codecs, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox127 | --- | unaffected |
firefox128 | --- | fixed |
firefox129 | --- | fixed |
People
(Reporter: petr.sumbera, Assigned: chunmin)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
Steps to reproduce:
Build on Solaris SPARC failed with:
30:38.49 security/manager/ssl/ipcclientcerts/dynamic-library/libipcclientcerts.so
35:14.49 Undefined first referenced
35:14.49 symbol in file
35:14.49 aom_codec_control ../../../image/decoders/Unified_cpp_image_decoders0.o (symbol scope specifies local binding)
35:14.49 ld: fatal: symbol referencing errors
35:17.93 collect2: error: ld returned 1 exit status
35:17.94 gmake[4]: *** [/builds/psumbera/mozilla-central-build/config/rules.mk:541: ../../../dist/bin/libxul.so] Error 1
Seems to be regression from Bug 1876438.
Reporter | ||
Updated•9 months ago
|
Comment 1•9 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 2•9 months ago
|
||
:chunmin, since you are the author of the regressor, bug 1876438, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Assignee | ||
Comment 3•9 months ago
•
|
||
Hi Petr, Thanks for the report. Does running ./mach clobber
before ./mach build
help? aom_codec_control
has been exposed from gkcodecs
for a while. I am not sure why it causes problem in image/decoders
now. IIUC, the nsAVIFDecoder
is the only one file that touch aom library. Could you try adding USE_LIBS += [ 'gkcodecs' ]
to image/decoders/moz.build
to see if it solves the issue?
Updated•9 months ago
|
Reporter | ||
Comment 4•9 months ago
|
||
I do build from clean workspace. No need for clobber.
In the meantime my hg bissect
on I386 Solaris confirmed:
The first bad revision is:
changeset: 741427:f089bb5743b1
user: Chun-Min Chang <chun.m.chang@gmail.com>
date: Mon Jun 03 11:45:58 2024 -0700
description:
Bug 1876438 - Enable SVC configuration in FFmpegVideoEncoder for libaom r=media-playback-reviewers,padenot
I have tried:
diff -r 8c97559c3a94 -r a26ba0f04542 image/decoders/moz.build
--- a/image/decoders/moz.build Thu Oct 05 00:56:26 2023 -0700
+++ b/image/decoders/moz.build Wed Jun 05 00:25:47 2024 -0700
@@ -58,5 +58,7 @@
CXXFLAGS += ["-Werror=switch"]
+USE_LIBS += [ 'gkcodecs' ]
+
# Add libFuzzer configuration directives
include("/tools/fuzzing/libfuzzer-config.mozbuild")
But it doesn't make difference.
Reporter | ||
Comment 5•9 months ago
|
||
I see that aom_codec_control
is defined in aom_codec.o
nm obj-x86_64-pc-solaris2.11/media/libaom/aom_codec.o | grep aom_codec_control$
[21] | 558| 485|FUNC |GLOB |0 |1 |aom_codec_control
but I don't see anywehere libgkcodecs.so
...
Reporter | ||
Comment 6•9 months ago
|
||
obj-x86_64-pc-solaris2.11/toolkit/library/build/libxul_so.list
is missing libaom
items...
Reporter | ||
Comment 7•9 months ago
|
||
When I revert:
Bug 1876438 - Enable SVC configuration in FFmpegVideoEncoder for libaom r=media-playback-reviewers,padenot
I can still build latest mozilla-central sources.
Questions remains. How shall I make libxul to link libaom
objects...
Reporter | ||
Comment 8•9 months ago
|
||
Mike, I wonder whether you have an idea how obj-x86_64-pc-solaris2.11/media/libaom/*.o
are supposed to get into libxul_so.list
so that they are linked into libxul
?
Comment 9•9 months ago
|
||
media/libaom/*.o are not supposed to get into libxul_so.list. They're supposed to get into libgkcodecs_so.list.
Reporter | ||
Comment 10•9 months ago
|
||
Thank you. Now I have at least limited test case. Though not really sure where is the problem (libgkcodecs.so is included).
$ /usr/gcc/13/lib/gcc/x86_64-pc-solaris2.11/13.2.0/collect2 -G -dy -z text -M /usr/gcc/13/lib/gcc/x86_64-pc-solaris2.11/13.2.0/../../../libgcc-unwind.map -Y P,/lib/amd64:/usr/lib/amd64 -Qy -o ../../../dist/bin/libxul.so -z gnu-version-script-compat /usr/lib/amd64/crti.o /usr/gcc/13/lib/gcc/x86_64-pc-solaris2.11/13.2.0/crtbeginS.o -L/builds/psumbera/epoll -L/builds/psumbera/mozilla-central-build/obj-x86_64-pc-solaris2.11/dist/bin -L/usr/gcc/13/lib/gcc/x86_64-pc-solaris2.11/13.2.0 -L/usr/gcc/13/lib/gcc/x86_64-pc-solaris2.11/13.2.0/../../../amd64 -L/lib/amd64 -L/usr/lib/amd64 -L/usr/gcc/13/lib/gcc/x86_64-pc-solaris2.11/13.2.0/../../.. -lepoll -h libxul.so @/builds/psumbera/mozilla-central-build/obj-x86_64-pc-solaris2.11/toolkit/library/build/libxul_so.list -z text -z now ../../../js/src/build/libjs_static.a ../../../build/pure_virtual/libpure_virtual.a ../../../x86_64-pc-solaris/debug/libgkrust.a ../../../dist/bin/libnspr4.so ../../../dist/bin/libplc4.so ../../../dist/bin/libplds4.so ../../../dist/bin/libgkcodecs.so ../../../dist/bin/liblgpllibs.so ../../../dist/bin/libnss3.so ../../../dist/bin/libnssutil3.so ../../../dist/bin/libsmime3.so ../../../dist/bin/libmozsqlite3.so ../../../dist/bin/libssl3.so ../../../dist/bin/libmozgtk.so --version-script libxul.so.symbols -lsocket -ldl -lpthread -lz -lposix4 -lnsl -lfreetype -lfontconfig -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -levent -ldbus-1 -lxcb-shm -lX11-xcb -lX11 -lxcb -lXext -lXrandr -lstdc++ -lm -lssp_nonshared -lssp -lgcc_s -lc -lgcc_s /usr/gcc/13/lib/gcc/x86_64-pc-solaris2.11/13.2.0/crtendS.o /usr/lib/amd64/crtn.o
Undefined first referenced
symbol in file
aom_codec_control ../../../image/decoders/Unified_cpp_image_decoders0.o (symbol scope specifies local binding)
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
$ nm ../../../dist/bin/libgkcodecs.so | grep aom_codec_control$
[82503] | 11992814| 485|FUNC |GLOB |0 |19 |aom_codec_control
Reporter | ||
Comment 11•9 months ago
|
||
I was suggested to use some Solaris linker debugging (https://www.mail-archive.com/tools-linking@mail.opensolaris.org/msg00573.html).
aom_codec_control
is a normal global symbol looking for a definition, when it encounters an instance from Unified_cpp_ffmpeg_libav530.oUnified_cpp_ffmpeg_libav530.o
that has hidden visibility specified, and this causes ld to give the resulting merged symbol hidden visibility:
debug: symbol[5987]=aom_codec_control (global); resolving twoundefs
debug: old 0x0000000000000000 0x0000000000000000 NOTY GLOB D 0 UNDEF ../../../image/decoders/Unified_cpp_image_decoders0.o
debug: new 0x0000000000000000 0x0000000000000000 NOTY GLOB H 0 UNDEF ../../../dom/media/platforms/ffmpeg/libav53/Unified_cpp_ffmpeg_libav530.o
debug: resolved 0x0000000000000000 0x0000000000000000 NOTY GLOB H 0 UNDEF REF_REL_NEED (Unified_cpp_image_decoders0.o)
The question is why that hidden visibility is being requested, and what effect the author is hoping to get from doing so..
Comment 12•9 months ago
|
||
Sounds like some header missing in config/system-headers.mozbuild
. It's surprising this doesn't cause problems on Linux, though.
Assignee | ||
Comment 13•9 months ago
|
||
Maybe we should add aom_encoder.h
in system_headers
? aom_codec_control
is defined in "aom/aom_codec.h", and "aom/aom_codec.h" is used via in <aom/aom_encoder.h> in libaomenc.c
Reporter | ||
Comment 14•9 months ago
|
||
(In reply to C.M.Chang[:chunmin] from comment #13)
Maybe we should add
aom_encoder.h
insystem_headers
?aom_codec_control
is defined in "aom/aom_codec.h", and "aom/aom_codec.h" is used via in <aom/aom_encoder.h> in libaomenc.c
This didn't make a difference:
--- a/config/system-headers.mozbuild Thu Oct 05 00:56:26 2023 -0700
+++ b/config/system-headers.mozbuild Thu Oct 05 00:56:26 2023 -0700
@@ -1030,6 +1030,7 @@
"aom/aom_image.h",
"aom/aomdx.h",
"aom/aom_decoder.h",
+ "aom/aom_encoder.h",
]
if CONFIG["MOZ_X11"]:
Reporter | ||
Comment 15•9 months ago
|
||
Note that there is no system version on libaom
library and no system headers like /usr/include/aom
.
![]() |
||
Updated•8 months ago
|
Reporter | ||
Comment 16•8 months ago
|
||
Uff, I wish I understand it. Following change resolves the issue. Thank you for your hints!
diff -r b6762d206c10 -r 8e7ecb951dd3 config/system-headers.mozbuild
--- a/config/system-headers.mozbuild Thu Oct 05 00:56:26 2023 -0700
+++ b/config/system-headers.mozbuild Thu Oct 05 00:56:26 2023 -0700
@@ -1029,6 +1029,7 @@
"vpx_mem/vpx_mem.h",
"aom/aom_image.h",
"aom/aomdx.h",
+ "aom/aomcx.h",
"aom/aom_decoder.h",
]
Will you please push it to mozilla-cetrall? Ideally also to FF 128 branch.
Assignee | ||
Comment 17•8 months ago
|
||
This patch fixes the undefined aom_codec_control
symbol on Solaris
SPARC by adding "aom/aomcx.h" to config/system-headers.mozbuild
.
Thanks to Petr Sumbera (petr.sumbera@oracle.com) for identifying and
solving the issue [1].
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1900590#c16
Assignee | ||
Comment 18•8 months ago
|
||
(In reply to Petr Sumbera from comment #16)
Will you please push it to mozilla-cetrall? Ideally also to FF 128 branch.
Hi Petr, thanks for working out a fix! I've pushed a try to see if it breaks anything, and will land it soon!
https://treeherder.mozilla.org/jobs?repo=try&revision=10c91e85d067cdeb7e43bd403be57cc49bd87477
Updated•8 months ago
|
Comment 19•8 months ago
|
||
Set release status flags based on info from the regressing bug 1876438
Reporter | ||
Comment 20•8 months ago
|
||
(In reply to C.M.Chang[:chunmin] from comment #18)
Hi Petr, thanks for working out a fix! I've pushed a try to see if it breaks anything, and will land it soon!
https://treeherder.mozilla.org/jobs?repo=try&revision=10c91e85d067cdeb7e43bd403be57cc49bd87477
Just for record. The problem is on both SPARC and i386 Solaris. Probably some Solaris linker specific feature.
Comment 21•8 months ago
|
||
Comment 22•8 months ago
|
||
bugherder |
Comment 23•8 months ago
|
||
The patch landed in nightly and beta is affected.
:chunmin, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox128
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 24•8 months ago
|
||
Comment on attachment 9408320 [details]
Bug 1900590 - Suppress undefined aom_codec_control symbol on Solaris SPARC
Beta/Release Uplift Approval Request
- User impact if declined: Solaris SPARC and i386 Solaris cannot build Firefox
- Is this code covered by automated tests?: Yes
- 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): This patch is just a fix for solving the build issue on Solaris SPARC and i386 Solaris
- String changes made/needed:
- Is Android affected?: No
Comment 25•8 months ago
|
||
Comment on attachment 9408320 [details]
Bug 1900590 - Suppress undefined aom_codec_control symbol on Solaris SPARC
Approved for 128.0b6.
Updated•8 months ago
|
Comment 26•8 months ago
|
||
uplift |
Description
•