FairRoot build problem on macos
Closed this issue · 6 comments
(Support request)
@dennisklein and I are looking at
https://cdash.gsi.de/testDetails.php?test=7804591&build=263063
( see also FairRootGroup/FairSoft#385 (comment) )
Dennis suggested, that this might be related to c5487a1
Other viable options:
- We're not correctly building FairRoot with C++17 in the "workflow" (despite the
-- GLOBAL CXX FLAGS -std=c++17
in the summary output) - libcxx from clang isn't yet fully C++17 it seems (see https://libcxx.llvm.org/docs/Cxx1zStatus.html )
- Confusing: Building via spack and the
fairroot_devel
env seems to work.
* libcxx from clang isn't yet fully C++17 it seems (see https://libcxx.llvm.org/docs/Cxx1zStatus.html )
If there was an issue with this and c5487a1, it wouldn't build on any mac with clang (but it does), would it?
If there was an issue with this and c5487a1, it wouldn't build on any mac with clang (but it does), would it?
Good point. Adds to my confusion list.
cd /Users/alfaci/dklein/FairRoot/build/base/MQ && /usr/bin/clang++ -DBOOST_ALL_NO_LIB -DBOOST_CONTAINER_DYN_LINK -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SERIALIZATION_DYN_LINK -DBaseMQ_EXPORTS -DFMT_LOCALE -I/Users/alfaci/dklein/FairSoft/install/lib/CLHEP-2.4.4.0/../../include -I/Users/alfaci/dklein/FairRoot/logger -I/Users/alfaci/dklein/FairRoot/fairtools -I/Users/alfaci/dklein/FairRoot/geobase -I/Users/alfaci/dklein/FairRoot/parbase -I/Users/alfaci/dklein/FairRoot/base -I/Users/alfaci/dklein/FairRoot/base/steer -I/Users/alfaci/dklein/FairRoot/base/event -I/Users/alfaci/dklein/FairRoot/base/field -I/Users/alfaci/dklein/FairRoot/base/sim -I/Users/alfaci/dklein/FairRoot/base/sink -I/Users/alfaci/dklein/FairRoot/base/source -I/Users/alfaci/dklein/FairRoot/dbase -I/Users/alfaci/dklein/FairRoot/dbase/dbInterface -I/Users/alfaci/dklein/FairRoot/dbase/dbValidation -I/Users/alfaci/dklein/FairRoot/dbase/dbUtils -I/Users/alfaci/dklein/FairRoot/input/db -I/Users/alfaci/dklein/FairRoot/dbase/dbInput -I/Users/alfaci/dklein/FairRoot/dbase/dbIO -I/Users/alfaci/dklein/FairRoot/alignment -I/Users/alfaci/dklein/FairRoot/base/MQ/devices -I/Users/alfaci/dklein/FairRoot/base/MQ/tasks -I/Users/alfaci/dklein/FairRoot/base/MQ/baseMQtools -I/Users/alfaci/dklein/FairRoot/base/MQ/policies/Sampler -I/Users/alfaci/dklein/FairRoot/base/MQ/policies/Serialization -I/Users/alfaci/dklein/FairRoot/base/MQ/policies/Storage -I/Users/alfaci/dklein/FairRoot/MbsAPI -isystem /Users/alfaci/dklein/FairSoft/install/include/root -isystem /Users/alfaci/dklein/FairSoft/install/include -isystem /Users/alfaci/dklein/FairSoft/install/include/vmc -isystem /Users/alfaci/dklein/FairSoft/install/include/fairmq \
-std=c++17 \
-O2 -g -Wshadow -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.15 -fPIC \
-std=gnu++11 \
-MD -MT base/MQ/CMakeFiles/BaseMQ.dir/tasks/FairMQProcessorTask.cxx.o -MF CMakeFiles/BaseMQ.dir/tasks/FairMQProcessorTask.cxx.o.d -o CMakeFiles/BaseMQ.dir/tasks/FairMQProcessorTask.cxx.o -c /Users/alfaci/dklein/FairRoot/base/MQ/tasks/FairMQProcessorTask.cxx
In file included from /Users/alfaci/dklein/FairRoot/base/MQ/tasks/FairMQProcessorTask.cxx:15:
In file included from /Users/alfaci/dklein/FairRoot/base/MQ/tasks/FairMQProcessorTask.h:18:
In file included from /Users/alfaci/dklein/FairRoot/base/steer/FairTask.h:24:
In file included from /Users/alfaci/dklein/FairRoot/base/steer/FairRootManager.h:11:
In file included from /Users/alfaci/dklein/FairRoot/fairtools/FairLogger.h:18:
In file included from /Users/alfaci/dklein/FairSoft/install/include/root/Rtypes.h:29:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/atomic:552:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/type_traits:1547:38: error:
implicit instantiation of undefined template 'std::__1::hash<fair::mq::Transport>'
: public integral_constant<bool, __is_empty(_Tp)> {};
^
=> -std=c++17
and afterwards -std=gnu++11
- If clang switches to c++11 it explains the error and also that FairMQ itself compiles fine.
this sounds related: https://gitlab.kitware.com/cmake/cmake/-/issues/18686, but no good idea why this didn't happen earlier..
Anyways, setting CMAKE_CXX_STANDARD
solves it, will add a patch to FairRoot.
Many thanks for finding and fixing this!