Boost 1.68 not compiling on mac

Dear experts,

With the latest update of macOS from last week I get a compilation error of boost 1.68 on mac - 1.69 however works fine. You can find the logs below (only relevant lines raising the errors). I am using the build recipes of yesterday’s master building with the O2 defaults. As far as I understand DDS is not compatible with 1.69 yet (due to changes in boost-system) - any chance that it get compatible soon?

Cheers

Markus

DEBUG:O2:boost:ali-master:
DEBUG:O2:boost:ali-master: In file included from libs/system/src/error_code.cpp:19:
DEBUG:O2:boost:ali-master: ./boost/system/detail/error_code.ipp:53:58: error: redefinition of ‘message’
DEBUG:O2:boost:ali-master: BOOST_SYSTEM_DECL_ std::string generic_error_category::message( int ev ) const
DEBUG:O2:boost:ali-master: ^
DEBUG:O2:boost:ali-master: /usr/local/include/boost/system/error_code.hpp:891:67: note: previous definition is here
DEBUG:O2:boost:ali-master: inline std::string boost::system::detail::generic_error_category::message( int ev ) const
DEBUG:O2:boost:ali-master: ^
DEBUG:O2:boost:ali-master: In file included from libs/system/src/error_code.cpp:19:
DEBUG:O2:boost:ali-master: ./boost/system/detail/error_code.ipp:146:61: error: redefinition of ‘default_error_condition’
DEBUG:O2:boost:ali-master: BOOST_SYSTEM_DECL_ error_condition system_error_category::default_error_condition( int ev ) const
DEBUG:O2:boost:ali-master: ^
DEBUG:O2:boost:ali-master: /usr/local/include/boost/system/error_code.hpp:926:85: note: previous definition is here
DEBUG:O2:boost:ali-master: inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
DEBUG:O2:boost:ali-master: ^
DEBUG:O2:boost:ali-master: In file included from libs/system/src/error_code.cpp:19:
DEBUG:O2:boost:ali-master: ./boost/system/detail/error_code.ipp:351:57: error: redefinition of ‘message’
DEBUG:O2:boost:ali-master: BOOST_SYSTEM_DECL_ std::string system_error_category::message( int ev ) const
DEBUG:O2:boost:ali-master: ^
DEBUG:O2:boost:ali-master: /usr/local/include/boost/system/error_code.hpp:931:66: note: previous definition is here
DEBUG:O2:boost:ali-master: inline std::string boost::system::detail::system_error_category::message( int ev ) const
DEBUG:O2:boost:ali-master: ^
DEBUG:O2:boost:ali-master: 3 errors generated.
DEBUG:O2:boost:ali-master: …failed darwin.compile.c++ build-boost/boost/bin.v2/libs/system/build/darwin-4.2.1/release/cxxstd-17-iso/threading-multi/error_code.o…
DEBUG:O2:boost:ali-master: …skipped <pbuild-boost/boost/bin.v2/libs/system/build/darwin-4.2.1/release/cxxstd-17-iso/threading-multi>libboost_system.dylib for lack of <pbuild-boost/boost/bin.v2/libs/system/build/darwin-4.2.1/release/cxxstd-17-iso/threading-multi>error_code.o…
DEBUG:O2:boost:ali-master: …skipped <p/Users/markusfasel/alice/sw/INSTALLROOT/0c55c58cd09fa836e3027f6ce02bf5c40c5d6a3f/osx_x86-64/boost/v1.68.0-3/lib>libboost_system.dylib for lack of <pbuild-boost/boost/bin.v2/libs/system/build/darwin-4.2.1/release/cxxstd-17-iso/threading-multi>libboost_system.dylib…

If it is ok for you, you can remove boost installed by brew. It will then work.

For the rest, I let others answer.

Cheers,
Barth

Thanks Barth for the quick reply, but uninstalling boost from brew is not an option - I might need it for something else.

Cheers

Markus

After some investigation I figured out that the following line is responsible for including the header files from the homebrew boost:

export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:$(python3 -c ‘import sysconfig; print(sysconfig.get_path(“include”))’)"

It’s probably linked to the python coming from homebrew as well. I don’t fully understand this because the include path points to the path in the Cellar subdirectory and not to /usr/local/include. As nevertheless python is disabled on OSX can we disable this line with if [ $ARCHITECURE == … ] …?

Cheers

Markus