Hi,
after having read through
[url]PyROOT issues on OS X 10.11 (El Capitan)
I have concluded that I have somewhat of the inverse problem.
I run MacOs Yosemite with Enthought Python 2.7 and ROOT 5-34-34.
I have no issues running import ROOT in python (everything works nicely there), however, when trying to load the lib in ROOT, I get:
[code].L $ROOTSYS/lib/libPyROOT.so
dlopen error: dlopen(/Users/anelles/Software/root/lib/libPyROOT.so, 9): Library not loaded: @rpath/Python
Referenced from: /Users/anelles/Software/root/lib/libPyROOT.so
Reason: no suitable image found. Did find:
/Users/anelles/Software/root/lib/Python: not a file
Load Error: Failed to load Dynamic link library /Users/anelles/Software/root/lib/libPyROOT.so[/code]
To me this looks like the @rpath variable tries to find Python in the ROOT path, where it should be looking at something from python.
The output of
otool -L lib/libPyROOT.so
lib/libPyROOT.so:
@rpath/libPyROOT.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
@rpath/libCore.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libRIO.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libTree.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/Python (compatibility version 2.7.0, current version 2.7.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
shows that there is a problem in the linking, since again Python is not where all the other ROOT libraries are.
I have tried to disable using rpath (by the way using --disable-rpath does not work on a mac, since it is conveniently forced to be true for all macs, so I had to manually remove that from configure), but this also has no effect and the issue remains.
I assume that this is not the most common use case – using ROOT from python seems more common than the other way round – but maybe someone has an idea of what could be going wrong here. Fixing this would allow me to use python in our C++/ROOT framework and that could really speed development for me.
Thanks,
Anna