[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 Bug ID: 277075 Summary: www/firefox: build failure on 14-STABLE Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ge...@freebsd.org Reporter: m...@gmx.net Assignee: ge...@freebsd.org Flags: maintainer-feedback?(ge...@freebsd.org) After the update to version 123 www/firefox startedhaving build failures. The relevant part of the build log is this: ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_av1_cx' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_av1_dx' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_build_config' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_control' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_dec_init_ver' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_decode' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_destroy' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_destroy' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_enc_config_default' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_enc_init_ver' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_encode' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_err_to_string' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_error' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_error_detail' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_get_caps' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_get_cx_data' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_get_frame' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_peek_stream_info' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_set_option' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_version' failed: symbol not defined ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors) /wrkdirs/usr/ports/www/firefox/work/.mozbuild/srcdirs/firefox-123.0-4655e115eb53/_virtualenvs/build/bin/python -m mozbuild.action.check_binary libfakeopenh264.so clang: error: linker command failed with exit code 1 (use -v to see invocation) Fortunately, the error messages reminded me of this recent bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276542 Therefore I tried adding LDFLAGS+= "-Wl,--undefined-version" to the port Makefile, which resulted in a successful build. As with the heimdal issue, I'm quite convinced while this does solve the immediate issue (and therefore probably should be in the ports tree for the time being), it just masks the underlying problem. As I'm not very familiar with the code base but lacking spare time instead, I'll probably not investigate this further on my own, but certainly can help with that, if needed. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 Vladimir Druzenko changed: What|Removed |Added See Also||https://bugs.freebsd.org/bu ||gzilla/show_bug.cgi?id=2770 ||21 CC||v...@freebsd.org --- Comment #1 from Vladimir Druzenko --- Check this: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277021 -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 Martin Neubauer changed: What|Removed |Added See Also|https://bugs.freebsd.org/bu | |gzilla/show_bug.cgi?id=2770 | |21 | --- Comment #2 from Martin Neubauer --- (In reply to Vladimir Druzenko from comment #1) I had already seen that bug report. However, that one is a runtime issue, while this one already fails during build. (I just confirmed that by applying the patch from 277021, and commenting out my added LDFLAGS line.) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 Martin Neubauer changed: What|Removed |Added See Also||https://bugs.freebsd.org/bu ||gzilla/show_bug.cgi?id=2770 ||21 -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 Benjamin Jacobs changed: What|Removed |Added CC||free...@dev.thsi.be --- Comment #3 from Benjamin Jacobs --- I'm also unable to build ff on 15-CURRENT with DEFAULT_VERSIONS+= llvm=17, same errors: "ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_{XXX}' failed: symbol not defined". -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 Cameron changed: What|Removed |Added CC||c...@neo-zeon.de --- Comment #4 from Cameron --- Same for me on a fresh install of FreeBSD 14.0-RELEASE (with llvm15-15.0.7_10): gmake[5]: Leaving directory '/usr/ports/www/firefox/work/.build/dom/base' ld.lld: warning: undefined symbol: aom_codec_version >>> referenced by libaomenc.c >>> lto.tmp:(av1_init_static) >>> referenced by libaomenc.c >>> lto.tmp:(av1_init_static) ld.lld: warning: undefined symbol: aom_codec_av1_cx >>> referenced by libaomenc.c >>> lto.tmp:(av1_init_static) >>> referenced by libaomenc.c >>> lto.tmp:(av1_init) ld.lld: warning: undefined symbol: aom_codec_get_caps >>> referenced by libaomenc.c >>> lto.tmp:(av1_init_static) >>> referenced by libaomenc.c >>> lto.tmp:(aom_init) ld.lld: warning: undefined symbol: aom_codec_encode >>> referenced by libaomenc.c >>> lto.tmp:(aom_encode) ld.lld: warning: undefined symbol: aom_codec_get_cx_data >>> referenced by libaomenc.c >>> lto.tmp:(aom_encode) >>> referenced by libaomenc.c >>> lto.tmp:(aom_encode) ld.lld: warning: undefined symbol: aom_codec_destroy >>> referenced by libaomenc.c >>> lto.tmp:(aom_free) ld.lld: warning: undefined symbol: aom_codec_version_str >>> referenced by libaomenc.c >>> lto.tmp:(aom_init) ld.lld: warning: undefined symbol: aom_codec_build_config >>> referenced by libaomenc.c >>> lto.tmp:(aom_init) ld.lld: warning: undefined symbol: aom_codec_enc_config_default >>> referenced by libaomenc.c >>> lto.tmp:(aom_init) ld.lld: warning: undefined symbol: aom_codec_err_to_string >>> referenced by libaomenc.c >>> lto.tmp:(aom_init) ld.lld: warning: undefined symbol: aom_codec_enc_init_ver >>> referenced by libaomenc.c >>> lto.tmp:(aom_init) ld.lld: warning: undefined symbol: aom_codec_set_option >>> referenced by libaomenc.c >>> lto.tmp:(aom_init) ld.lld: warning: undefined symbol: aom_img_wrap >>> referenced by libaomenc.c >>> lto.tmp:(aom_init) ld.lld: warning: undefined symbol: aom_codec_error >>> referenced by libaomenc.c >>> lto.tmp:(log_encoder_error) ld.lld: warning: undefined symbol: aom_codec_error_detail >>> referenced by libaomenc.c >>> lto.tmp:(log_encoder_error) ld.lld: warning: undefined symbol: aom_codec_control >>> referenced by libaomenc.c >>> lto.tmp:(codecctl_int) >>> referenced by libaomenc.c >>> lto.tmp:(codecctl_imgp) >>> referenced by libaomenc.c >>> lto.tmp:(codecctl_intp) /usr/ports/www/firefox/work/.mozbuild/srcdirs/firefox-123.0-38f2bafb2ce2/_virtualenvs/build/bin/python -m mozbuild.action.check_binary libmozavcodec.so chmod +x libmozavcodec.so ./../../config/nsinstall -R -m 644 'libmozavcodec.so' '../../../dist/bin' gmake[5]: Leaving directory '/usr/ports/www/firefox/work/.build/media/ffvpx/libavcodec' 2 warnings generated. gmake[5]: Leaving directory '/usr/ports/www/firefox/work/.build/dom/media' gmake[4]: Leaving directory '/usr/ports/www/firefox/work/.build' gmake[3]: *** [/usr/ports/www/firefox/work/firefox-123.0/config/recurse.mk:34: compile] Error 2 gmake[3]: Leaving directory '/usr/ports/www/firefox/work/.build' gmake[2]: *** [/usr/ports/www/firefox/work/firefox-123.0/config/rules.mk:361: all] Error 2 gmake[2]: Leaving directory '/usr/ports/www/firefox/work/.build' ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/firefox *** Error code 1 Stop. make: stopped in /usr/ports/www/firefox Martin Neubauer's fix to add "-Wl,--undefined-version" to the port's Makefile fails with (maybe I need llvm17 for this to work?): ===>>> make build failed for www/firefox ===>>> Aborting update ld.lld: error: /usr/ports/www/firefox/work/.build/x86_64-unknown-freebsd/release/libbuiltins_static.a(builtins_static-3a1fcf7b18307834.builtins_static.96d18d21dbed042d-cgu.0.rcgu.o): Unknown attribute kind (86) (Producer: 'LLVM17.0.6-rust-1.76.0-stable' Reader: 'LLVM 15.0.7') gmake[5]: Entering directory '/usr/ports/www/firefox/work/.build/layout/style' gmake[5]: Nothing to be done for 'target-objects'. clang-15gmake[5]: Leaving directory '/usr/ports/www/firefox/work/.build/layout/style' : error: linker command failed with exit code 1 (use -v to see invocation) -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Comment #5 from Anton Saietskii --- Created attachment 248893 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=248893&action=edit poudriere build failure log (In reply to Martin Neubauer from comment #0) Same here with releng/13.3, llvm17, -march=skylake. Didn't try patch from bug #277021, but will do as soon as I can. Please change importance field to "Affects Some People". -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 Martin Neubauer changed: What|Removed |Added Severity|Affects Only Me |Affects Some People -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Comment #6 from Cameron --- Tried the patch from #277021 It did not fix the issue. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 Martin Neubauer changed: What|Removed |Added Attachment #248901||maintainer-approval? Flags|| --- Comment #7 from Martin Neubauer --- Created attachment 248901 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=248901&action=edit Patch with workaround for failing build -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Comment #8 from Martin Neubauer --- (In reply to Cameron from comment #6) As I commented earlier, #277021 is is a different issue altogether. I just added a patch with the workaround from the original bug description to hopefully cut down a bit on the noise. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Comment #9 from Cameron --- (In reply to Martin Neubauer from comment #8) Still fails with the same issue with this patch. I tried the same fix by adding the line manually to the Makefile last week and it failed then too so this isn't a surprise. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Comment #10 from Martin Neubauer --- (In reply to Cameron from comment #9) I just had a quick look at your error message. It seems that the workaround did indeed work, but your build fails anyway because the linker from llvm 15 gets input generated by llvm 17. As inconvenient as this might be, maybe you could try again after forcing a rebuild of the complete dependency chain. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Comment #11 from Cameron --- (In reply to Martin Neubauer from comment #10) I started that process before you sent this comment, and coming back home, it seems it has worked. I switched the default version of llvm17 as well (which is why I rebuilt it all). Not sure how much the switch from 15 to 17 helped. Thanks! -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Comment #12 from Charlie Li --- (In reply to Cameron from comment #11) Especially with LTO, all compiled objects must have been built with the same LLVM version to work. Rust's bundled copy of LLVM (default) is 17. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Comment #13 from Anton Saietskii --- Created attachment 248916 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=248916&action=edit poudriere build success log (with LDFLAGS trick applied) (In reply to Charlie Li from comment #12) Makes sense, but real root cause here is different. Still failed for me with LTO=off everywhere. (In reply to Martin Neubauer from comment #7) With LDFLAGS applied (simply in my poudriere's make.conf, though it doesn't really matter), Fx builds successfully. I think now coming something tougher -- finding a strong enough rationale to get this pushed to ports. -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Comment #14 from Anton Saietskii --- Silently, this has been fixed in [0]. I should note that commit message suggests a) issue is known, b) nobody responsible for gecko really looked at this PR. [0]: https://cgit.freebsd.org/ports/commit/?id=5c53f4de1a915eccf9f05932c48bf459a4e936d6 -- You are receiving this mail because: You are the assignee for the bug.
[Bug 277075] www/firefox: build failure on 14-STABLE
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 Martin Neubauer changed: What|Removed |Added Resolution|--- |Overcome By Events Status|New |Closed -- You are receiving this mail because: You are the assignee for the bug.
maintainer-feedback requested: [Bug 277075] www/firefox: build failure on 14-STABLE
Bugzilla Automation has asked freebsd-gecko (Nobody) for maintainer-feedback: Bug 277075: www/firefox: build failure on 14-STABLE https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277075 --- Description --- After the update to version 123 www/firefox startedhaving build failures. The relevant part of the build log is this: ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_av1_cx' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_av1_dx' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_build_config' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_control' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_dec_init_ver' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_decode' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_destroy' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_destroy' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_enc_config_default' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_enc_init_ver' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_encode' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_err_to_string' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_error' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_error_detail' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_get_caps' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_get_cx_data' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_get_frame' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_peek_stream_info' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_set_option' failed: symbol not defined ld.lld: error: version script assignment of 'libgkcodecs.so' to symbol 'aom_codec_version' failed: symbol not defined ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors) /wrkdirs/usr/ports/www/firefox/work/.mozbuild/srcdirs/firefox-123.0-4655e115eb5 3/_virtualenvs/build/bin/python -m mozbuild.action.check_binary libfakeopenh264.so clang: error: linker command failed with exit code 1 (use -v to see invocation) Fortunately, the error messages reminded me of this recent bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276542 Therefore I tried adding LDFLAGS+= "-Wl,--undefined-version" to the port Makefile, which resulted in a successful build. As with the heimdal issue, I'm quite convinced while this does solve the immediate issue (and therefore probably should be in the ports tree for the time being), it just masks the underlying problem. As I'm not very familiar with the code base but lacking spare time instead, I'll probably not investigate this further on my own, but certainly can help with that, if needed.