cpp-ethereum fails to build

I'm trying to build cpp-ethereum headless from HEAD.
Steps after cloning.

cmake ../cpp-ethereum -DCMAKE_BUILD_TYPE=Release -DHEADLESS=1
make

Then it crash when linking testeth. I'm I missing something?

Linking CXX executable testeth [4/1303]
../libethereum/libethereum.a(Common.cpp.o): In function `eth::sha3(eth::vector_ref, eth::vector_ref)':
Common.cpp:(.text+0x41a): undefined reference to `vtable for CryptoPP::SHA3'
Common.cpp:(.text+0x446): undefined reference to `CryptoPP::SHA3::Restart()'
Common.cpp:(.text+0x463): undefined reference to `CryptoPP::SHA3::Update(unsigned char const*, unsigned long)'
Common.cpp:(.text+0x49a): undefined reference to `vtable for CryptoPP::SHA3'
Common.cpp:(.text+0x4d7): undefined reference to `vtable for CryptoPP::SHA3'
../libethereum/libethereum.a(Common.cpp.o): In function `CryptoPP::SHA3_256::~SHA3_256()':
Common.cpp:(.text._ZN8CryptoPP8SHA3_256D2Ev[_ZN8CryptoPP8SHA3_256D5Ev]+0x6): undefined reference to `vtable for CryptoPP::SHA3'
../libethereum/libethereum.a(Common.cpp.o): In function `CryptoPP::SHA3_256::~SHA3_256()':
Common.cpp:(.text._ZN8CryptoPP8SHA3_256D0Ev[_ZN8CryptoPP8SHA3_256D0Ev]+0x6): undefined reference to `vtable for CryptoPP::SHA3'
../libethereum/libethereum.a(Common.cpp.o):(.rodata._ZTVN8CryptoPP8SHA3_256E[_ZTVN8CryptoPP8SHA3_256E]+0x30): undefined reference to `CryptoPP::SHA3::Update(unsigned char const*, unsigne
d long)'
../libethereum/libethereum.a(Common.cpp.o):(.rodata._ZTVN8CryptoPP8SHA3_256E[_ZTVN8CryptoPP8SHA3_256E]+0x48): undefined reference to `CryptoPP::SHA3::Restart()'
../libethereum/libethereum.a(Common.cpp.o):(.rodata._ZTVN8CryptoPP8SHA3_256E[_ZTVN8CryptoPP8SHA3_256E]+0x88): undefined reference to `CryptoPP::SHA3::TruncatedFinal(unsigned char*, unsig
ned long)'
../libethereum/libethereum.a(Common.cpp.o):(.rodata._ZTIN8CryptoPP8SHA3_256E[_ZTIN8CryptoPP8SHA3_256E]+0x10): undefined reference to `typeinfo for CryptoPP::SHA3'
../libethereum/libethereum.a(State.cpp.o): In function `eth::State::openDB(std::string, bool)':
State.cpp:(.text+0xc89): undefined reference to `boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)'
State.cpp:(.text+0xcd2): undefined reference to `boost::filesystem::detail::remove_all(boost::filesystem::path const&, boost::system::error_code*)'
../libethereum/libethereum.a(State.cpp.o): In function `eth::State::execute(eth::FixedHash<20u>, eth::FixedHash<20u>, boost::multiprecision::number, (boost::multiprecision::expression_template_option)0>, std::vector
, (boost::multiprecision::expression_template_option)0>, std::allocator, (boost::multiprecision::expression_template_option)0> > > const&, boost::multiprecision::number, (boost::multiprecision::expression_template
_option)0>*)':
State.cpp:(.text+0xbf5a): undefined reference to `CryptoPP::SHA3::Update(unsigned char const*, unsigned long)'
State.cpp:(.text+0xbf9c): undefined reference to `CryptoPP::SHA3::TruncatedFinal(unsigned char*, unsigned long)'
State.cpp:(.text+0xbfdd): undefined reference to `vtable for CryptoPP::SHA3'
State.cpp:(.text+0xdf15): undefined reference to `vtable for CryptoPP::SHA3'
../libethereum/libethereum.a(State.cpp.o): In function `CryptoPP::SHA3::SHA3(unsigned int)':
State.cpp:(.text._ZN8CryptoPP4SHA3C2Ej[_ZN8CryptoPP4SHA3C5Ej]+0x2a): undefined reference to `vtable for CryptoPP::SHA3'
State.cpp:(.text._ZN8CryptoPP4SHA3C2Ej[_ZN8CryptoPP4SHA3C5Ej]+0x52): undefined reference to `CryptoPP::SHA3::Restart()'
../libethereum/libethereum.a(FileSystem.cpp.o): In function `boost::filesystem::operator/(boost::filesystem::path const&, boost::filesystem::path const&)':
FileSystem.cpp:(.text._ZN5boost10filesystemdvERKNS0_4pathES3_[_ZN5boost10filesystemdvERKNS0_4pathES3_]+0x1f): undefined reference to `boost::filesystem::path::operator/=(boost::filesyste
m::path const&)'
../libethereum/libethereum.a(BlockChain.cpp.o): In function `eth::BlockChain::BlockChain(std::string, bool)':
BlockChain.cpp:(.text+0x1b6f): undefined reference to `boost::filesystem::detail::create_directories(boost::filesystem::path const&, boost::system::error_code*)'
BlockChain.cpp:(.text+0x1bca): undefined reference to `boost::filesystem::detail::remove_all(boost::filesystem::path const&, boost::system::error_code*)'
BlockChain.cpp:(.text+0x1c35): undefined reference to `boost::filesystem::detail::remove_all(boost::filesystem::path const&, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
make[1]: *** [test/CMakeFiles/testeth.dir/all] Error 2
make: *** [all] Error 2

Comments

  • null_radixnull_radix Member Posts: 17
    Ok I figured out what went wrong with cryptocpp. You cant just do `make` you need `make static dynamic test` see here http://www.cryptopp.com/wiki/Linux#Makefile
    Now I'm down to figure out boost linking errors

    Linking CXX executable testeth
    ../libethereum/libethereum.a(State.cpp.o): In function `eth::State::openDB(std::string, bool)':
    State.cpp:(.text+0xc89): undefined reference to `boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)'
    State.cpp:(.text+0xcd2): undefined reference to `boost::filesystem::detail::remove_all(boost::filesystem::path const&, boost::system::error_code*)'
    ../libethereum/libethereum.a(FileSystem.cpp.o): In function `boost::filesystem::operator/(boost::filesystem::path const&, boost::filesystem::path const&)':
    FileSystem.cpp:(.text._ZN5boost10filesystemdvERKNS0_4pathES3_[_ZN5boost10filesystemdvERKNS0_4pathES3_]+0x1f): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'
    ../libethereum/libethereum.a(BlockChain.cpp.o): In function `eth::BlockChain::BlockChain(std::string, bool)':
    BlockChain.cpp:(.text+0x1b6f): undefined reference to `boost::filesystem::detail::create_directories(boost::filesystem::path const&, boost::system::error_code*)'
    BlockChain.cpp:(.text+0x1bca): undefined reference to `boost::filesystem::detail::remove_all(boost::filesystem::path const&, boost::system::error_code*)'
    BlockChain.cpp:(.text+0x1c35): undefined reference to `boost::filesystem::detail::remove_all(boost::filesystem::path const&, boost::system::error_code*)'
    collect2: error: ld returned 1 exit status
    make[2]: *** [test/testeth] Error 1
    make[1]: *** [test/CMakeFiles/testeth.dir/all] Error 2
    make: *** [all] Error 2
  • null_radixnull_radix Member Posts: 17
    got it, had an older version of boost
Sign In or Register to comment.