flier / rust-fasthash

A suite of non-cryptographic hash functions for Rust.
Apache License 2.0
138 stars 28 forks source link

Web Assembly - rust-lld: error: unable to find library -lc++ : macOS Catalina #16

Open timkodes opened 4 years ago

timkodes commented 4 years ago

Hey I am trying to use this in a rust library that I am compiling to Web Assembly and I get this error when doing so. Any help would be greatly appreciated. It looks like it can't find c++

Main error: rust-lld: error: unable to find library -lc++

cargo build --target wasm32-unknown-unknown

Error: error: linking with rust-lld failed: exit code: 1 | = note: "rust-lld" "-flavor" "wasm" "--no-threads" "-z" "stack-size=1048576" "--stack-first" "--allow-undefined" "--fatal-warnings" "--no-demangle" "--export-dynamic" "--no-entry" "-L" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/rust_wasm.rust_wasm.89zb3r1o-cgu.0.rcgu.o" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/rust_wasm.rust_wasm.89zb3r1o-cgu.1.rcgu.o" "-o" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/rust_wasm.wasm" "--export" "add" "--export=__heap_base" "--export=__data_end" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/rust_wasm.2m6g8scklahz3k6q.rcgu.o" "--gc-sections" "-O2" "-L" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps" "-L" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/release/deps" "-L" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/build/fasthash-sys-176b96587e544e81/out" "-L" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/libfasthash-0e80d3da9392a19e.rlib" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/libxoroshiro128-1a11601add71a2f5.rlib" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/librand-2138b6c0bade6ef4.rlib" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/libseahash-fc801c99e327204a.rlib" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/libnum_traits-141923eb70ce5ca2.rlib" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/libfasthash_sys-ee92517cfe297b6d.rlib" "/Users/sut0000/Documents/projects/ExpoWASM/rust/target/wasm32-unknown-unknown/release/deps/libcfg_if-eea84ee276de1658.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-ebdbdf85c5aa6538.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libpanic_abort-e062c5b9106b67d7.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libdlmalloc-0ce507bf7de2d48b.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libhashbrown-67a981e1694c85dd.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_alloc-38e8c73315228cc3.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libbacktrace-5eaa7eab0e770be9.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/librustc_demangle-e6e419aae8777be9.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libunwind-d4457e7cf3668c57.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcfg_if-69606ef9930b5998.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/liblibc-a011dac03a111dbf.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/liballoc-c0898e554d6df986.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/librustc_std_workspace_core-d4b9fcad5c3b0047.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcore-0515a222d0286947.rlib" "/Users/sut0000/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-e8459c87b242f3a1.rlib" "-l" "c++" "--no-entry" = note: rust-lld: error: unable to find library -lc++