After running 'autogen.sh', './configure' and then 'make', I keep getting the following error:
Undefined symbols for architecture x86_64: "__ZN5boost10filesystem4path5imbueERKSt6locale", referenced from: __Z16SetupEnvironmentv in libbitcoin_util.a(libbitcoin_util_a-system.o) ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make[2]: *** [bitcoind] Error 1 make[1]: *** [check-recursive] Error 1 make: *** [check-recursive] Error 1
I was told that boost is clang compiled and thus, GCC incompatible, so I've been trying to recompile boost with GCC via:
HOMEBREW_CC=gcc-10 HOMEBREW_CXX=g++-10 brew install --build-from-source boost --HEAD
- `brew install boost --build-from-source --HEAD'
Both of these commands throw the following patching error though:
==> Patching ==> Applying 7b3fc734242eea9af734d6cd8ccb3d8f6b64c5b2.patch patching file boost-install.jam Hunk #1 FAILED at 483. 1 out of 1 hunk FAILED -- saving rejects to file boost-install.jam.rej
Any idea how to fix this problem and successfully recompile boost? Please let me know!
EDIT: For clarification, I'm trying to build Bitcoin Core v0.21.0 on macOS Catalina version 10.15.7
UPDATE: Finally got this working - turned out I managedhad an outdated version of gcc installed via MacPorts, in addition to work around the Boost issue by compilingApple's default compiler, which seemed to have been interfering with clangthings. Once I used the following procedure:
./autogen.sh
.
uninstalled MacPorts, everything started working smoothly if I configured with ./configure CC=clang CXX=clang++ --with-incompatible-bdb --with-gui=no
.
make
However, now I keep getting the following error after I run make:
CXX util/libbitcoinconsensus_la-strencodings.lo
CXXLD libbitcoinconsensus.la
Making all in doc/man
make[1]: Nothing to be done for 'all'
make[1]: Nothing to be done for 'all-am'
Any idea how to fix this? Should I move this into a new post?