# Rpath & SIP issues on OSX

**URL:** <https://root-forum.cern.ch/t/rpath-sip-issues-on-osx/37717>\
**Category:** ROOT\
**Created:** [January 25, 2020, 7:58pm UTC](https://root-forum.cern.ch/t/rpath-sip-issues-on-osx/37717 "2020-01-25T19:58:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anyes\_Taffard](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/anyes_taffard/32/19929_2.png) [@Anyes\_Taffard](https://root-forum.cern.ch/u/Anyes_Taffard)\
**Post date:** [January 25, 2020, 7:58pm UTC](https://root-forum.cern.ch/t/rpath-sip-issues-on-osx/37717/1 "2020-01-25T19:58:46Z")

</div>

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

```auto
  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]:

```auto
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](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

```auto
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](https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/AnalysisRelease)  
installed in /Users/anyes/ATLAS/Software/

[1]  
Before starting root:

```auto
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:

```auto
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

```auto
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

```auto
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

```auto
 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

```

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [January 27, 2020, 10:01am UTC](https://root-forum.cern.ch/t/rpath-sip-issues-on-osx/37717/2 "2020-01-27T10:01:47Z")

</div>

I guess @oshadura can help you.

---

<div class="post-metadata">

**Author:** ![oshadura](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/oshadura/32/14460_2.png) [@oshadura](https://root-forum.cern.ch/u/oshadura)\
**Post date:** [January 27, 2020, 10:18am UTC](https://root-forum.cern.ch/t/rpath-sip-issues-on-osx/37717/3 "2020-01-27T10:18:17Z")

</div>

@Axel do you know what could be wrong with 6.16 on Mac OS X?

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [January 27, 2020, 10:44am UTC](https://root-forum.cern.ch/t/rpath-sip-issues-on-osx/37717/4 "2020-01-27T10:44:00Z")

</div>

Hi Anyes!

Good to hear from you again!

It would be good to hear what `...` in `your binary is not an allowed client of Applications/Xcode.app/...` is.

If it’s `libAudioToolboxUtility.tbd` or any other `,tbd`, his got fixed for 6.18 and (the about to be released) 6.20. Can you upgrade to 6.18?

Cheers, Axel.

---

<div class="post-metadata">

**Author:** ![Anyes\_Taffard](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/anyes_taffard/32/19929_2.png) [@Anyes\_Taffard](https://root-forum.cern.ch/u/Anyes_Taffard)\
**Post date:** [January 28, 2020, 5:23pm UTC](https://root-forum.cern.ch/t/rpath-sip-issues-on-osx/37717/5 "2020-01-28T17:23:38Z")

</div>

Hi Alex,

I installed anaconda with root 6.18 following instructions here [1]

With that version, it works as usual and I have no issues compiling a simple script within root and I don’t need to have SIP disable.

I’ll get back to the ATLAS folks so we can have a release with this root version on Mac, and hopefully that solve everything.

Thank you all for you responses.  
Best,  
-a

[1]  
[https://iscinumpy.gitlab.io/post/root-conda/](https://iscinumpy.gitlab.io/post/root-conda/)

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [February 11, 2020, 5:23pm UTC](https://root-forum.cern.ch/t/rpath-sip-issues-on-osx/37717/6 "2020-02-11T17:23:57Z")

</div>

Closed on February 11, 2020, 5:23pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
