Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 763996

Summary: 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)
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: UNCONFIRMED ---    
Severity: normal CC: ionen, mozilla, philipp.ammann
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: build.log.xz
emerge --info

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.