ROOT5 compilation problem with latest Mac
Compilation fails when BDSIM is compiled against ROOT V5. Observed recently, and likely due to new version of CLANG.
[ 1%] Building CXX object CMakeFiles/bdsim.dir/root/BDSOutputROOTEventHitDict.cc.o
In file included from /Users/sboogert/Physics/general/acc/bdsim/bdsim-mac/root/BDSOutputROOTEventHitDict.cc:20:
In file included from /opt/local/libexec/root5/include/root/TClass.h:42:
/opt/local/libexec/root5/include/root/ThreadLocalStorage.h:228:4: error: thread-local storage is not supported for the current target
TTHREAD_TLS(T*) ptr = NULL;
^
/opt/local/libexec/root5/include/root/ThreadLocalStorage.h:103:29: note: expanded from macro 'TTHREAD_TLS'
# define TTHREAD_TLS(type) thread_local type
Comments (14)
-
reporter -
reporter There were reports of this before but with clang 6 - https://sft.its.cern.ch/jira/browse/ROOT-6524
-
reporter I think we may have to wait for a fix to ROOT:
As it looks like CLANG doesn't support this.
-
reporter Again, apparently this should be fixed in the version of root5 I listed:
-
that last link is to a different issue I think, the compiler error is different.
-
reporter slightly different problem, but to do with clang update
https://root.cern.ch/phpBB3/viewtopic.php?f=3&t=21312&p=92830&hilit=xcode#p92830
-
reporter With another mac with the exact same environment, but not apply the latest xcode 7.3 command line tools update, everything works normally and there are no problems. It is therefore likely due to a change in clang.
Works with:
Apple LLVM version 7.0.2 (clang-700.1.81)
-
what about trying with an older version of clang from macports?
you can set the compiler version from a clean build with:
CC=<C-compiler> CXX=<C++-compiler> cmake ../bdsim
-
reporter Issue describing this with ROOT:
https://sft.its.cern.ch/jira/projects/ROOT/issues/ROOT-8076?filter=addedrecently
-
so according to report it is fixed with 5.34.36. Let's close the issue when this is confirmed.
-
5.34.36 was released yesterday (https://root.cern.ch/content/release-53436), and it is also already on macports. Can someone confirm this release fixes this issue?
-
reporter I've got this version of root now, but BDSIM (as of commit 26a7b7b) fails to configure properly:
CMake Error at CMakeLists.txt:473 (set_target_properties): set_target_properties Can not find target to add properties to: bdsimRootEvent CMake Error at cmake/Modules/bdsim_install.cmake:9 (install): install TARGETS given target "bdsimRootEvent" which does not exist in this directory. Call Stack (most recent call first): CMakeLists.txt:474 (bdsim_install_targets) -- Found BISON: /opt/local/bin/bison (found suitable version "3.0.4", required is "2.4") -- Found FLEX: /opt/local/bin/flex (found version "2.6.0") -- Configuring ROBDSIM 0.3.develop -- Build Type RelWithDebInfo
-
fixed in fa9ae99 .. please try again
-
reporter - changed status to resolved
Thanks Jochem for fix.
Can now compile under Root5.34/36.
- Log in to comment
Reproducible with:
from macports. BDSIM v0.92.