Skip to content

On macOS, IDL searches for the MDSplus libraries in the wrong location #3003

@mwinkel-dev

Description

@mwinkel-dev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    api/idlRelates to the IDL APIbugAn unexpected problem or unintended behavioros/macThis is present on or relates to Mac OSX

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions