Closed Yihen-Liu closed 4 months ago
When I build this repo, there are some error displayed:
[ 33%] Building CXX object test/crypto-bip32/CMakeFiles/bip32-secp256k1-serialization-test.dir/bip32-secp256k1-serialization-test.cpp.o [ 33%] Linking CXX executable bip32-secp256k1-serialization-test ld: warning: object file (/usr/local/lib/libgtest_main.a(gtest_main.cc.o)) was built for newer macOS version (12.0) than being linked (11.1) ld: warning: object file (/usr/local/lib/libgtest.a(gtest-all.cc.o)) was built for newer macOS version (12.0) than being linked (11.1) Undefined symbols for architecture x86_64: "std::1::basic_stringbuf<char, std::__1::char_traits, std::1::allocator >::str() const", referenced from: testing::internal::DeathTestImpl::Passed(bool) in libgtest.a(gtest-all.cc.o) testing::internal::StringStreamToString(std::1::basic_stringstream<char, std::__1::char_traits, std::1::allocator >) in libgtest.a(gtest-all.cc.o) testing::internal::edit_distance::CreateUnifiedDiff(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > > > const&, std::1::vector<std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > > const&, unsigned long) in libgtest.a(gtest-all.cc.o) std::1::basic_string<char, std::1::char_traits, std::__1::allocator > testing::PrintToString<char const>(char const const&) in libgtest.a(gtest-all.cc.o) testing::internal::String::FormatHexUInt32(unsigned int) in libgtest.a(gtest-all.cc.o) std::1::basic_string<char, std::__1::char_traits, std::1::allocator > testing::PrintToString<wchar_t const>(wchar_t const const&) in libgtest.a(gtest-all.cc.o) testing::internal::String::FormatIntWidthN(int, int) in libgtest.a(gtest-all.cc.o) ... "VTT for std::1::basic_stringstream<char, std::__1::char_traits, std::1::allocator >", referenced from: std::1::basic_stringstream<char, std::__1::char_traits, std::1::allocator >::basic_stringstream() in libgtest.a(gtest-all.cc.o) testing::internal::edit_distance::CreateUnifiedDiff(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > > > const&, std::1::vector<std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, unsigned long) in libgtest.a(gtest-all.cc.o) testing::AssertionResult testing::internal::FloatingPointLE(char const, char const, float, float) in libgtest.a(gtest-all.cc.o) testing::AssertionResult testing::internal::FloatingPointLE(char const, char const, double, double) in libgtest.a(gtest-all.cc.o) std::1::basic_string<char, std::__1::char_traits, std::1::allocator > testing::PrintToString<char const>(char const const&) in libgtest.a(gtest-all.cc.o) testing::internal::String::FormatHexUInt32(unsigned int) in libgtest.a(gtest-all.cc.o) testing::internal::WideStringToUtf8(wchar_t const, int) in libgtest.a(gtest-all.cc.o) ... "VTT for std::1::basic_ostringstream<char, std::__1::char_traits, std::1::allocator >", referenced from: testing::internal::DeathTestImpl::Passed(bool) in libgtest.a(gtest-all.cc.o) "vtable for std::1::basic_stringbuf<char, std::__1::char_traits, std::1::allocator >", referenced from: testing::internal::DeathTestImpl::Passed(bool) in libgtest.a(gtest-all.cc.o) std::1::basic_stringstream<char, std::__1::char_traits, std::1::allocator >::basic_stringstream() in libgtest.a(gtest-all.cc.o) testing::internal::edit_distance::CreateUnifiedDiff(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::__1::basic_string<char, std::1::char_traits, std::1::allocator > > > const&, std::1::vector<std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > > const&, unsigned long) in libgtest.a(gtest-all.cc.o) testing::AssertionResult testing::internal::FloatingPointLE(char const, char const, float, float) in libgtest.a(gtest-all.cc.o) testing::AssertionResult testing::internal::FloatingPointLE(char const, char const, double, double) in libgtest.a(gtest-all.cc.o) std::1::basic_string<char, std::1::char_traits, std::1::allocator > testing::PrintToString<char const>(char const const&) in libgtest.a(gtest-all.cc.o) testing::internal::String::FormatHexUInt32(unsigned int) in libgtest.a(gtest-all.cc.o) ... NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for std::1::basic_stringstream<char, std::1::char_traits, std::1::allocator >", referenced from: std::1::basic_stringstream<char, std::1::char_traits, std::1::allocator >::basic_stringstream() in libgtest.a(gtest-all.cc.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for std::__1::basic_ostringstream<char, std::1::char_traits, std::__1::allocator >", referenced from: testing::internal::DeathTestImpl::Passed(bool) in libgtest.a(gtest-all.cc.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [test/crypto-bip32/CMakeFiles/bip32-secp256k1-serialization-test.dir/build.make:102: test/crypto-bip32/bip32-secp256k1-serialization-test] Error 1 make[1]: [CMakeFiles/Makefile2:472: test/crypto-bip32/CMakeFiles/bip32-secp256k1-serialization-test.dir/all] Error 2 make: *** [Makefile:146: all] Error 2
Macbook OS version :12.7 openssl version: 1.1
Have solved.
make sure that:
When I build this repo, there are some error displayed:
[ 33%] Building CXX object test/crypto-bip32/CMakeFiles/bip32-secp256k1-serialization-test.dir/bip32-secp256k1-serialization-test.cpp.o [ 33%] Linking CXX executable bip32-secp256k1-serialization-test ld: warning: object file (/usr/local/lib/libgtest_main.a(gtest_main.cc.o)) was built for newer macOS version (12.0) than being linked (11.1) ld: warning: object file (/usr/local/lib/libgtest.a(gtest-all.cc.o)) was built for newer macOS version (12.0) than being linked (11.1) Undefined symbols for architecture x86_64: "std::1::basic_stringbuf<char, std::__1::char_traits, std:: 1::allocator >::str() const", referenced from:
testing::internal::DeathTestImpl::Passed(bool) in libgtest.a(gtest-all.cc.o)
testing::internal::StringStreamToString(std::1::basic_stringstream<char, std::__1::char_traits, std:: 1::allocator >) in libgtest.a(gtest-all.cc.o)
testing::internal::edit_distance::CreateUnifiedDiff(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std:: 1::allocator<std::__1::basic_string<char, std:: 1::char_traits, std::1::allocator > > > const&, std:: 1::vector<std::1::basic_string<char, std::__1::char_traits, std:: 1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > > const&, unsigned long) in libgtest.a(gtest-all.cc.o)
std:: 1::basic_string<char, std:: 1::char_traits, std::__1::allocator > testing::PrintToString<char const >(char const const&) in libgtest.a(gtest-all.cc.o)
testing::internal::String::FormatHexUInt32(unsigned int) in libgtest.a(gtest-all.cc.o)
std::1::basic_string<char, std::__1::char_traits, std:: 1::allocator > testing::PrintToString<wchar_t const >(wchar_t const const&) in libgtest.a(gtest-all.cc.o)
testing::internal::String::FormatIntWidthN(int, int) in libgtest.a(gtest-all.cc.o)
...
"VTT for std::1::basic_stringstream<char, std::__1::char_traits, std:: 1::allocator >", referenced from:
std::1::basic_stringstream<char, std::__1::char_traits, std:: 1::allocator >::basic_stringstream() in libgtest.a(gtest-all.cc.o)
testing::internal::edit_distance::CreateUnifiedDiff(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std:: 1::allocator<std::__1::basic_string<char, std:: 1::char_traits, std::1::allocator > > > const&, std:: 1::vector<std::1::basic_string<char, std::__1::char_traits, std:: 1::allocator >, std::1::allocator<std::1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > const&, unsigned long) in libgtest.a(gtest-all.cc.o)
testing::AssertionResult testing::internal::FloatingPointLE(char const , char const, float, float) in libgtest.a(gtest-all.cc.o)
testing::AssertionResult testing::internal::FloatingPointLE(char const , char const, double, double) in libgtest.a(gtest-all.cc.o)
std::1::basic_string<char, std::__1::char_traits, std:: 1::allocator > testing::PrintToString<char const >(char const const&) in libgtest.a(gtest-all.cc.o)
testing::internal::String::FormatHexUInt32(unsigned int) in libgtest.a(gtest-all.cc.o)
testing::internal::WideStringToUtf8(wchar_t const, int) in libgtest.a(gtest-all.cc.o)
...
"VTT for std::1::basic_ostringstream<char, std::__1::char_traits, std:: 1::allocator >", referenced from:
testing::internal::DeathTestImpl::Passed(bool) in libgtest.a(gtest-all.cc.o)
"vtable for std::1::basic_stringbuf<char, std::__1::char_traits, std:: 1::allocator >", referenced from:
testing::internal::DeathTestImpl::Passed(bool) in libgtest.a(gtest-all.cc.o)
std::1::basic_stringstream<char, std::__1::char_traits, std:: 1::allocator >::basic_stringstream() in libgtest.a(gtest-all.cc.o)
testing::internal::edit_distance::CreateUnifiedDiff(std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std:: 1::allocator<std::__1::basic_string<char, std:: 1::char_traits, std::1::allocator > > > const&, std:: 1::vector<std::1::basic_string<char, std::__1::char_traits, std:: 1::allocator >, std::1::allocator<std::1::basic_string<char, std::1::char_traits, std::1::allocator > > > const&, unsigned long) in libgtest.a(gtest-all.cc.o)
testing::AssertionResult testing::internal::FloatingPointLE(char const, char const, float, float) in libgtest.a(gtest-all.cc.o)
testing::AssertionResult testing::internal::FloatingPointLE(char const, char const, double, double) in libgtest.a(gtest-all.cc.o)
std:: 1::basic_string<char, std:: 1::char_traits, std::1::allocator > testing::PrintToString<char const>(char const const&) in libgtest.a(gtest-all.cc.o)
testing::internal::String::FormatHexUInt32(unsigned int) in libgtest.a(gtest-all.cc.o)
...
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for std:: 1::basic_stringstream<char, std::1::char_traits, std::1::allocator >", referenced from:
std:: 1::basic_stringstream<char, std:: 1::char_traits, std::1::allocator >::basic_stringstream() in libgtest.a(gtest-all.cc.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
"vtable for std::__1::basic_ostringstream<char, std:: 1::char_traits, std::__1::allocator >", referenced from:
testing::internal::DeathTestImpl::Passed(bool) in libgtest.a(gtest-all.cc.o)
NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: [test/crypto-bip32/CMakeFiles/bip32-secp256k1-serialization-test.dir/build.make:102: test/crypto-bip32/bip32-secp256k1-serialization-test] Error 1
make[1]: [CMakeFiles/Makefile2:472: test/crypto-bip32/CMakeFiles/bip32-secp256k1-serialization-test.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Macbook OS version :12.7 openssl version: 1.1