NOAA-PMEL / PyFerret

The PyFerret program and Python module from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
60 stars 22 forks source link

Path to dylibs with Mac prebuilt #58

Open karlmsmith opened 6 years ago

karlmsmith commented 6 years ago

In the Mac pre-built distributions, the path to the dylibs is recorded in the libpyferret shared object (bundle) library. This can be seen using otool -L. When dylib libraries are not found where expected, one can define the environment variable DYLD_FALLBACK_LIBRARY_PATH with paths to search. However, this is intended more for development, not for production. Defining it in the ferret_paths C-shell script did not result in it being defined in the Bourne-shell pyferret script, so had to define it in the pyferret script. But this leads to problems if one does not use the pyferret script (eg, Python users that want to import as a module).

One can rewrite the path recorded using the install_name_tool command (assuming there is enough space; there is a compiler option to leave plenty of space). Using this as part of the Mac install is a better way of dealing with this situation. Even better would be to have a proper packaged install....