Hi ROOT/Cling guys,
I’m used ROOT 5 extensively in the past and I’m just now starting to use ROOT6. I’m having two issues with the interpreter and ACLiC.
- It seems that when I compile and execute some simple TTreeReader code, the 2nd time I execute in the same sessions I get an error. Specifically:
open ROOT interactive sessions:
[rwkelley@vector optimization]$ root
compile and execute macro:
root [0] .x cpp/reach.C++
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/rwkelley/temp/.rootbuild//Users/rwkelley/Development/dpm/research/optimization/./cpp/reach_C.so
Now it runs fine. So I run it again with no change to the source code and it errors:
root [1] .x cpp/reach.C++
Info in <ACLiC>: unmodified script has already been compiled and loaded
Info in <ACLiC>: it will be regenerated and reloaded!
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/rwkelley/temp/.rootbuild//Users/rwkelley/Development/dpm/research/optimization/./cpp/reach_C.so
ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file '/System/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/MacOS/AMDMTLBronzeDriver' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in <ACLiC>: Compilation failed!
- The other issue I saw in when I have an error in my code and it fails to compile. The steps to reproduce are:
Introduce an intentional error in the source code:
root [2] .x cpp/reach.C++
Info in <ACLiC>: unmodified script has already been compiled and loaded
Info in <ACLiC>: it will be regenerated and reloaded!
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/rwkelley/temp/.rootbuild//Users/rwkelley/Development/dpm/research/optimization/./cpp/reach_C.so
In file included from input_line_12:9:
././cpp/reach.C:34:5: error: unknown type name 'TTreeReaderXX'
TTreeReaderXX reader(&e);
^
Error in <ACLiC>: Dictionary generation failed!
Fix error and recompile:
root [3] .x cpp/reach.C++
Info in <TMacOSXSystem::ACLiC>: creating shared library /Users/rwkelley/temp/.rootbuild//Users/rwkelley/Development/dpm/research/optimization/./cpp/reach_C.so
ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file '/System/Library/Extensions/AppleIntelHD5000GraphicsMTLDriver.bundle/Contents/MacOS/AppleIntelHD5000GraphicsMTLDriver' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in <ACLiC>: Compilation failed!
Can someone explain this? I believe these are related issues.
I’ve attached the script and a small ROOT file with the data.
reach.C (3.2 KB)
I’m running on OSX 10.11 with ROOT from homebrew:
[rwkelley@vector optimization]$ brew info root6
homebrew/science/root6: stable 6.08.02 (bottled), HEAD
[rwkelley@vector Dropbox]$ clang --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
[rwkelley@vector Dropbox]$ uname -a
Darwin vector.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan 9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64
I’ve also tried using version 6.08.04 compiled from source.
Please let me know if you know what is going on?
Thanks,
Ryan