Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix linking OpenSSL (branch release/1.8.x) #8362

Merged
merged 1 commit into from
Dec 21, 2019

Conversation

johndebord
Copy link
Contributor

Fixes this potential linker error when building eosio.contracts on MacOS:

...
...
...
[100%] Linking CXX executable unit_test
Undefined symbols for architecture x86_64:
  "_BN_is_negative", referenced from:
      fc::bigint::is_negative() const in libfc.a(bigint.cpp.o)
      fc::bigint::to_int64() const in libfc.a(bigint.cpp.o)
  "_BN_is_zero", referenced from:
      fc::bigint::operator bool() const in libfc.a(bigint.cpp.o)
  "_ECDSA_SIG_get0", referenced from:
      fc::crypto::r1::ECDSA_SIG_recover_key_GFp(ec_key_st*, ECDSA_SIG_st*, unsigned char const*, int, int, int) in libfc.a(elliptic_r1.cpp.o)
      fc::crypto::r1::signature_from_ecdsa(ec_key_st const*, fc::array<char, 33ul> const&, fc::ecdsa_sig&, fc::sha256 const&) in libfc.a(elliptic_r1.cpp.o)
  "_ECDSA_SIG_set0", referenced from:
      fc::crypto::r1::signature_from_ecdsa(ec_key_st const*, fc::array<char, 33ul> const&, fc::ecdsa_sig&, fc::sha256 const&) in libfc.a(elliptic_r1.cpp.o)
      fc::crypto::r1::public_key::public_key(fc::array<unsigned char, 65ul> const&, fc::sha256 const&, bool) in libfc.a(elliptic_r1.cpp.o)
      fc::crypto::webauthn::public_key::public_key(fc::crypto::webauthn::signature const&, fc::sha256 const&, bool) in libfc.a(elliptic_webauthn.cpp.o)
  "_OPENSSL_init_crypto", referenced from:
      fc::openssl_scope::openssl_scope() in libfc.a(openssl.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [CMakeFiles/unit_test.dir/build.make:166: unit_test] Error 1
make[4]: *** [CMakeFiles/Makefile2:644: CMakeFiles/unit_test.dir/all] Error 2
make[3]: *** [Makefile:95: all] Error 2
make[2]: *** [CMakeFiles/contracts_unit_tests.dir/build.make:113: contracts_unit_tests-prefix/src/contracts_unit_tests-stamp/contracts_unit_tests-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/contracts_unit_tests.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
...
...
...

@johndebord johndebord changed the title Fix linking OpenSSL Fix linking OpenSSL (branch release/1.8.x) Dec 19, 2019
@arhag arhag merged commit 72d0d55 into release/1.8.x Dec 21, 2019
@arhag arhag deleted the fix/release/1.8.x/linking-tester branch December 21, 2019 00:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants