-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Affiliation
MIT PSFC
Version(s) Affected
Found in alpha-7-157-0 but likely in other versions too
Platform(s)
macOS Tahoe (Apple Silicon) with IDL 9.0
Installation Method(s)
Developer build
Describe the bug
On macOS, IDL searches for the MDSplus libraries relative to the IDL installation directory, instead of relative to the MDSplus installation directory. (This is likely an RPATH issue.)
These errors appear if launch IDL and then immediately attempt to use the API that MDSplus provides. (It doesn't matter if running the IDLDE workbench or running IDL from the command line.)
IDL> mdsconnect, 'localhost'
% Compiled module: MDSCONNECT.
% Compiled module: MDS_KEYWORD_SET.
% Compiled module: MDSDISCONNECT.
% CALL_EXTERNAL: Error loading sharable executable.
Symbol: IdlConnectToMds, File = libMdsIpShr.dylib
dlopen(libMdsIpShr.dylib, 0x0001): tried: '/Applications/NV5/idl90/bin/bin.darwin.arm64/libMdsIpShr.dylib' (no such file),
'libMdsIpShr.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibMdsIpShr.dylib' (no such file),
'/Applications/NV5/idl90/bin/bin.darwin.arm64/libMdsIpShr.dylib' (no such file),
'/Applications/NV5/idl90/bin/bin.darwin.arm64/../libMdsIpShr.dylib' (no such file),
'/Applications/NV5/idl90/bin/bin.darwin.arm64/../lib/libMdsIpShr.dylib' (no such file),
'/Applications/NV5/idl90/bin/bin.darwin.arm64/libMdsIpShr.dylib' (no such file),
'/Applications/NV5/idl90/bin/bin.darwin.arm64/../libMdsIpShr.dylib' (no such file),
'/Applications/NV5/idl90/bin/bin.darwin.arm64/../lib/libMdsIpShr.dylib' (no such file), '/usr/lib/libMdsIpShr.dylib' (no
such file, not in dyld cache), 'libMdsIpShr.dylib' (no such file), '/usr/lib/libMdsIpShr.dylib' (no such file, not in
dyld cache)
% Execution halted at: $MAIN$
IDL>
The workaround is to force IDL to change its working directory to $MDSPLUS_DIR/lib.
IDL> CD, '/usr/local/mdsplus/lib'
IDL> mdsconnect, 'localhost'
% Compiled module: MDSCONNECT.
% Compiled module: MDS_KEYWORD_SET.
% Compiled module: MDSDISCONNECT.
IDL>
To Reproduce
Run the same statements as shown in the above examples. Of course, replace "localhost" with whatever server name is appropriate.
Expected behavior
It would be nice not to have to run the CD statement when using IDL to access MDSplus trees.
Screenshots
n/a
Additional context
n/a