-
Notifications
You must be signed in to change notification settings - Fork 5
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
cmake: Add BOOST_NO_CXX98_FUNCTION_BASE
definition when needed
#219
Conversation
This is what I got with -- Found Boost: /opt/homebrew/include (found suitable version "1.76.0", minimum required is "1.73.0")
-- Performing Test NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE
-- Performing Test NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE - Success
-- Performing Test HAVE_BOOST_INCLUDED_UNIT_TEST_H
-- Performing Test HAVE_BOOST_INCLUDED_UNIT_TEST_H - Failed
CMake Error at cmake/module/AddBoostIfNeeded.cmake:66 (message):
Building test_bitcoin executable requested but
boost/test/included/unit_test.hpp header not available.
Call Stack (most recent call first):
CMakeLists.txt:360 (add_boost_if_needed)
-- Configuring incomplete, errors occurred! Tested on ARM Mac |
Add `BOOST_NO_CXX98_FUNCTION_BASE` definition when needed. This mirrors the master branch behavior and fixes native build on macOS with Homebrew's `boost@1.76`.
Test old Boost on macOS
Thank you for testing! That was a bug in the staging branch as well. So I've reworked this PR and added a new CI job that tests it. This CI job fails on the staging branch. |
ACK bf49bde On In file included from /Users/maxedwards/source/bitcoin/src/common/interfaces.cpp:8:
In file included from /opt/homebrew/include/boost/signals2/connection.hpp:18:
In file included from /opt/homebrew/include/boost/function.hpp:30:
In file included from /opt/homebrew/include/boost/function/detail/prologue.hpp:17:
In file included from /opt/homebrew/include/boost/function/function_base.hpp:21:
In file included from /opt/homebrew/include/boost/type_index.hpp:29:
In file included from /opt/homebrew/include/boost/type_index/stl_type_index.hpp:47:
/opt/homebrew/include/boost/container_hash/hash.hpp:131:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct hash_base : std::unary_function<T, std::size_t> {};
~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
^
1 error generated.
gmake[2]: *** [src/CMakeFiles/bitcoin_common.dir/build.make:202: src/CMakeFiles/bitcoin_common.dir/common/interfaces.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1318: src/CMakeFiles/bitcoin_common.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2 |
This PR mirrors the master branch behaviour.