eos icon indicating copy to clipboard operation
eos copied to clipboard

An error occurs when linking unit_test in my contract

Open yepp4you opened this issue 8 years ago • 4 comments

os : macOS mojave eosio.cdt v1.3.2 eosio v1.4.0

https://github.com/EOSIO/eos/blob/2232802dee4be1a3f6ca436edad64af3c45d7029/libraries/chain/webassembly/wavm.cpp#L134

[100%] Linking CXX executable unit_test Undefined symbols for architecture x86_64: "Platform::immediately_exit()", referenced from: eosio::chain::webassembly::wavm::wavm_runtime::immediately_exit_currently_running_module() in libeosio_chain.a(wavm.cpp.o) ld: symbol(s) not found for architecture x86_64

yepp4you avatar Oct 17 '18 15:10 yepp4you

macOS?

jgiszczak avatar Oct 17 '18 18:10 jgiszczak

yes macOS

yepp4you avatar Oct 18 '18 00:10 yepp4you

This is frequently fixed automatically simply by running the build script a second time. If that doesn't work, removing the build directory and then rerunning the script has also been reported to be successful.

jgiszczak avatar Oct 18 '18 20:10 jgiszczak

I tried clearing the build folder of all the folders (eos, eosio.cdt, my project) and testing, but the same problem occurred, so I commented out the following code on eos, built it and then did a unit_test on my project.

https://github.com/EOSIO/eos/blob/f9a3d023c05d6b7984cbd7263a5a39e650c87e90/libraries/chain/webassembly/wavm.cpp#L134

yepp4you avatar Oct 21 '18 10:10 yepp4you