Boost not taken from dedicated build on macOS

Dear experts,

with the latest version of cmake (v3.15) and boost (v1.71) from homebrew it seems that the dedicated build of boost is ignored and the system boost is taken. See example below. This raises a couple of problems, i.e. in DDS but also in FairRoot.

Any idea how this can be circumvented? Removing the boost version from homebrew is not a solution as it might be needed by other applications.

Thanks in advance!

Cheers

Markus

Example of the problem (from DDS):

DEBUG:O2:DDS:aliceo2: ++ cmake /Users/markusfasel/alice/sw/SOURCES/DDS/2.4/2.4 -DCMAKE_INSTALL_PREFIX=/Users/markusfasel/alice/sw/INSTALLROOT/a7fa88b3d32b1aadf0579c7ca6da8c64df529f0c/osx_x86-64/DDS/2.4-1 -DBOOST_ROOT=/Users/markusfasel/alice/sw/osx_x86-64/boost/v1.70.0-1 -DBoost_NO_SYSTEM_PATHS=ON
DEBUG:O2:DDS:aliceo2: – The C compiler identification is AppleClang 11.0.0.11000020
DEBUG:O2:DDS:aliceo2: – The CXX compiler identification is AppleClang 11.0.0.11000020
DEBUG:O2:DDS:aliceo2: – Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
DEBUG:O2:DDS:aliceo2: – Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc – works
DEBUG:O2:DDS:aliceo2: – Detecting C compiler ABI info
DEBUG:O2:DDS:aliceo2: – Detecting C compiler ABI info - done
DEBUG:O2:DDS:aliceo2: – Detecting C compile features
DEBUG:O2:DDS:aliceo2: – Detecting C compile features - done
DEBUG:O2:DDS:aliceo2: – Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
DEBUG:O2:DDS:aliceo2: – Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ – works
DEBUG:O2:DDS:aliceo2: – Detecting CXX compiler ABI info
DEBUG:O2:DDS:aliceo2: – Detecting CXX compiler ABI info - done
DEBUG:O2:DDS:aliceo2: – Detecting CXX compile features
DEBUG:O2:DDS:aliceo2: – Detecting CXX compile features - done
DEBUG:O2:DDS:aliceo2: – Building DDS version: 2.4
DEBUG:O2:DDS:aliceo2: – Found Doxygen: /usr/local/bin/doxygen (found version “1.8.16”) found components: doxygen dot
DEBUG:O2:DDS:aliceo2: – Build API docs - YES
DEBUG:O2:DDS:aliceo2: CMake Warning at /usr/local/lib/cmake/boost_log-1.71.0/libboost_log-variant-shared.cmake:59 (message):
DEBUG:O2:DDS:aliceo2: Target Boost::log already has an imported location
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_log-mt.dylib’, which will be overwritten with
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_log.dylib’
DEBUG:O2:DDS:aliceo2: Call Stack (most recent call first):
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_log-1.71.0/boost_log-config.cmake:43 (include)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
DEBUG:O2:DDS:aliceo2: /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindBoost.cmake:443 (find_package)
DEBUG:O2:DDS:aliceo2: CMakeLists.txt:197 (find_package)
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: CMake Warning at /usr/local/lib/cmake/boost_chrono-1.71.0/libboost_chrono-variant-shared.cmake:59 (message):
DEBUG:O2:DDS:aliceo2: Target Boost::chrono already has an imported location
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_chrono-mt.dylib’, which will be overwritten with
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_chrono.dylib’
DEBUG:O2:DDS:aliceo2: Call Stack (most recent call first):
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_chrono-1.71.0/boost_chrono-config.cmake:43 (include)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_log-1.71.0/boost_log-config.cmake:91 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
DEBUG:O2:DDS:aliceo2: /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindBoost.cmake:443 (find_package)
DEBUG:O2:DDS:aliceo2: CMakeLists.txt:197 (find_package)
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: CMake Warning at /usr/local/lib/cmake/boost_date_time-1.71.0/libboost_date_time-variant-shared.cmake:59 (message):
DEBUG:O2:DDS:aliceo2: Target Boost::date_time already has an imported location
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_date_time-mt.dylib’, which will be overwritten
DEBUG:O2:DDS:aliceo2: with ‘/usr/local/lib/libboost_date_time.dylib’
DEBUG:O2:DDS:aliceo2: Call Stack (most recent call first):
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_date_time-1.71.0/boost_date_time-config.cmake:43 (include)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_log-1.71.0/boost_log-config.cmake:91 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
DEBUG:O2:DDS:aliceo2: /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindBoost.cmake:443 (find_package)
DEBUG:O2:DDS:aliceo2: CMakeLists.txt:197 (find_package)
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: CMake Warning at /usr/local/lib/cmake/boost_filesystem-1.71.0/libboost_filesystem-variant-shared.cmake:59 (message):
DEBUG:O2:DDS:aliceo2: Target Boost::filesystem already has an imported location
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_filesystem-mt.dylib’, which will be overwritten
DEBUG:O2:DDS:aliceo2: with ‘/usr/local/lib/libboost_filesystem.dylib’
DEBUG:O2:DDS:aliceo2: Call Stack (most recent call first):
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_filesystem-1.71.0/boost_filesystem-config.cmake:43 (include)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_log-1.71.0/boost_log-config.cmake:91 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
DEBUG:O2:DDS:aliceo2: /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindBoost.cmake:443 (find_package)
DEBUG:O2:DDS:aliceo2: CMakeLists.txt:197 (find_package)
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: CMake Warning at /usr/local/lib/cmake/boost_regex-1.71.0/libboost_regex-variant-shared.cmake:59 (message):
DEBUG:O2:DDS:aliceo2: Target Boost::regex already has an imported location
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_regex-mt.dylib’, which will be overwritten with
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_regex.dylib’
DEBUG:O2:DDS:aliceo2: Call Stack (most recent call first):
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_regex-1.71.0/boost_regex-config.cmake:43 (include)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_log-1.71.0/boost_log-config.cmake:91 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
DEBUG:O2:DDS:aliceo2: /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindBoost.cmake:443 (find_package)
DEBUG:O2:DDS:aliceo2: CMakeLists.txt:197 (find_package)
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: CMake Warning at /usr/local/lib/cmake/boost_log_setup-1.71.0/libboost_log_setup-variant-shared.cmake:59 (message):
DEBUG:O2:DDS:aliceo2: Target Boost::log_setup already has an imported location
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_log_setup-mt.dylib’, which will be overwritten
DEBUG:O2:DDS:aliceo2: with ‘/usr/local/lib/libboost_log_setup.dylib’
DEBUG:O2:DDS:aliceo2: Call Stack (most recent call first):
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_log_setup-1.71.0/boost_log_setup-config.cmake:43 (include)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
DEBUG:O2:DDS:aliceo2: /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindBoost.cmake:443 (find_package)
DEBUG:O2:DDS:aliceo2: CMakeLists.txt:197 (find_package)
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: CMake Warning at /usr/local/lib/cmake/boost_program_options-1.71.0/libboost_program_options-variant-shared.cmake:59 (message):
DEBUG:O2:DDS:aliceo2: Target Boost::program_options already has an imported location
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_program_options-mt.dylib’, which will be
DEBUG:O2:DDS:aliceo2: overwritten with ‘/usr/local/lib/libboost_program_options.dylib’
DEBUG:O2:DDS:aliceo2: Call Stack (most recent call first):
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_program_options-1.71.0/boost_program_options-config.cmake:43 (include)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
DEBUG:O2:DDS:aliceo2: /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindBoost.cmake:443 (find_package)
DEBUG:O2:DDS:aliceo2: CMakeLists.txt:197 (find_package)
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: CMake Warning at /usr/local/lib/cmake/boost_system-1.71.0/libboost_system-variant-shared.cmake:59 (message):
DEBUG:O2:DDS:aliceo2: Target Boost::system already has an imported location
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_system-mt.dylib’, which will be overwritten with
DEBUG:O2:DDS:aliceo2: ‘/usr/local/lib/libboost_system.dylib’
DEBUG:O2:DDS:aliceo2: Call Stack (most recent call first):
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/boost_system-1.71.0/boost_system-config.cmake:43 (include)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
DEBUG:O2:DDS:aliceo2: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
DEBUG:O2:DDS:aliceo2: /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/FindBoost.cmake:443 (find_package)
DEBUG:O2:DDS:aliceo2: CMakeLists.txt:197 (find_package)
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: – Found Boost: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version “1.71.0”, minimum required is “1.67”) found components: log log_setup thread program_options filesystem system regex
DEBUG:O2:DDS:aliceo2: – Build MiscCommon - YES
DEBUG:O2:DDS:aliceo2: – Build the dds_ncf lib - YES
DEBUG:O2:DDS:aliceo2: – Build dds_ncf unit tests - NO
DEBUG:O2:DDS:aliceo2: – Build MiscCommon unit tests - NO
DEBUG:O2:DDS:aliceo2: – Build dds_protocol_lib - YES
DEBUG:O2:DDS:aliceo2: – Build dds_protocol_lib tests - NO
DEBUG:O2:DDS:aliceo2: – Build dds-daemonize - YES
DEBUG:O2:DDS:aliceo2: – Build dds-daemonize unit tests - NO
DEBUG:O2:DDS:aliceo2: – Build dds-commander - YES
DEBUG:O2:DDS:aliceo2: – Build dds-commander unit tests - NO
DEBUG:O2:DDS:aliceo2: – Build dds-topology - YES
DEBUG:O2:DDS:aliceo2: – Build dds_topology_lib - YES
DEBUG:O2:DDS:aliceo2: – Build dds_topology_lib unit tests - NO
DEBUG:O2:DDS:aliceo2: – Build dds-agent - YES
DEBUG:O2:DDS:aliceo2: – Build dds-agent unit tests - NO
DEBUG:O2:DDS:aliceo2: – Build dds-user-defaults - YES
DEBUG:O2:DDS:aliceo2: – Build dds-user-defaults unit tests - NO
DEBUG:O2:DDS:aliceo2: – Build dds-info - YES
DEBUG:O2:DDS:aliceo2: – Build dds-submit - YES
DEBUG:O2:DDS:aliceo2: – Build dds-agent-cmd - YES
DEBUG:O2:DDS:aliceo2: – Build dds-test - YES
DEBUG:O2:DDS:aliceo2: – Build dds-octopus - YES
DEBUG:O2:DDS:aliceo2: – Build dds-tutorials - YES
DEBUG:O2:DDS:aliceo2: – Build Tutorial1 - YES
DEBUG:O2:DDS:aliceo2: – Build Tutorial2 - YES
DEBUG:O2:DDS:aliceo2: – Build Tutorial3 - YES
DEBUG:O2:DDS:aliceo2: – Build dds-stat - YES
DEBUG:O2:DDS:aliceo2: – Build dds-custom-cmd - YES
DEBUG:O2:DDS:aliceo2: – Build dds_intercom_lib - YES
DEBUG:O2:DDS:aliceo2: – Build dds_intercom_lib tests - NO
DEBUG:O2:DDS:aliceo2: – Build dds-submit-ssh - YES
DEBUG:O2:DDS:aliceo2: – Build dds-submit-ssh unit tests - NO
DEBUG:O2:DDS:aliceo2: – Build dds-submit-localhost - YES
DEBUG:O2:DDS:aliceo2: – Build dds-submit-slurm - YES
DEBUG:O2:DDS:aliceo2: – Build dds-submit-pbs - YES
DEBUG:O2:DDS:aliceo2: – Build dds-submit-lsf - YES
DEBUG:O2:DDS:aliceo2: – Build dds-session - YES
DEBUG:O2:DDS:aliceo2: – Build dds_tools_lib - YES
DEBUG:O2:DDS:aliceo2: – Build dds_tools_lib unit tests - NO
DEBUG:O2:DDS:aliceo2: – Configuring done
DEBUG:O2:DDS:aliceo2: – Generating done
DEBUG:O2:DDS:aliceo2: CMake Warning:
DEBUG:O2:DDS:aliceo2: Manually-specified variables were not used by the project:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: BOOST_ROOT
DEBUG:O2:DDS:aliceo2: Boost_NO_SYSTEM_PATHS
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2:
DEBUG:O2:DDS:aliceo2: – Build files have been written to: /Users/markusfasel/alice/sw/BUILD/a7fa88b3d32b1aadf0579c7ca6da8c64df529f0c/DDS

Hi,
I can confirm this problem. I presume that we could force the boost version to 1.70 and it would avoid picking it up from the system.
To be discussed in WP3 tomorrow.
cheers,
Barth

We already force boost 1.70 at:

so something is wrong with the check…