ROOT5 compilation problem with latest Mac

Issue #127 resolved
Laurie Nevay created an issue

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)

  1. Laurie Nevay reporter

    Reproducible with:

    clang --version
    Apple LLVM version 7.3.0 (clang-703.0.29)
    
    root5 @5.34.34_3+cocoa+gcc5+graphviz+gsl+http+minuit2+opengl+python27+roofit+soversion+ssl+tmva+xml
    

    from macports. BDSIM v0.92.

  2. Laurie Nevay 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)
    
  3. Jochem Snuverink

    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

  4. Jochem Snuverink

    so according to report it is fixed with 5.34.36. Let's close the issue when this is confirmed.

  5. Laurie Nevay 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
    
  6. Log in to comment