BIC-MNI / libminc

libminc is the core library and API of the MINC toolkit
Other
19 stars 29 forks source link

Tests fail to run on macOS because DYLD_LIBRARY_PATH is not set #103

Open ryandesign opened 6 years ago

ryandesign commented 6 years ago

The test suite fails to run on macOS, because the test programs are trying to use the not-yet-installed libminc library. Here's one example:

Dyld Error Message:
  Library not loaded: /opt/local/lib/libminc2.5.2.0.dylib
  Referenced from: /Users/USER/*/minc_tst
  Reason: image not found

In order to be able to do that on macOS, the DYLD_LIBRARY_PATH environment variable must be set to the path where the not-yet-installed libraries reside.

vfonov commented 6 years ago

i think you are building without RPATH during build. MACOSX's security features (SIP) will prevent subprocesses to use shared libraries specified in DYLD_LIBRARY_PATH