dslm4515 / BMLFS

Beyond Musl Linux From Scratch - Build Recipes for MLFS [Musl Linux From Source]
17 stars 4 forks source link

Firefox Fails to build: Dynamic loading not supported by libclang #28

Closed dslm4515 closed 11 months ago

dslm4515 commented 2 years ago

LLVM 14.0.0 was installed in /opt/build. Using rust-1.59.0 (rustup) installed in ${HOME)/.cargo since building rust from source fails to build. cbindgen was compile from source and installed in /opt/build.

Firefox fails to complete build:

0:06.02 error: failed to run custom build command for `neqo-crypto v0.4.28 (https://github.com/ddragana/neqo/?branch=pr_1247#0dc6eb8a)`               
 0:06.02 Caused by:                                                                                                                                    
 0:06.02   process didn't exit successfully: `/src/firefox-91.6.0/obj-x86_64-pc-linux-musl/release/build/neqo-crypto-f3813a7baca64d9f/build-script-buil
d` (exit status: 101)                                                                                                                                  
 0:06.02   --- stdout                                                                                                                                  
 0:06.02   cargo:rustc-link-lib=dylib=nssutil3                                                                                                         
 0:06.02   cargo:rustc-link-lib=dylib=nss3                                                                                                             
 0:06.02   cargo:rustc-link-lib=dylib=ssl3                                                                                                             
 0:06.02   cargo:rustc-link-lib=dylib=plds4                                                                                                            
 0:06.02   cargo:rustc-link-lib=dylib=plc4                                                                                                             
 0:06.02   cargo:rustc-link-lib=dylib=nspr4                                                                                                            
 0:06.02   cargo:rustc-link-search=native=/src/firefox-91.6.0/obj-x86_64-pc-linux-musl/dist/bin                                                        
 0:06.02   cargo:rustc-link-search=native=/src/firefox-91.6.0/obj-x86_64-pc-linux-musl/security/nss/lib/nss/nss_nss3                                   
 0:06.02   cargo:rustc-link-search=native=/src/firefox-91.6.0/obj-x86_64-pc-linux-musl/security/nss/lib/ssl/ssl_ssl3                                   
 0:06.02   cargo:rustc-link-search=native=/src/firefox-91.6.0/obj-x86_64-pc-linux-musl/config/external/nspr/pr                                         
 0:06.02   cargo:rerun-if-changed=/src/firefox-91.6.0/obj-x86_64-pc-linux-musl/netwerk/socket/neqo/extra-bindgen-flags                                 
 0:06.03   cargo:rerun-if-changed=bindings/bindings.toml                                                                                               
 0:06.03   cargo:rerun-if-changed=bindings/nss_sslopt.h                                                                                                
 0:06.03   --- stderr
0:06.03   thread 'main' panicked at 'Unable to find libclang: "the `libclang` shared library at /opt/build/lib/libclang.so.14.0.0 could not be opened:
 Dynamic loading not supported"', /src/firefox-91.6.0/third_party/rust/bindgen/src/lib.rs:1922:31                                                      
 0:06.03   stack backtrace:                                                                                                                            
 0:06.03      0:     0x7f5c9d9d311c - std::backtrace_rs::backtrace::libunwind::trace::h77e2ca07ef63e4d4                                                
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/libunwind.rs
:93:5                                                                                                                                                  
 0:06.03      1:     0x7f5c9d9d311c - std::backtrace_rs::backtrace::trace_unsynchronized::hee4866ffc0258806                                            
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 
 0:06.03      2:     0x7f5c9d9d311c - std::sys_common::backtrace::_print_fmt::h228418e02eb0f8fc                                                        
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:67:5              
 0:06.03      3:     0x7f5c9d9d311c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h855e38790874b97a             
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:46:22             
 0:06.03      4:     0x7f5c9da0f73c - core::fmt::write::h42c44c4c71e808e0
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/fmt/mod.rs:1168:17
 0:06.03      5:     0x7f5c9d9ce9c3 - std::io::Write::write_fmt::h42b4dd70169d991f
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/io/mod.rs:1660:15
 0:06.03      6:     0x7f5c9d9d59c2 - std::sys_common::backtrace::_print::h9931fc7c5b71fd53
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:49:5
 0:06.03      7:     0x7f5c9d9d59c2 - std::sys_common::backtrace::print::ha50ba850f23815df
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:36:9
 0:06.03      8:     0x7f5c9d9d59c2 - std::panicking::default_hook::{{closure}}::hecdd69c96d580ce5
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:211:50
 0:06.03      9:     0x7f5c9d9d55a5 - std::panicking::default_hook::h7928b9e2bcca33b5
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:228:9
 0:06.03     10:     0x7f5c9d9d6013 - std::panicking::rust_panic_with_hook::h165aa2fa5fe93a26
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:606:17
 0:06.03     11:     0x7f5c9d9d5d30 - std::panicking::begin_panic_handler::{{closure}}::h33ea6995ff6f26c6
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:502:13
 0:06.03     12:     0x7f5c9d9d35c4 - std::sys_common::backtrace::__rust_end_short_backtrace::h5e001056b3d239a9
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sys_common/backtrace.rs:139:18
 0:06.03     13:     0x7f5c9d9d5a69 - rust_begin_unwind                                                                                       [15/1986]
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
 0:06.03     14:     0x7f5c9d805591 - core::panicking::panic_fmt::h25f4bace64163d71
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
 0:06.03     15:     0x7f5c9d805683 - core::result::unwrap_failed::h265e18644e4f3feb
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:1690:5
 0:06.03     16:     0x7f5c9d83a082 - std::sync::once::Once::call_once::{{closure}}::ha8148e020c9f2fa5
 0:06.03     17:     0x7f5c9d80422a - std::sync::once::Once::call_inner::h15fe0a99e12518cb
 0:06.03                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/sync/once.rs:426:21
 0:06.03     18:     0x7f5c9d838626 - bindgen::ensure_libclang_is_loaded::h4679091124295b97
 0:06.04     19:     0x7f5c9d835a3c - bindgen::Builder::generate::h1397ecfb84fc9453
 0:06.04     20:     0x7f5c9d81370c - build_script_build::main::h17bda49755b7f244
 0:06.04     21:     0x7f5c9d815143 - std::sys_common::backtrace::__rust_begin_short_backtrace::he2ee8f8a93f66324
 0:06.04     22:     0x7f5c9d8148e9 - std::rt::lang_start::{{closure}}::h1bb2a37653cd8161
 0:06.04     23:     0x7f5c9d9d2860 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::heaf574743191e15b
 0:06.04                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/ops/function.rs:259:13
 0:06.04     24:     0x7f5c9d9d2860 - std::panicking::try::do_call::h60c0c5ed566cfa08
 0:06.04                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:406:40
 0:06.04     25:     0x7f5c9d9d2860 - std::panicking::try::hdf3f2b36564f953d
 0:06.04                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:370:19
 0:06.04     26:     0x7f5c9d9d2860 - std::panic::catch_unwind::hc3b6348826703723
 0:06.04                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panic.rs:133:14
 0:06.04     27:     0x7f5c9d9d2860 - std::rt::lang_start_internal::{{closure}}::hf9c39ce91fc3ea64
 0:06.04                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/rt.rs:128:48
 0:06.04     28:     0x7f5c9d9d2860 - std::panicking::try::do_call::hb63d8c4b5823a9ea
 0:06.04                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:406:40
 0:06.04     29:     0x7f5c9d9d2860 - std::panicking::try::hfff1ffa733fc0b90
 0:06.04                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:370:19
 0:06.04     30:     0x7f5c9d9d2860 - std::panic::catch_unwind::hd0081cbdc19bd646
 0:06.04                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panic.rs:133:14
 0:06.04     31:     0x7f5c9d9d2860 - std::rt::lang_start_internal::hc166cd9392444b47
 0:06.04                                  at /rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/rt.rs:128:20
 0:06.04     32:     0x7f5c9d814422 - main
 0:06.04 warning: build failed, waiting for other jobs to finish...
 0:06.41 toolkit/library/buildid.cpp.stub
 0:06.70 browser/app/firefox
 0:06.83 toolkit/library
 0:06.93 /src/firefox-91.6.0/python/mozbuild/mozbuild/action/check_binary.py:13: DeprecationWarning: The distutils package is deprecated and slated for
 removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
 0:06.93   from distutils.version import StrictVersion as Version
 0:10.88 error: build failed
 0:10.88 make[4]: *** [/src/firefox-91.6.0/config/makefiles/rust.mk:405: force-cargo-library-build] Error 101
 0:10.89 make[3]: *** [/src/firefox-91.6.0/config/recurse.mk:72: toolkit/library/rust/target] Error 2
 0:10.89 make[2]: *** [/src/firefox-91.6.0/config/recurse.mk:34: compile] Error 2
 0:10.89 make[1]: *** [/src/firefox-91.6.0/config/rules.mk:355: default] Error 2
 0:10.89 make: *** [client.mk:65: build] Error 2
 0:10.89 0 compiler warnings present.
dslm4515 commented 2 years ago

Tried Void Linux's method and patches: Build fails sooner with same error.

dslm4515 commented 2 years ago

Tried an older cbingen 0.19.0 .... same error.

dslm4515 commented 2 years ago

This might be related to another issue

dslm4515 commented 11 months ago

Firefox builds under CMLFS as of commit 410b6b59eb85fe47097680b2e870a0c3638d4c09