I noticed an issue with the way TFile pointers are declared and defined in ROOT v6 on Mac OSV 10.9. The following line of code produces the below error:
[code]TFile *OutFile = new TFile(“outfile.root”, “recreate”);
Error in UnknownClass::InitInterpreter(): LLVM SYMBOLS ARE EXPOSED TO CLING! This will cause problems; please hide them or dlopen() them after the call to TROOT::InitInterpreter()![/code]
However the following lines DO NOT produce the error:
I believe I built root from source. I downloaded the source files from git for version 6.00/00 and built ROOT on Mac OSX 10.9.3 using the configure method. I checked that I have the build prerequisites and, indeed, I do (Xcode developer package and XQuartz). I configured ROOT in the following way:
./configure macosx --all
I have attached the code that I am running which produces the error (please ignore the name of the file).
Running otool -L $ROOTSYS/lib/libRIO.so in a terminal window produces:
~$ otool -L $ROOTSYS/lib/libRIO.so
/Users/alexclifton/ROOT2/root/lib/libRIO.so: @rpath/libRIO.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) @rpath/libThread.so (compatibility version 0.0.0, current version 0.0.0) @rpath/libCore.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
If there is any other information that is needed, please let me know.
As an aside, I was able to get 6.00/001 from git and configured this version of ROOT in the exact same way as described above. The following error was produced after running make:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [core/utils/src/rootcling_tmp] Error 1 test_delete1.cxx (195 Bytes)
I have tried to configure with both macosx and macosx64 architectures. I will try to leave the architecture field blank and see what happens.
Here is what clang --version says for me:
clang --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0
Thread model: posix
I am not quite sure I understand what you mean here. I use git to obtain the files from the git repository and then run the configure file followed by make. If this does not answer your question, please let me know.
Sure thing. It is attached to this post. The log file is not the file from configuring ROOT with the architecture field empty. It is from using the macosx option. I could not upload the log file so I converted it to a txt file and uploaded that instead.
I also tried downloading the tar file directly from the ROOT website instead of using git. This did not work, just FYI. I run into the same issue.
Incase you did not see my comment about the error during creation of the binary, below is the error that is returned:
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [core/utils/src/rootcling_tmp] Error 1 config.txt (200 KB)
otool -L
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: at least one file must be specified
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool [-arch arch_type] [-fahlLDtdorSTMRIHGvVcXmqQjC] [-mcpu=arg] <object file> ...
-f print the fat headers
-a print the archive header
-h print the mach header
-l print the load commands
-L print shared libraries used
-D print shared library id name
-t print the text section (disassemble with -v)
-p <routine name> start dissassemble from routine name
-s <segname> <sectname> print contents of section
-d print the data section
-o print the Objective-C segment
-r print the relocation entries
-S print the table of contents of a library
-T print the table of contents of a dynamic shared library
-M print the module table of a dynamic shared library
-R print the reference table of a dynamic shared library
-I print the indirect symbol table
-H print the two-level hints table
-G print the data in code table
-v print verbosely (symbolically) when possible
-V print disassembled operands symbolically
-c print argument strings of a core file
-X print no leading addresses or headers
-m don't use archive(member) syntax
-B force Thumb disassembly (ARM objects only)
-q use llvm's disassembler (the default)
-Q use otool(1)'s disassembler
-mcpu=arg use `arg' as the cpu for disassembly
-j print opcode bytes
-C print linker optimization hints
I assumed it’s a binary because your source code contains a main() function. If you run this within the ROOT binary itself then you should not call it main() but e.g. “test_delete1()” which will allow you to run it as “.x test_delet1.C”.
I am new to using ROOT and I have the same issue regarding the LLVM symbols being exposed to Cling. I am trying to integrate ROOT into my Geant4 application. The current CMakeLists builds and compiles fine but gives me the error when I execute the program. I strongly believe that the error I am having has to do with the way I link ROOT libraries in. Please, can anyone point out what I might be doing wrong, I have included a section of my CMakeLists text file. Thank you so much. Cheers.
find_package(ROOT REQUIRED)
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
# Setup include directory for this project
#
if(ROOT_FOUND)
add_definitions(-DG4ANALYSIS_USE_ROOT)
include(${ROOT_USE_FILE})
include(${Geant4_USE_FILE})
include_directories(${ROOT_INCLUDE_DIR} ${Geant4_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
else()
include(${Geant4_USE_FILE})
include_directories(${Geant4_INCLUDE_DIR} ${PROJECT_SOURCE_DIR}/include)
endif()
#----------------------------------------------------------------------------
# Locate sources and headers for this project
# NB: headers are included so they will show up in IDEs
#
file(GLOB sources ${PROJECT_SOURCE_DIR}/src/*.cc)
file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
#
add_executable(JCC71 JCC71.cc ${sources} ${headers})
if(ROOT_FOUND)
target_link_libraries(JCC71 ${ROOT_LIBRARIES})
target_link_libraries(JCC71 ${Geant4_LIBRARIES})
else()
target_link_libraries(JCC71 ${Geant4_LIBRARIES})
endif()