OK, thanks for checking! That makes sense.
The ROOT (C++) installation generally doesn’t rely on DYLD_LIBRARY_PATH, but uses LC_RPATH. You should be able to start the root interpreter without using thisroot.sh and it will find its libraries.
The loader of cppyy backend, however, seems to try:
- The environment variable
CPPYY_BACKEND_LIBRARY - A “normal” dlopen where
LD_LIBRARY_PATHorDYLD_LIBRARY_PATHare considered, and libraries in system locations are found. - And finally it falls back to loading in the absolute path where
loader.pyis.
1 and 2 of course only work if the environment of your shell “survives”. There seems to be an error in 3., so I’ll bring this up with the cppyy maintainers.
So I guess you could use strategy 1. and 2., but you will have to change the shebang:
- #! /usr/bin/env python3
+ #! /usr/local/bin/python3
Or you can of course invoke it as python3 <script>.