Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 763996 - www-client/firefox-84.0.1-r1 - /usr/lib/llvm/11/lib/libclang.so.11 could not be opened: Dynamic loading not supported"', /var /tmp/portage/www-client/firefox-84.0.1-r1/work/firefox-84.0.1/third_party/rust/bindgen/src/lib.rs:1956:31 (on musl)
Summary: www-client/firefox-84.0.1-r1 - /usr/lib/llvm/11/lib/libclang.so.11 could not ...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL: https://github.com/rust-lang/compiler...
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2021-01-05 23:45 UTC by ernsteiswuerfel
Modified: 2022-03-27 20:46 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (firefox-84.0.1-r1:20210105-211340.log.xz,70.12 KB, application/x-xz)
2021-01-05 23:45 UTC, ernsteiswuerfel
Details
emerge --info (file_763996.txt,6.63 KB, text/plain)
2021-01-05 23:45 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2021-01-05 23:45:00 UTC
Created attachment 681361 [details]
build.log.xz

[...]
8 6:38.86 [neqo-crypto 0.4.14] thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /usr/lib/llvm/11/lib/libclang.so.11 could not be opened: Dynamic loading not supported"', /var
/tmp/portage/www-client/firefox-84.0.1-r1/work/firefox-84.0.1/third_party/rust/bindgen/src/lib.rs:1956:31
8 6:38.86 [neqo-crypto 0.4.14] stack backtrace:
8 6:38.91 [neqo-crypto 0.4.14]    0:     0x7fef04388ba0 - std::backtrace_rs::backtrace::libunwind::trace::he7dddadb03f61005
8 6:38.91 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/../../backtrace/src/backtrace/libunwind.rs:96
8 6:38.91 [neqo-crypto 0.4.14]    1:     0x7fef04388ba0 - std::backtrace_rs::backtrace::trace_unsynchronized::h1ceb1f2ab6cd4ca2
8 6:38.91 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/../../backtrace/src/backtrace/mod.rs:66
8 6:38.91 [neqo-crypto 0.4.14]    2:     0x7fef04388ba0 - std::sys_common::backtrace::_print_fmt::hdb0b27a9509ec894
8 6:38.92 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:79
8 6:38.92 [neqo-crypto 0.4.14]    3:     0x7fef04388ba0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc4df5611fab8201a
8 6:38.92 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:58
8 6:38.93 [neqo-crypto 0.4.14]    4:     0x7fef043c26fc - core::fmt::write::habf2dbeb36546e2f
8 6:38.93 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/fmt/mod.rs:1082
8 6:38.93 [neqo-crypto 0.4.14]    5:     0x7fef043856f7 - std::io::Write::write_fmt::hc70a74b259f58998
8 6:38.93 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/io/mod.rs:1514
8 6:38.94 [neqo-crypto 0.4.14]    6:     0x7fef0438b0f0 - std::sys_common::backtrace::_print::h266c2be06be6d066
8 6:38.94 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:61

8 6:38.94 [neqo-crypto 0.4.14]    7:     0x7fef0438b0f0 - std::sys_common::backtrace::print::h23b774f8e5a41ff8
8 6:38.94 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:48
8 6:38.94 [neqo-crypto 0.4.14]    8:     0x7fef0438b0f0 - std::panicking::default_hook::{{closure}}::h29a9a8f8e81c7702
8 6:38.94 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:200
8 6:38.94 [neqo-crypto 0.4.14]    9:     0x7fef0438ae3c - std::panicking::default_hook::h7d87e53c58aa24f6
8 6:38.95 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:219
8 6:38.95 [neqo-crypto 0.4.14]   10:     0x7fef0438b753 - std::panicking::rust_panic_with_hook::hb21f7ba598c369dc
8 6:38.95 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:569
8 6:38.95 [neqo-crypto 0.4.14]   11:     0x7fef0438b329 - std::panicking::begin_panic_handler::{{closure}}::h39563748bfa0aad5
8 6:38.95 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:476
8 6:38.95 [neqo-crypto 0.4.14]   12:     0x7fef0438902c - std::sys_common::backtrace::__rust_end_short_backtrace::hc748610f44302c03
8 6:38.95 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sys_common/backtrace.rs:153
8 6:38.95 [neqo-crypto 0.4.14]   13:     0x7fef0438b2e9 - rust_begin_unwind
8 6:38.96 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
8 6:38.96 [neqo-crypto 0.4.14]   14:     0x7fef043c0cd1 - core::panicking::panic_fmt::h7fb23425bb96f2aa
8 6:38.96 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
8 6:38.96 [neqo-crypto 0.4.14]   15:     0x7fef043c0af3 - core::option::expect_none_failed::h334786424516dc51
8 6:38.96 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/option.rs:1221
8 6:38.96 [neqo-crypto 0.4.14]   16:     0x7fef03e7f2b0 - core::result::Result<T,E>::expect::he8f65e14f7399efd
8 6:38.96 [neqo-crypto 0.4.14]   17:     0x7fef040164d0 - core::ops::function::FnOnce::call_once::hc70964078abaa6a3
8 6:38.97 [neqo-crypto 0.4.14]   18:     0x7fef03ef4812 - lazy_static::lazy::Lazy<T>::get::{{closure}}::hb6987e99ab42b509
8 6:38.97 [neqo-crypto 0.4.14]   19:     0x7fef03fdbbac - std::sync::once::Once::call_once::{{closure}}::h4723366e47b34a75
8 6:38.97 [neqo-crypto 0.4.14]   20:     0x7fef04388585 - std::sync::once::Once::call_inner::h58b579b9b77a1900
8 6:38.97 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/sync/once.rs:421
8 6:38.97 [neqo-crypto 0.4.14]   21:     0x7fef03fdbad7 - std::sync::once::Once::call_once::ha8111f7c30dcdcba
8 6:38.97 [neqo-crypto 0.4.14]   22:     0x7fef0404efb9 - <bindgen::ensure_libclang_is_loaded::LIBCLANG as core::ops::deref::Deref>::deref::h861ed2934f8fe3f5
8 6:38.97 [neqo-crypto 0.4.14]   23:     0x7fef040475b8 - bindgen::ensure_libclang_is_loaded::ha029582b43d8683c
8 6:38.98 [neqo-crypto 0.4.14]   24:     0x7fef0404764d - bindgen::Bindings::generate::h76fafaca913677d6
8 6:38.98 [neqo-crypto 0.4.14]   25:     0x7fef04045de4 - bindgen::Builder::generate::h988cb987162b2502
8 6:38.98 [neqo-crypto 0.4.14]   26:     0x7fef03e333fa - build_script_build::build_bindings::hf858e65cb0803a6a
8 6:38.98 [neqo-crypto 0.4.14]   27:     0x7fef03e35228 - build_script_build::main::h5987ad93b9fd5c64
8 6:38.98 [neqo-crypto 0.4.14]   28:     0x7fef03e3d283 - core::ops::function::FnOnce::call_once::hc26d35d0739e1a53
8 6:38.98 [neqo-crypto 0.4.14]   29:     0x7fef03e3d0b9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0d7887de519bd6a0
8 6:38.98 [neqo-crypto 0.4.14]   30:     0x7fef03e3f8c9 - std::rt::lang_start::{{closure}}::h930b6fe287a404a8
8 6:38.99 [neqo-crypto 0.4.14]   31:     0x7fef0438bb08 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h162d74669f17b6e7
8 6:38.99 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ops/function.rs:259
8 6:38.99 [neqo-crypto 0.4.14]   32:     0x7fef0438bb08 - std::panicking::try::do_call::hcfeb202736d84fb3
8 6:38.99 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:373
8 6:38.99 [neqo-crypto 0.4.14]   33:     0x7fef0438bb08 - std::panicking::try::ha506a3f8a5172637
8 6:38.99 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:337
8 6:38.99 [neqo-crypto 0.4.14]   34:     0x7fef0438bb08 - std::panic::catch_unwind::hab65e44d1a7a7bc9
8 6:38.99 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panic.rs:379
8 6:39.00 [neqo-crypto 0.4.14]   35:     0x7fef0438bb08 - std::rt::lang_start_internal::hccfa50df9f8e4081
8 6:39.00 [neqo-crypto 0.4.14]                                at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/rt.rs:51
8 6:39.00 [neqo-crypto 0.4.14]   36:     0x7fef03e3f8a8 - std::rt::lang_start::hfd61740c97e29280
8 6:39.00 [neqo-crypto 0.4.14]   37:     0x7fef03e3b6fb - main
8 6:39.02 error: failed to run custom build command for `neqo-crypto v0.4.14 (https://github.com/mozilla/neqo?tag=v0.4.14#ec00592e)`
8 6:39.02 Caused by:
8 6:39.02   process didn't exit successfully: `/var/tmp/portage/www-client/firefox-84.0.1-r1/work/firefox_build/netwerk/test/http3server/./release/build/neqo-crypto-c56540f02cc966ce/build-script-build` (exit code: 101)
Comment 1 ernsteiswuerfel archtester 2021-01-05 23:45:33 UTC
Created attachment 681364 [details]
emerge --info
Comment 2 tt_1 2021-01-06 00:18:17 UTC
please add emerge -pv firefox to maybe reveal use of lto or pgo stuff, thanks
Comment 3 Ionen Wolkens gentoo-dev 2021-01-06 00:28:03 UTC
(In reply to tt_1 from comment #2)
> please add emerge -pv firefox to maybe reveal use of lto or pgo stuff, thanks
From the build.log:

USE: abi_x86_64 amd64 clang dbus elibc_musl gmp-autoupdate hwaccel kernel_linux l10n_de openh264 pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp userland_GNU

Haven't tried firefox with musl myself, so can't say much.
Comment 4 ernsteiswuerfel archtester 2021-01-06 02:08:55 UTC
 # emerge -pv firefox

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    #] www-client/firefox-84.0.1-r1:0/84::gentoo  USE="clang dbus gmp-autoupdate hwaccel openh264 pulseaudio system-av1 system-harfbuzz system-icu system-jpeg (system-libevent) system-libvpx system-webp -debug -eme-free -geckodriver -hardened -jack -lto -pgo -screencast (-selinux) -wayland -wifi" L10N="de -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -cak -cs -cy -da -dsb -el -en-CA -en-GB -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -it -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -ne -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW


Hmm, have seen other bugs that it won't build on musl in it's current state... I will add this to the blocker in sake of completeness, but if this issue is already known just resolve it as  duplicate.
Comment 5 Ionen Wolkens gentoo-dev 2021-01-06 10:49:03 UTC
I've read firefox-84.0.1+gcc+musl builds, so new USE=clang default may be an issue for musl users (haven't tried myself).

Taking the liberty to assign to musl@ because, seeing previous bugs, it appears preferred by the Mozilla team.
Comment 6 12101111 2021-01-08 17:30:23 UTC
Please set RUSTFLAGS=-Ctarget-feature=-crt-static and try again.
See also: https://github.com/rust-lang/rust-bindgen/issues/1867
Comment 7 ernsteiswuerfel archtester 2021-01-19 10:45:00 UTC
Yes, it seems to be this rust issue. I 'solved' it by using rust-1.47.0-r1 from smaeul overlay. Firefox builds fine and runs ok then.

This solved another issue I was having, building USE="clang jit" spidermonkey-78.6.0. Does not build with regular rust but with the smaeul one.
Comment 8 Philipp Ammann 2021-09-14 14:14:30 UTC
I can confirm the issue still exists with Rust 1.55, Clang/LLVM 12 and Firefox 91.0.2.
Comment 9 tt_1 2021-11-25 17:56:35 UTC
ah yeah, just hit the same Bug when cross compiling firefox-91.3.0 from amd64-musl host to aarch64-musl target.
Comment 10 hairu 2021-11-25 18:11:15 UTC
Anarchy, Chewi and I have been working recently on this. If all goes well, patches will be available tomorrow. Works so far in x86_64; aarch64 being tested as I write this.
Comment 11 ernsteiswuerfel archtester 2021-11-25 20:50:05 UTC
(In reply to #!/yeehaw from comment #10)
> Anarchy, Chewi and I have been working recently on this. If all goes well,
> patches will be available tomorrow. Works so far in x86_64; aarch64 being
> tested as I write this.
This would be really cool! So a regular Firefox build with rust::gentoo is possible now? Will test that on ppc64 too of course. ;)
Comment 12 hairu 2021-11-25 21:57:46 UTC
Right now, I have an x86_64-musl VM and an aarch64-musl pi3b that run Firefox 94.0.2 built with rust-1.56.1 but I cross-compile, and in order for my patches to not interfere with glibc builds some changes were needed (this is where Anarchy and Chewi saved the day, as well as noticing another issue while compiling natively, which I wasn't affected by). These new patches are being used to compile/test Firefox on natively compiled aarch64 today. It's Thanksgiving in the USA today though.

re: ppc[64] more testing will be needed, and devs with the needed hardware to test on find that rust updates are a somewhat daunting task (which I agree with). So YMMV for ppc[64].

This said, my main (secret, for now) project is still a work in progress, but could possibly lead to cross-compiling Firefox for ppc[64] on a different cpu architecture. More details to come, but because I do not have the ppc[64] hardware to test results on, testers/helpers/contributors will be needed for that to happen.

For now, after my next code "release", which should be in a week (but it'll be ready when it's ready, like the saying goes :P), perhaps whoever is interested in trying can join #gentoo-arm to collaborate on ppc[64] targets, after taking time to understand how to with my help.
Comment 13 ernsteiswuerfel archtester 2022-01-02 14:19:00 UTC
Seems at some point of time the existing upstream rust targets will be dynamically linked, just as their glibc-counterparts: https://github.com/rust-lang/compiler-team/issues/422
Comment 14 ernsteiswuerfel archtester 2022-03-27 20:46:31 UTC
Meanwhile Firefox and Firefox ESR build fine on amd64 when dev-lang/rust/rust::musl from the musl overlay is used (which is pointed to in the Wiki).

This will have to be resolved upstream.