contract-sdk-rust编译不过,MacOS10.12.4 M1 ,rust 最新版
(1)构建命令cargo build
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-Wl,-exported_symbols_list,/var/folders/x1/1vlvl9vn3yzbzpkl4r34j5qh0000gn/T/rustc2C743o/list" "-arch" "arm64" "/var/folders/x1/1vlvl9vn3yzbzpkl4r34j5qh0000gn/T/rustc2C743o/symbols.o".
...
= note: Undefined symbols for architecture arm64:
"_sys_call", referenced from:
chainmaker_contract::sim_context::CommonUtils::get_bytes_from_chain::h3b1f74a975d55b30 in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::ok::h2d6543ea49315cc5 in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::error::he158b3b6a28d7d12 in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::log::hcba63b97ec025628 in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::put_state::h04b1152c54a69b3b in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::emit_event::h098c9e80cd62367c in chainmaker_contract.6jio63hqaif60f2.rcgu.o
"_log_message", referenced from:
chainmaker_contract::sim_context::log::hddd4311550a8140f in chainmaker_contract.6jio63hqaif60f2.rcgu.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(2)构建命令cargo rustc -- -C link-args="-e __start -static -nostartfiles"
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-Wl,-exported_symbols_list,/var/folders/x1/1vlvl9vn3yzbzpkl4r34j5qh0000gn/T/rustcO60oqU/list" "-arch" "arm64" "/var/folders/x1/1vlvl9vn3yzbzpkl4r34j5qh0000gn/T/rustcO60oqU/symbols.o"
...
= note: Undefined symbols for architecture arm64:
"_sys_call", referenced from:
chainmaker_contract::sim_context::CommonUtils::get_bytes_from_chain::h3b1f74a975d55b30 in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::ok::h2d6543ea49315cc5 in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::error::he158b3b6a28d7d12 in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::log::hcba63b97ec025628 in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::put_state::h04b1152c54a69b3b in chainmaker_contract.6jio63hqaif60f2.rcgu.o
_$LT$chainmaker_contract..sim_context..SimContextImpl$u20$as$u20$chainmaker_contract..sim_context..SimContext$GT$::emit_event::h098c9e80cd62367c in chainmaker_contract.6jio63hqaif60f2.rcgu.o
"_log_message", referenced from:
chainmaker_contract::sim_context::log::hddd4311550a8140f in chainmaker_contract.6jio63hqaif60f2.rcgu.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
希望能够指导完善,谢谢!