Compiling scripts w/ ROOT6 and OS X 10.10 (Yosemite)

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

This works for me on 10.9.5 using ROOT 6.02/00-rc1.

I notice you tried the “macosx” flag, but apparently that flag is specifically for older 32-bit OSXes. I use “macosx64”. You could try that.

Jean-François

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. :wink:

Jean-François

Hi,

I’m looking into the issue

I’ll let you know once fixed.

Cheers, Axel.

It’s fixed in the master and 6-02-00-patches. Thanks for your report!

Cheers, Axel.

Thanks for the fast fix!

Cheers,
Patrick

Hi,

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)

Thanks.

Have you tried omitting the macosx64 flag? That’s worked for me when recompiling the HEAD branch, most recently this morning.

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!

I recently checked out v6-02-01 and built it on Yosemite (which went fine), but I get the same error as the original poster:

[sandbox]$ root-config --version
6.02/01
[sandbox]$ root-config --config
–fail-on-missing --enable-minuit2 --with-python-incdir=/Users/adare/anaconda/include/python2.7 --with-python-libdir=/Users/adare/anaconda/lib
[sandbox]$ root-config --arch
macosx64
[sandbox]$ echo “void Test(){}” > Test.C
[sandbox]$ root Test.C+
root [0]
Processing Test.C+…
Info in TMacOSXSystem::ACLiC: creating shared library /Users/adare/sandbox/./Test_C.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!
root [1]

Thanks in advance for any help or suggestions.

ACLiC now works for me in v6-02-02. Thanks!