This might be a specific issue with the machine I'm trying this on, presumably some recent configuration change on the machine, because it used to work fine and also works on another Mac.
With a fresh checkout, at least as of b3a715301a0fd972fb2f3bd36e2680b3cdbbab26 (and 1000 commits before that) on macOS 10.14.3:
I can't find an obvious explanation and the error message isn't very useful.
ccache -c
./autogen
./configure --with-miniupnpc=no --with-zmq --with-qrencode --disable-bip70 --enable-debug
make -j5 src/bitcoind
I tried without --enable-debug too.
Throws a bunch of warnings like:
CXXLD bitcoind
ld: warning: ld: warning: ignoring file libbitcoin_wallet.a, file was built for archive which is not the architecture being linked (x86_64): libbitcoin_wallet.aignoring file libbitcoin_common.a, file was built for archive which is not the architecture being linked (x86_64): libbitcoin_common.a
Fails with:
Undefined symbols for architecture x86_64:
"interfaces::MakeChain()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"SetupServerArgs()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"ArgsManager::ParseParameters(int, char const* const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"HelpRequested(ArgsManager const&)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"FormatFullVersion()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"FormatParagraph(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long, unsigned long)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"ArgsManager::GetHelpMessage() const", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"ArgsManager::ReadConfigFiles(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"ArgsManager::GetChainName() const", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"SelectParams(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"MilliSleep(long long)", referenced from:
WaitForShutdown() in bitcoind-bitcoind.o
"AppInitLockDataDirectory()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"InitParameterInteraction()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"ShutdownRequested()", referenced from:
WaitForShutdown() in bitcoind-bitcoind.o
"InitLogging()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"AppInitSanityChecks()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"AppInitBasicSetup()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"Interrupt()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
WaitForShutdown() in bitcoind-bitcoind.o
"ArgsManager::GetBoolArg(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) const", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"AppInitMain(InitInterfaces&)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"ArgsManager::GetArg(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"LicenseInfo()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"ArgsManager::SoftSetBoolArg(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"ArgsManager::IsArgSet(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"AppInitParameterInteraction()", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"noui_connect()", referenced from:
_main in bitcoind-bitcoind.o
"GetDataDir(bool)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"Shutdown(InitInterfaces&)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"PrintExceptionContinue(std::exception const*, char const*)", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"_gArgs", referenced from:
AppInit(int, char**) in bitcoind-bitcoind.o
"SetupEnvironment()", referenced from:
_main in bitcoind-bitcoind.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
It sounds like something is deeply messed up on my system, but no idea where to look.
I went to the brew doctor and did everything it told me.