Hi,
I’m now running into an issue running root on OS X, which I did not have end of 2019.
My rootlogon.C compiles 2 simple root macros with handy functions
cout << "\t mySettings = " << gROOT->LoadMacro("${HOME}/mySettings.C+") << endl;
cout << "\t myFuncs = " << gROOT->LoadMacro("${HOME}/myFuncs.C+") << endl;
I’m now getting an error. More detail below [1]:
dyld: Library not loaded: @rpath/libRIO.so
So the DYLIB_LIBRARY_PATH gets removed.
From reading various Root forum post (eg: https://root-forum.cern.ch/t/root-dynamic-library-path/24305)
I’m understanding that I should not be having this issue since root is installed in my user area.
Of course I asked the ATLAS S&C folks. Attila recons that interactive ROOT calls the dictionary generator executable (rootcling) through some means that is controlled by SIP.
He was able to reproduce the issue I’m having with a simple script [2].
I disabled SIP (as a test… because I rather not).
But now I’m getting another error [3] when root tries to link
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /Applications/Xcode.app/...
Any idea how to resolve this, preferably without having to disable SIP ?
Best,
-a
_ROOT Version: 6.16
Root (6.16/00): /Users/anyes/ATLAS/Software/AnalysisBaseExternals/21.2.104/InstallArea/x86_64-mac1015-clang110-opt/bin/root
_Platform: Catalina 10.15.2
_Compiler: cmake
_XCode: 11.2.1 + command line tools installed.
I had 11.3.1 but reverted back to 11.2.1 in case that was the issue.
_ATLAS installation: https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AnalysisRelease
installed in /Users/anyes/ATLAS/Software/
[1]
Before starting root:
echo $DYLD_LIBRARY_PATH
/Users/anyes/ATLAS/Software/AnalysisBase/21.2.104/InstallArea/x86_64-mac1015-clang110-opt/lib:/Users/anyes/ATLAS/Software/AnalysisBaseExternals/21.2.104/InstallArea/x86_64-mac1015-clang110-opt/lib:/build/x86_64-mac1014-clang110-opt/lib:/Users/anyes
Starting root:
Begin loading libs: 0=success; 1=already loaded; -1:failed
libMathMore = 0
libPhysics = 0
libMinuit = 0
libMinuit2 = 0
libXmlParser = 0
DYLD set to:
dyld: Library not loaded: @rpath/libRIO.so
Referenced from: /Users/anyes/ATLAS/Software/AnalysisBaseExternals/21.2.104/InstallArea/x86_64-mac1015-clang110-opt/bin/rootcling
Reason: image not found
Error in <ACLiC>: Dictionary generation failed!
mySettings = -1
[2]
After creating a dummy.C file with some nonsensical code, I tried to load it with
root [0] : .L dummy.C+
, and got the same results as you. And this is not even on Catalina, but rather on Mojave. (The previous OS version.)
Yet, when I call
rootcling -f dummyDict.cxx dummy.C+
from the command line, that runs just fine. So the environment is set up correctly for the ROOT dictionary generation. But I guess interactive ROOT probably goes through something like the bash executable, which makes the rootcling executable not receive the DYLD_LIBRARY_PATH settings anymore.
[3]
With SIP disabled.
Starting root
1609 ttys001 0:00.54 root.exe -l
1610 ttys001 0:00.02 sh -c ps | grep root.exe
1612 ttys001 0:00.00 grep root.exe
Begin loading libs: 0=success; 1=already loaded; -1:failed
libMathMore = 0
libPhysics = 0
libMinuit = 0
libMinuit2 = 0
libXmlParser = 0
DYLD set to: /Users/anyes/ATLAS/Software/AnalysisBase/21.2.104/InstallArea/x86_64-mac1015-clang110-opt/lib:/Users/anyes/ATLAS/Software/AnalysisBaseExternals/21.2.104/InstallArea/x86_64-mac1015-clang110-opt/lib:/build/x86_64-mac1014-clang110-opt/lib:/Users/anyes
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libAudioToolboxUtility.tbd for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in <ACLiC>: Compilation failed!
mySettings = -1
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libAudioToolboxUtility.tbd for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in <ACLiC>: Compilation failed!
myFuncs = -1
input_line_14:2:3: error: use of undeclared identifier 'createAtlasStyle'
(createAtlasStyle())
^
libc++abi.dylib: terminating with uncaught exception of type cling::CompilationException: Error evaluating expression (createAtlasStyle())
Abort trap: 6