Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests not building due to boost link error #18

Open
kcalvinalvin opened this issue Jul 2, 2022 · 0 comments
Open

Tests not building due to boost link error #18

kcalvinalvin opened this issue Jul 2, 2022 · 0 comments

Comments

@kcalvinalvin
Copy link
Member

I'm on aarch64 Darwin and am unable to build tests due to boost linking error.

src/test/tests.cpp:2:10: fatal error: 'boost/test/included/unit_test.hpp' file not found
#include <boost/test/included/unit_test.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [src/test/test_verify-tests.o] Error 1
make: *** Waiting for unfinished jobs....
src/test/state_tests.cpp:2:10: fatal error: 'boost/test/unit_test.hpp' file not found
#include <boost/test/unit_test.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [src/test/test_verify-state_tests.o] Error 1
src/test/accumulator_tests.cpp:2:10: fatal error: 'boost/test/unit_test.hpp' file not found
#include <boost/test/unit_test.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [src/test/test_verify-accumulator_tests.o] Error 1

Boost is located in /opt/homebrew/Cellar/boost/1.78.0_1 for me and I'm linking them with ./configure --with-boost="/opt/homebrew/Cellar/boost/1.78.0_1". The logs tell me that it was able to find the boost test framework but fails to build. Log:

checking for boostlib >= 1.58.0 (105800) includes in "/opt/homebrew/Cellar/boost/1.78.0_1/include"... yes
checking for boostlib >= 1.58.0 (105800) lib path in "/opt/homebrew/Cellar/boost/1.78.0_1/lib/aarch64-darwin21.5.0"... no
checking for boostlib >= 1.58.0 (105800) lib path in "/opt/homebrew/Cellar/boost/1.78.0_1/lib64"... no
checking for boostlib >= 1.58.0 (105800) lib path in "/opt/homebrew/Cellar/boost/1.78.0_1/lib"... yes
checking for boostlib >= 1.58.0 (105800)... yes
checking whether the Boost::Unit_Test_Framework library is available... yes

I'm able to link boost with Bitcoin core. Seems like Bitcoin Core is just linking directly to the homebrew directory.

S["BOOST_LDFLAGS"]="-L/opt/homebrew//lib"                                                                                                                                                                  
S["BOOST_CPPFLAGS"]="-I/opt/homebrew//include -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_NO_CXX98_FUNCTION_BASE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant