I can’t use gSystem.CompileMacro() when I use all three of [ root6, OSX and PyROOT ].
I do not have problems with [root6, SLC, PyROOT] or [root5, OSX, PyROOT].
Details:
In the “lab”, on an SLC6 machine, I can use PyROOT to do this successfully:
##############################################
pcil–bash$ root-config --version
6.02/05
pcil–bash$ cat << EOF > moo.cxx
int moo() { return 7; }
EOF
pcil–bash$ python2.7
Python 2.7.4 (default, May 5 2013, 17:33:10)
[GCC 4.8.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import ROOT
ROOT.gSystem.CompileMacro(“moo.cxx”)
Info in TUnixSystem::ACLiC: creating shared library /var/clus/usera/lester/LESTERHOME/proj/Athena/c++/XAODCode/trunk/moo_cxx.so
1
ROOT.moo()
7
#################################################
On my osx macbook (intel), where I have root6 (version 6.03/03) installed via macports, PyROOT does not succeed any more:
##########################################
lester@mac:~ root-config --version
6.03/03
lester@mac:~ cat << EOF > moo.cxx
int moo() { return 7; }
EOF
lester@mac:~ $ python2.7
Python 2.7.10 (default, May 25 2015, 13:06:17)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
import ROOT
ROOT.gSystem.CompileMacro(“moo.cxx”)
Info in TMacOSXSystem::ACLiC: creating shared library /Users/lester/moo_cxx.so
ld: can’t link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file ‘/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so’ for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in : Compilation failed!
0
###############################################
However on the same osx macbook I can succeed if I DON’T use PyRoot, instead using ROOT directly:
##############################################################
lester@mac:~ $ root
| Welcome to ROOT 6.03/03 root.cern.ch |
| (c) 1995-2014, The ROOT Team |
| Built for macosx64 |
| From tag , 27 January 2015 |
Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/‘.q’ |
---|
root [0] gSystem->CompileMacro(“moo.cxx”) |
Info in TMacOSXSystem::ACLiC: creating shared library /Users/lester/moo_cxx.so |
(int) 1 |
root [1] moo() |
(int) 7 |
root [2] |
############################################################### |
Note, with root5, there are no problems on EITHER machine – so the problem seems to involve all three of osx, root6 and pyroot.
Ideas?
Christopher
P.S. On the mac
lester@mac:~ $ clang --version
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix