MultiChain / multichain

Source code for multichaind, multichain-cli and multichain-util.
GNU General Public License v3.0
536 stars 259 forks source link

macOS High Sierra compile error #48

Open burtonsamograd opened 6 years ago

burtonsamograd commented 6 years ago

Latest git from today.

Ark:multichain burton$ make
Making all in src
  CXXLD    libbitcoinconsensus.la
Undefined symbols for architecture x86_64:
  "_MAX_SIZE", referenced from:
      unsigned long long ReadCompactSize<(anonymous namespace)::TxInputStream>((anonymous namespace)::TxInputStream&) in libbitcoinconsensus_la-bitcoinconsensus.o
  "ExtractDestination(CScript const&, boost::variant<CNoDestination, CKeyID, CScriptID, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_>&)", referenced from:
      VerifyScript(CScript const&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "mc_Features::FixedIn10007()", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "mc_MultichainParams::IsProtocolMultichain()", referenced from:
      mc_Permissions::CanSend(void const*, void const*) in libbitcoinconsensus_la-permission.o
      CScript::IsPayToScriptHash() const in libbitcoinconsensus_la-script.o
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
      TransactionSignatureChecker::CheckSig(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, CScript const&, bool&) const in libbitcoinconsensus_la-interpreter.o
  "_MCP_ANYONE_CAN_SEND", referenced from:
      mc_Permissions::CanSend(void const*, void const*) in libbitcoinconsensus_la-permission.o
  "CBlockHeader::GetHash() const", referenced from:
      CMainParams::CMainParams() in libbitcoinconsensus_la-chainparams.o
      CTestNetParams::CTestNetParams() in libbitcoinconsensus_la-chainparams.o
      CRegTestParams::CRegTestParams() in libbitcoinconsensus_la-chainparams.o
  "_leveldb_create_iterator", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "boost::system::system_category()", referenced from:
      __GLOBAL__sub_I_utilwrapper.cpp in libbitcoinconsensus_la-utilwrapper.o
      __GLOBAL__sub_I_buildgenesis.cpp in libbitcoinconsensus_la-buildgenesis.o
      __GLOBAL__sub_I_version.cpp in libbitcoinconsensus_la-version.o
      __GLOBAL__sub_I_custom.cpp in libbitcoinconsensus_la-custom.o
      __GLOBAL__sub_I_chainparams.cpp in libbitcoinconsensus_la-chainparams.o
  "_leveldb_iter_seek", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "_leveldb_iter_key", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "CService::CService(in6_addr const&, unsigned short)", referenced from:
      convertSeed6(std::__1::vector<CAddress, std::__1::allocator<CAddress> >&, SeedSpec6 const*, unsigned int) in libbitcoinconsensus_la-chainparams.o
  "GetTime()", referenced from:
      convertSeed6(std::__1::vector<CAddress, std::__1::allocator<CAddress> >&, SeedSpec6 const*, unsigned int) in libbitcoinconsensus_la-chainparams.o
  "_leveldb_get", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "mc_Features::VerifySizeOfOpDropElements()", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "mc_Features::Streams()", referenced from:
      mc_Permissions::CanSend(void const*, void const*) in libbitcoinconsensus_la-permission.o
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
      VerifyScript(CScript const&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "_leveldb_iter_valid", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "_leveldb_free", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "boost::system::generic_category()", referenced from:
      __GLOBAL__sub_I_utilwrapper.cpp in libbitcoinconsensus_la-utilwrapper.o
      __GLOBAL__sub_I_buildgenesis.cpp in libbitcoinconsensus_la-buildgenesis.o
      __GLOBAL__sub_I_version.cpp in libbitcoinconsensus_la-version.o
      __GLOBAL__sub_I_custom.cpp in libbitcoinconsensus_la-custom.o
      __GLOBAL__sub_I_chainparams.cpp in libbitcoinconsensus_la-chainparams.o
  "_leveldb_iter_destroy", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "GetRand(unsigned long long)", referenced from:
      convertSeed6(std::__1::vector<CAddress, std::__1::allocator<CAddress> >&, SeedSpec6 const*, unsigned int) in libbitcoinconsensus_la-chainparams.o
  "_COIN", referenced from:
      CMainParams::CMainParams() in libbitcoinconsensus_la-chainparams.o
  "CBlock::BuildMerkleTree(bool*) const", referenced from:
      CMainParams::CMainParams() in libbitcoinconsensus_la-chainparams.o
  "_leveldb_iter_value", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "_MAX_SCRIPT_ELEMENT_SIZE", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "CAddress::CAddress(CService, unsigned long long)", referenced from:
      convertSeed6(std::__1::vector<CAddress, std::__1::allocator<CAddress> >&, SeedSpec6 const*, unsigned int) in libbitcoinconsensus_la-chainparams.o
  "_mc_gState", referenced from:
      mc_Permissions::CanSend(void const*, void const*) in libbitcoinconsensus_la-permission.o
      CScript::IsPayToScriptHash() const in libbitcoinconsensus_la-script.o
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
      TransactionSignatureChecker::CheckSig(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, CScript const&, bool&) const in libbitcoinconsensus_la-interpreter.o
      VerifyScript(CScript const&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.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[1]: *** [libbitcoinconsensus.la] Error 1
make: *** [all-recursive] Error 1
dsharhon commented 6 years ago

I think you have to install Boost 1.65 from Macports. The newer version 1.66 from Homebrew won't work.

burtonsamograd commented 6 years ago

Still didn't compile. I tried a few different things but still ran into other problems. Just going with the precompiled binaries for now.

Thanks for the suggestion.

johnscode commented 6 years ago

FWIW, I did the following to get a good compile on high sierra:

brew uninstall boost brew install boost@1.57 brew link boost@1.57 --force

get a number of warnings but no errors