I am running into problems while trying to load Garfield libraries into ROOT.
Just after the Garfield compilation succeeds, I load the Garfield setup.sh and try using gSystem->Load("libGarfield.dylib")
.
I get the following error:
- Installing: /Users/jgalan/apps/garfield6/share/Garfield/cmake/GarfieldTargets.cmake
-- Installing: /Users/jgalan/apps/garfield6/share/Garfield/cmake/GarfieldTargets-release.cmake
-- Installing: /Users/jgalan/apps/garfield6/share/Garfield/cmake/GarfieldConfig.cmake
-- Installing: /Users/jgalan/apps/garfield6/share/Garfield/cmake/GarfieldConfigVersion.cmake
-- Installing: /Users/jgalan/apps/garfield6/share/Garfield/setupGarfield.sh
-- Installing: /Users/jgalan/apps/garfield6/share/Garfield/setupGarfield.csh
Javiers-MBP:installation jgalan$ source /Users/jgalan/apps/garfield6/share/Garfield/setupGarfield.sh
Javiers-MBP:installation jgalan$ root
------------------------------------------------------------------
| Welcome to ROOT 6.26/10 https://root.cern |
| (c) 1995-2021, The ROOT Team; conception: R. Brun, F. Rademakers |
| Built for macosx64 on Nov 16 2022, 10:42:54 |
| From tags/v6-26-10@v6-26-10 |
| With Apple clang version 14.0.0 (clang-1400.0.29.202) |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------------
root [0] gSystem->Load("libGarfield.dylib");
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Users/jgalan/apps/garfield6/lib/libGarfield.0.3.0.dylib, 0x0009): Library not loaded: @rpath/libmagboltz.11.dylib
Referenced from: <F5C2FAE8-2631-3195-A61B-31EA277A7369> /Users/jgalan/apps/garfield6/lib/libGarfield.0.3.0.dylib
Reason: tried: '/Users/jgalan/rest-framework/install/lib/libmagboltz.11.dylib' (no such file), '/Users/jgalan/apps/root-6.26.10/install/lib/libmagboltz.11.dylib' (no such file), '=/Users/jgalan/rest-framework/install/lib/libmagboltz.11.dylib' (no such file), '/Users/jgalan/apps/root-6.26.10/install/lib/../lib/libmagboltz.11.dylib' (no such file), '/Users/jgalan/apps/root-6.26.10/install/bin/../lib/libmagboltz.11.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libmagboltz.11.dylib' (no such file), '/Users/jgalan/apps/root-6.26.10/install/lib/../lib/libmagboltz.11.dylib' (no such file), '/Users/jgalan/apps/root-6.26.10/install/bin/../lib/libmagboltz.11.dylib' (no such file), '/usr/local/lib/libmagboltz.11.dylib' (no such file), '/usr/lib/libmagboltz.11.dylib' (no such file, not in dyld cache)
root [1]
I would expect that setupGarfield.sh would load all the necessary paths.
It seems it tries to find libmagboltz.11.dylib
. The file is found inside /Users/jgalan/apps/garfield6/lib
, same place as libGarfield.dylib
. So why it does not find it? Perhaps in MacOs magboltz
needs to be added to the compilation targets somewhere.
Any help welcome!
Thanks!