build.sh exec error
YancyParker opened this issue · 3 comments
YancyParker commented
I cloned the project and executed it build.sh The error message is as follows
warning: 1 warning emitted
Compiling token-codegen v0.1.0 (/Users/yangpan/workdir/rust-workspace/ontology-wasm-cdt-rust/examples/token-codegen)
Compiling token v0.1.0 (/Users/yangpan/workdir/rust-workspace/ontology-wasm-cdt-rust/examples/token)
Compiling call-neovm v0.1.0 (/Users/yangpan/workdir/rust-workspace/ontology-wasm-cdt-rust/examples/call-neovm)
Compiling call_native v0.1.0 (/Users/yangpan/workdir/rust-workspace/ontology-wasm-cdt-rust/examples/call_native)
error: linking with `rust-lld` failed: signal: 6
|
= note: "rust-lld" "-flavor" "wasm" "-z" "stack-size=1048576" "--stack-first" "--allow-undefined" "--fatal-warnings" "--no-demangle" "--export-dynamic" "--no-entry" "-L" "/Users/yangpan/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib" "-L" "/Users/yangpan/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/self-contained" "/Users/yangpan/workdir/rust-workspace/ontology-wasm-cdt-rust/target/wasm32-unknown-unknown/release/deps/call_native.call_native.4dlgkqwc-cgu.0.rcgu.o" "-o" "/Users/yangpan/workdir/rust-workspace/ontology-wasm-cdt-rust/target/wasm32-unknown-unknown/release/deps/call_native.wasm" "--export" "invoke" "--export=__heap_base" "--export=__data_end" "--gc-sections" "--no-entry" "-O2" "-L" "/Users/yangpan/workdir/rust-workspace/ontology-wasm-cdt-rust/target/wasm32-unknown-unknown/release/deps" "-L" "/Users/yangpan/workdir/rust-workspace/ontology-wasm-cdt-rust/target/release/deps" "-L" "/Users/yangpan/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib" "/Users/yangpan/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libcompiler_builtins-77317ec807201c9c.rlib" "-zstack-size=32768"
= note: dyld: Library not loaded: @rpath/libLLVM.dylib
Referenced from: /Users/yangpan/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/bin/rust-lld
Reason: image not found
error: aborting due to previous error
error: could not compile `call_native`
macos: 10.15.3
rustc 1.48.0-nightly
yp945 commented
I have a question. The error message is the dylib of llvm. Do I need to install llvm before compiling the contract?
laizy commented
It did not happened on my side. There is a issue in rust-lang/rust#53813
yp945 commented
change rustup to nightly-2020-09-11 solved it, thank you.