compile error : undefined reference to `dlsym'
root@zjyq:/apt/wallet-core-4.0.32/build# make
[ 8%] Built target protobuf
[ 13%] Built target TrezorCrypto
[ 47%] Built target TrustWalletCore
[ 47%] Built target TrezorCryptoTests
[ 48%] Built target walletconsolelib
[ 48%] Built target gtest
[ 48%] Built target gtest_main
[ 48%] Linking CXX executable tests
/usr/bin/ld: /apt/wallet-core-4.0.32/rust/target/release/libwallet_core_rs.a(std-f0a846e57d9de9e7.std.5c40b41967587ec6-cgu.0.rcgu.o): in function std::sys::pal::unix::weak::fetch': /rustc/98aa3624be70462d6a25ed5544333e3df62f4c66/library/std/src/sys/pal/unix/weak.rs:138: undefined reference to dlsym'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [tests/CMakeFiles/tests.dir/build.make:9275: tests/tests] Error 1
make[1]: *** [CMakeFiles/Makefile2:335: tests/CMakeFiles/tests.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
root@zjyq:/apt/wallet-core-4.0.32/build#
root@zjyq:/apt/wallet-core-4.0.32/build#
Hi @vccomnet, have you encountered this problem before 4.0.32 release? Do you try to compile WalletCore on Mac or Linux?
Could you please clean up the ./build and ./rust/target directories, install all dependencies and try to compile again? Please share all the steps to reproduce the problem.
Hi satoshiotomakan, my compile env:
cat /etc/os-release NAME="Ubuntu" VERSION="20.04.6 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.6 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal
I ran the bootstrap. sh command to compile, and then the error mentioned above occurred。