LLVM linker reports unable to find library -lstdc++
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: tristan.ross, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0
Steps to reproduce:
Easiest is with nix:
nix build github:RossComputerGuy/nixpkgs-llvm-ws#firefox-unwrapped --accept-flake-config --keep-going --override-input nixpkgs 'github:NixOS/nixpkgs?ref=pull/382889/head'
The non-Nix way is to build libc++ and have Firefox use it during compilation
Actual results:
0:12.98 error: linking with /home/ross/nixpkgs-llvm-ws/firefox-135.0.1/build/cargo-linker
failed: exit status: 1
0:12.98 |
0:12.98 = note: LC_ALL="C" PATH="/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/bin:/nix/store/dp7
17nr2fwsxml9qbjwcdhr5fv6k2i5w-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/bin:/nix/store/dp717nr2fwsxml9qbjwcdhr5fv6k2i5w-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux
-gnu/bin:/nix/store/d64sdb4m95n2h2mi7m8dnn81mmlx2n31-aarch64-unknown-linux-gnu-rustc-wrapper-1.84.1/bin:/tmp/nix-shell.ki9bva/mozbuild/srcdirs/firefox-135.0.1-d49266ef9f10/vi
rtualenvs/build/bin:/nix/store/bkl6n9n6sb0vrrbh77sm6dhhaj499gbw-autoconf-2.72/bin:/nix/store/2pf5ri1iqwdw7s5c3bcf4w494zn32lf8-aarch64-unknown-linux-gnu-cargo-1.84.1/bin:/nix/s
tore/wsqx5gw92bbi1y4xsc57nzcpp3c3a43g-gnum4-1.4.19/bin:/nix/store/cz8npaal62whpwyqw1749c5xlkrabm4b-llvm-binutils-wrapper-19.1.7/bin:/nix/store/01929jyx4bb2swgdqzm2jg6rpjxnplnc
-llvm-binutils-19.1.7/bin:/nix/store/0s2z5wswc329f47az79bg5l0rrz8p1kb-glibc-2.40-66-bin/bin:/nix/store/rs83v3ivkadsk9p1wk9qrzr3af26x829-coreutils-9.6/bin:/nix/store/ji8zs96759
g59b4q6kz94pbfq6gvlazx-nodejs-22.14.0/bin:/nix/store/lcd80xgbzlbndg8qb25phzw17g62dvy8-perl-5.40.0/bin:/nix/store/bm0zc89iq0aml2afkqq5j7sy0ax7cwp6-python3-3.12.9/bin:/nix/store
/f580qddgx3yigk42bspsnjh9s73j23x5-rust-cbindgen-0.28.0/bin:/nix/store/0fv3fcl202lwsh9yl26dq89k3iniyny0-unzip-6.0/bin:/nix/store/z4bvs92ala9vvxg328lqf9rfwzgfnra7-which-2.23/bin
:/nix/store/ykkixlpwly0rs721jd4hfvjw0qpl7r75-gtk+3-3.24.48-dev/bin:/nix/store/jacmqcpl87h1i5kg5vm9dkjmxyz3svhw-expat-2.6.4-dev/bin:/nix/store/zmhyhz3yyd6x8y29xmnj1di0xm781z7r-
dbus-1.14.10-lib/bin:/nix/store/fiwdda6yjhigr17frbxfi25yfqbx4pzw-dbus-1.14.10/bin:/nix/store/bd1mvy9v84dq4dis6aryhlppzfa7w2qg-glib-2.82.4-dev/bin:/nix/store/bhb0r5g6lg7h492cnf
s0qpf8dipl790y-gettext-0.22.5/bin:/nix/store/22lfbfcd9x3c2khwpfxscp89kwmzbkpn-glib-2.82.4-bin/bin:/nix/store/a6hz8i2cawn4mg4x93xa4r9bpmncfxk0-cairo-1.18.2-dev/bin:/nix/store/i
g23q99830igdk0adjy0jav81apbkk46-freetype-2.13.3-dev/bin:/nix/store/jbcy0cbivq2qsy0v8aiwi9raj21jf9ia-bzip2-1.0.8-bin/bin:/nix/store/3srilvrad1bmf4j2hdhrcw2y0bw0rasb-brotli-1.1.
0/bin:/nix/store/mxw1xqrd7qwc2lv5si8zpb374gn48pin-libpng-apng-1.6.46-dev/bin:/nix/store/slf7wcmgs7iraxhnj1nfgpychxmfn7ii-fontconfig-2.16.0-bin/bin/nix/store/5vklvqbmp8kgjvh2v
dwkqn7lva2vs72q-fribidi-1.0.16/bin:/nix/store/nafcb9j4rnbfzjaydrzhw2hv77415fl5-gdk-pixbuf-2.42.12-dev/bin:/nix/store/glqr86p7z5cay7gv9cxp52l2m50vhdj7-libdeflate-1.23/bin:/nix/
store/5c9jnaf229yp2bd9s0iam0w153k6v9hg-libjpeg-turbo-3.0.4-bin/bin:/nix/store/lk7xh18jgl0vwgjy0jm5wwv44817qk38-libwebp-1.5.0/bin:/nix/store/7p03m585v31920i3bfyklfwz3n1pwg85-xz
-5.6.4-bin/bin:/nix/store/3m0j5jr98qms6sffcl63c9k0yync7b6b-zstd-1.5.6-bin/bin:/nix/store/cm0dj150k3z7iddcx71y1aqb6fn59vcm-zstd-1.5.6/bin:/nix/store/3c1bk8nzrx7yzssgamhq8isnkpr
gmd6k-libtiff-4.7.0-bin/bin:/nix/store/0402vplnyzm8i54y8idzgxjpjvzivfsj-gdk-pixbuf-2.42.12/bin:/nix/store/wn93n3i4lilbayhh7w50bb0lc9zxa5s6-harfbuzz-10.2.0-dev/bin:/nix/store/y
1z3z37ym39d6h0a5ng1kls0w3iywwym-graphite2-1.3.14/bin:/nix/store/z3ni1icw5vlnv5hihwyxns06m2k21npk-pango-1.56.1-bin/bin:/nix/store/5qi7yvi9n0wfdybb0c9f6yqxbv6shy7j-cups-2.4.11-d
ev/bin:/nix/store/z2129p4453pq4q5g1277j1di0ssn71s4-cups-2.4.11/bin:/nix/store/7an2riv9m6by8nmzh6zaynf18dczspzr-gtk+3-3.24.48/bin:/nix/store/2i1zmgdwf4dm9jn37ikbh63zq4mvc243-li
brsvg-2.59.2/bin:/nix/store/blh1shn829bzwxxchrbm18bacw542646-aarch64-unknown-linux-gnu-pkg-config-wrapper-0.29.2/bin:/nix/store/1l1jjglb4ccbgphm29gkq0crb85ygzg0-dump_syms-2.3.
4/bin:/nix/store/23216cvbd4cv8w206kxmwgds0h1rkxwd-patchelf-0.15.0/bin:/nix/store/43kdlyx2x51wf0v7bgx1grym5padsqhv-clang-wrapper-19.1.7/bin:/nix/store/f6dn48k763pvzb4xv6lz8mwhx
8c1622f-clang-aarch64-unknown-linux-gnu-19.1.7/bin:/nix/store/ffkb8qz5dlh8d76rwg03acard4si4h8d-glibc-aarch64-unknown-linux-gnu-2.40-66-bin/bin:/nix/store/3j7zvamwbm7g4yy7xrvgj
kdlaqih9455-coreutils-aarch64-unknown-linux-gnu-9.6/bin:/nix/store/azqzyfp1yrljfpsm153jp03kzi4k087h-aarch64-unknown-linux-gnu-llvm-binutils-wrapper-19.1.7/bin:/nix/store/kgnfn
ympspl8zap56jf5czx7pvk4b0yf-llvm-binutils-19.1.7/bin:/nix/store/amwvh4kkn24snk12phhwanzhlk5qnzgw-findutils-4.10.0/bin:/nix/store/58s19vs7kdjy5z85whj3lsmivjd5zgl1-diffutils-3.1
0/bin:/nix/store/gwb5h7p4i153v6vc7ip46vagagszd1xh-gnused-4.9/bin:/nix/store/r9cvwr8hsjd7aj0291i9lavg1lmwihiq-gnugrep-3.11/bin:/nix/store/66jymsrgq6yilrlqfk5hgr3p0cs6zfcr-gawk-
5.3.1/bin:/nix/store/9warks4g0j4wmmbk8pyqbiwgvqn2pax8-gnutar-1.35/bin:/nix/store/w19824j1phw43j58ks37vw3lvjajn32n-gzip-1.13/bin:/nix/store/h08c3fimsqs30sg2mw9k0mkz7rnlp0j8-gnu
make-4.4.1/bin:/nix/store/g2x2hichzhd6k2wdx6rxa04zxvs83nvn-bash-5.2p37/bin:/nix/store/ki8a9jfkn3jl3rh75kihklv0fixm7d5p-patch-2.7.6/bin:/nix/store/x23jwrpk7s8a40dasvdkfg5m6hair
8nw-file-5.46/bin:/run/wrappers/bin:/home/ross/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/home/ross/.nix-profile/bin:/nix/profile/bin:/home/ross/.local/sta
te/nix/profile/bin:/etc/profiles/per-user/ross/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/home/ross/.cargo/bin:/nix/store/m50amgkw192824mmpafhvfcvmr4ncv
kh-rustc-wrapper-1.84.1/bin" VSLANG="1033" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/build/cargo-linker" "/tmp/nix-shell.ki9bva/rustc96O8Sb/symbols.o" "/home/ross/nixpkgs-ll
vm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7ce-cgu.00.rcgu.o" "/home/ross/nixpkg
s-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7ce-cgu.01.rcgu.o" "/home/ross/ni
xpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7ce-cgu.02.rcgu.o" "/home/ros
s/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7ce-cgu.03.rcgu.o" "/home
/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7ce-cgu.04.rcgu.o" "/
home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7ce-cgu.05.rcgu.o
" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7ce-cgu.06.rc
gu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7ce-cgu.0
7.rcgu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7ce-c
gu.08.rcgu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506cf3f7
ce-cgu.09.rcgu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e506c
f3f7ce-cgu.10.rcgu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a63e2e
506cf3f7ce-cgu.11.rcgu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_build.a6
3e2e506cf3f7ce-cgu.12.rcgu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script_buil
d.a63e2e506cf3f7ce-cgu.13.rcgu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_script
build.a63e2e506cf3f7ce-cgu.14.rcgu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.build_scr
ipt_build.a63e2e506cf3f7ce-cgu.15.rcgu.o" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e.a33dm
wsf9w3k2j2tg0s4c0tdb.rcgu.o" "-Wl,--as-needed" "-Wl,-Bstatic" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/deps/libglslopt-24bb7c6fa37d0f6c.rlib" "/home/ross/nix
pkgs-llvm-ws/firefox-135.0.1/objdir/release/deps/libbuild_parallel-2d35a3224426f83c.rlib" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/deps/libnum_cpus-fb09a1e4c
a1e85fe.rlib" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/deps/libjobserver-99053db5fc51e4cb.rlib" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/de
ps/liblibc-0568c91397a6371d.rlib" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/deps/libcrossbeam_utils-c2a722a47ad58812.rlib" "/home/ross/nixpkgs-llvm-ws/firefox
-135.0.1/objdir/release/deps/libwebrender_build-716d5cf2c753ed6f.rlib" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/deps/libserde-d41aee9e87d29d98.rlib" "/home/r
oss/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/deps/liblazy_static-f0396094c34ad838.rlib" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/deps/libbitflags-df4b4
89c9d793ed3.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-9b39f8ac09968a6c.rlib" "
/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libpanic_unwind-3282007aac0d44e0.rlib" "/nix/store
/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libobject-a33cf49184d9826f.rlib" "/nix/store/rcij1kqifv5am1q
9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libmemchr-df62c0fb5b2a9e5c.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90f
q-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libaddr2line-8872c6ac7be21635.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unk
nown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libgimli-f66fed6684f4e468.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-ru
stc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_demangle-35089a43c51a9072.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84
.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd_detect-8ea89d50b5c7382a.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustl
ib/aarch64-unknown-linux-gnu/lib/libhashbrown-bdff90ed9fe129a4.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-un
known-linux-gnu/lib/librustc_std_workspace_alloc-08fbc17b09dbc2e6.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64
-unknown-linux-gnu/lib/libminiz_oxide-f51da8702090b3f8.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-li
nux-gnu/lib/libadler-3487c96efcf145ee.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libun
wind-089cbd35912df840.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-1d89e10a007
5fb75.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-00756b1a724150f1.rlib" "/nix/
store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-7ef8cfe96efc6b00.rlib" "/nix/store/rcij1kqifv5
am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_core-bed44278af7334bd.rlib" "/nix/store/rcij1kqif
v5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-382d9cc997f11ceb.rlib" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0
k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-bc5847d7b35f1b7f.rlib" "-Wl,-Bdynamic" "-lstdc++" "-lgcc_s" "-lutil
" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/glslopt-49f0dd8d846c6a7
2/out" "-L" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/glslopt-49f0dd8d846c6a72/out" "-L" "/home/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/buil
d/glslopt-49f0dd8d846c6a72/out" "-L" "/nix/store/rcij1kqifv5am1q9vg9qlyd68h0k90fq-aarch64-unknown-linux-gnu-rustc-1.84.1/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/home
/ross/nixpkgs-llvm-ws/firefox-135.0.1/objdir/release/build/webrender-ac77199e2e7e551e/build_script_build-ac77199e2e7e551e" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-n
odefaultlibs"
0:12.98 = note: aarch64-unknown-linux-gnu-ld.lld: error: unable to find library -lstdc++
0:12.98 clang++: error: linker command failed with exit code 1 (use -v to see invocation)
When I grep for `-lstdc++`, I find these entries in `build`:
cargo-linker:# simply work by the use of CC and -lstdc++ (added by cc-rs).
cargo-linker: if arg in ["-lc++", "-lstdc++"]:
gyp_includes/common.gypi: '-lstdc++'
Expected results:
Firefox should have built
Reporter | ||
Comment 1•16 days ago
|
||
It seems webrender is trying to compile for host but with target compilation and so it's targetting libstdc++ instead of libc++.
Comment 2•16 days 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 3•16 days ago
|
||
The non-Nix way is to build libc++ and have Firefox use it during compilation
How? The way you do it is most probably the explanation.
Comment 4•16 days ago
|
||
The stdc++ error you reported in the other bug was about ffmpeg, too.
Reporter | ||
Comment 5•16 days ago
|
||
How? The way you do it is most probably the explanation.
I'm not sure what you mean.
The stdc++ error you reported in the other bug was about ffmpeg, too.
Yes and that's one of the issues I have encountered. There's 3 different errors which I have discovered when building Firefox with LLVM fully. First one was with the malloc in graphite 2. This one is glslopt and there's another with libmozsandbox
.
Comment 6•16 days ago
|
||
How do you have Firefox use libc++ during compilation?
Reporter | ||
Comment 7•16 days ago
|
||
I'm not exactly sure since this is coming through Nix which sets things like $CC
, $LD
, and various other things. The configure flags looks like this:
--disable-tests --disable-updater --enable-application=browser --enable-default-toolkit=cairo-gtk3-wayland --with-app-name=firefox --with-distribution-id=org.nixos --with-libclang-path=/nix/store/grm5ymawf6r6cg3f5xx1f1zjn6dp636q-clang-19.1.7-lib/lib --with-wasi-sysroot=/nix/store/z1amqrhpd5mm1srqc118lwm2k09if5hj-wasi-sysroot --host=aarch64-unknown-linux-gnu --target=aarch64-unknown-linux-gnu --enable-lto=cross,full --enable-linker=lld --enable-elf-hack --enable-system-pixman --with-system-ffi --with-system-icu --with-system-jpeg --with-system-libevent --with-system-libvpx --with-system-nspr --with-system-nss --with-system-png --with-system-webp --with-system-zlib --enable-alsa --enable-jack --enable-pulseaudio --enable-sndio --enable-crashreporter --enable-ffmpeg --enable-necko-wifi --enable-negotiateauth --enable-jemalloc --enable-webrtc --disable-debug --enable-optimize --enable-release --enable-debug-symbols --disable-strip --disable-install-strip --enable-official-branding
I believe just putting together a basic LLVM toolchain might work. $HOST_CC
is set to a clang setup that does use libgcc and libstdc++. However, in the path there is the clang which is set up with compiler-rt and libc++. My guess is something with the configure flags, the clang wrappers, and $HOST_CC
could be confusing Firefox's build setup.
Comment 8•16 days ago
|
||
The first obvious thing for the error in comment 0 is that you're probably not setting CXXSTDLIB to c++. After that, it could be -stdlib=libc++ missing in some variable. In any case, I would consider this a setup/build environment problem, rather than a Firefox build system problem. (albeit, maybe CXXSTDLIB should be set automatically, but as that also depends on how other things are set, I'd argue the cc crate should be the one to try to figure things out on its own, which would make this a bug to report to https://github.com/rust-lang/cc-rs/issues with more specifics about how the build environment is set, and a reduced testcase that doesn't rely on the Firefox codebase).
Reporter | ||
Comment 9•16 days ago
|
||
Gotcha, the thing which made me think something isn't right is that TARGET_CXXSTDLIB=c++
didn't fix the problem. Setting HOST_CXXSTDLIB=stdc++
didn't fix it either. However, setting HOST_CXXSTDLB=c++
fixes the problem. This leads me to believe that something isn't right in Firefox's build setup. I will try to produce a testcase with cc-rs to see if the issue is there.
Comment 10•16 days ago
|
||
cc-rs's assumption is that non-BSD non-mac uses libstdc++. So unless you tell it to use libc++ somehow, it's not going to do it on its own.
Description
•