I have root installed with mamba/conda into the base environment. The cmake finds root without a problem, the compilations also succeeds. But at a run time the program does not find root libraries. It is for some reason looks for them in /usr/lib and /usr/local/lib which specified by @rpath. I can of course can copy the libraries there, but I was wandering if there is a more elegant way to solve the problem.
_ROOT Version:6.26 Platform: macos Compiler: mac book pro
Thank you for the super fast reply!
I have control over proteus. I cloned the library locally. ( I don’t think it is supported by the original author any longer.) But I am not cmake or rpath expert. Is there something I can add to CmakeLists.txt so it adds the root libs location to rpath?
Unfortunately switching to v6.28 did not help. I installed 6.28 with mamba:
(base) ➜ build git:(master) ✗ which root
/Users/hits/mambaforge/bin/root
(base) ➜ build git:(master) ✗ root --version
ROOT Version: 6.28/00
Built for macosxarm64 on Mar 05 2023, 23:56:00
From @
but libraries still do not have correct rpaths.
dyld[78556]: Library not loaded: '@rpath/libHist.6.28.so'
Referenced from: '/Users/hits/software/proteus/bin/pt-recon'
Reason: tried: '/usr/local/lib/libHist.6.28.so' (no such file), '/usr/lib/libHist.6.28.so' (no such file)
here is also an output from otool
(base) ➜ build git:(master) ✗ otool -L ../bin/pt-recon
../bin/pt-recon:
@rpath/libHist.6.28.so (compatibility version 6.28.0, current version 6.28.0)
@rpath/libTree.6.28.so (compatibility version 6.28.0, current version 6.28.0)
@rpath/libMatrix.6.28.so (compatibility version 6.28.0, current version 6.28.0)
@rpath/libMathCore.6.28.so (compatibility version 6.28.0, current version 6.28.0)
@rpath/libImt.6.28.so (compatibility version 6.28.0, current version 6.28.0)
@rpath/libMultiProc.6.28.so (compatibility version 6.28.0, current version 6.28.0)
@rpath/libNet.6.28.so (compatibility version 6.28.0, current version 6.28.0)
@rpath/libRIO.6.28.so (compatibility version 6.28.0, current version 6.28.0)
@rpath/libThread.6.28.so (compatibility version 6.28.0, current version 6.28.0)
@rpath/libCore.6.28.so (compatibility version 6.28.0, current version 6.28.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
I tried setting DYDL_LIBRARY_PATH to /Users/hits/mambaforge/lib but that broke other things (for example vim)
For now I think I will copy the needed libraries to /usr/local/lib but if someone (@couet and/or @Axel) have a better idea to try please let me know.