I cannot compile even trivial scripts in an interactive ROOT session. For example, consider a 1-line file MainMacro.cc:
In an interactive ROOT session, the command .L MainMacro.cc++ always fails and prints this:
[quote]
ld: cannot link directly with /usr/lib/libextension.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)[/quote]
I’ve recompiled ROOT several times with all permutations of:
and always get the result above. Does anyone know what’s happening and/or what else I should try? Thanks in advance for any assistance
system: Yosemite Public Beta 4, ROOT6 HEAD branch on commit a5fd93c, MacBookPro
disclaimer: I realize Yosemite is beta – my question is in the spirit of beta testing, not troubleshooting production code
Ah, what I meant to convey was that I’d tried ./configure with and without the macosx flag (among other flags). I still get the error with all builds of ROOT6. After further testing, I found this will run:
.L MainMacro.cc
MainMacro()
but appending a + or ++ to the first line still fails. Omitting all +'s doesn’t seem to actually compile anything, though, since no .d or .pcm files are generated.
.L without the + in ROOT 5 would run your macro as interpreted code with CINT, and the + would compile it with the external compiler. In ROOT 6, “interpreted” code is actually JIT-compiled with clang/llvm, so possibly there is no difference anymore between + and non-+ code other than automatically included headers. In fact with ROOT 6 you should also be able to #include your macro file and have it available, since cling also just compiles #included stuff. Have you tried that?
I guess we’ll need an expert to answer your question for real.
I have just installed the 6-02-00 version from the download page, but the problem seems still to be there.
I have installed it with ./configure macosx64 but I get the same message reported above when compiling via .L filename.c+g It says
ld: cannot link directly with /usr/lib/libextension.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Could you please look at it:
[using ROOT 6.02/01 on OSX 10.10 ]
root [0] gROOT->LoadMacro(“dbxParticle.cpp”);
root [1] gROOT->LoadMacro(“dbxParticle.cpp+”);
Info in : script has already been loaded in interpreted mode
Info in : unloading /Users/ngu/all_new_dbxa/dbxa/analysis_core/./dbxParticle.cpp and compiling it
Info in TMacOSXSystem::ACLiC: creating shared library /Users/ngu/all_new_dbxa/dbxa/analysis_core/./dbxParticle_cpp.so
ld: cannot link directly with /usr/lib/libextension.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in : Compilation failed!