ppenteado / ominas

Opensource Multi-INstrument Analysis Software
2 stars 8 forks source link

IDL instalation issues on Mac OS #7

Open ppenteado opened 7 years ago

ppenteado commented 7 years ago

Trying out OMINAS installation on recent Mac OS systems (El Capitan and Sierra), a few issues were found. These are IDL installation issues, not OMINAS specific, so it may not be in the scope of the OMINAS installer to deal with them.

From a fresh OS X install, there are a few additional steps required to get IDL properly working:

1) Install XQuartz. IDL needs an X server, and XQuartz is the standard one for recent Mac OS versions.

Go to https://www.xquartz.org/ and use the provided dmg file to install it.

2) If, after installing XQuartz, you get the message

"Error: attempt to add non-widget child "dsm" to parent "idl" which supports only widgets"

When attempting to draw on graphics windows, such as doing

IDL> iimage,/test

Then the path to the X11 libraries needs to be fixed. This is documented at

http://www.harrisgeospatial.com/Support/HelpArticlesDetail/TabId/219/ArtMID/900/ArticleID/14944/XQuartz-2710-is-Not-Compatible-with-ENVI-531-and-IDL-851.aspx

and

http://michaelgalloy.com/2016/11/11/problems-with-xquartz-2-7-11-on-macos.html

One solution is to set DYLD_LIBRARY_PATH, to include

/opt/X11/lib/flat_namespace The difficulty with that is in some systems System Integrity Protection prevents DYLD_LIBRARY_PATH to be set from a regular shell:

[user@computer dir]$ export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace
[user@computer dir]$ echo $DYLD_LIBRARY_PATH

[user@computer dir]$ 

See, for instance, https://github.com/oracle/node-oracledb/issues/231

One solution for that is to set DYLD_LIBRARY_PATH inside the script that launched IDL, as suggested by Harris (http://www.harrisgeospatial.com/Support/HelpArticlesDetail/TabId/219/ArtMID/900/ArticleID/14944/XQuartz-2710-is-Not-Compatible-with-ENVI-531-and-IDL-851.aspx). The script normally resides in the bin/idl directory of IDL's installation path (such as /usr/local/exelis/idl/bin/idl). Editing this file normally requires super-user (root) privileges. If that is not an option, one can copy that file into a user's directory, edit that copy, and then use that instead of the system copy, such as

[user@computer dir]$ mkdir ~/bin
[user@computer dir]$ cp -av /usr/local/exelis/idl/bin/idl ~/bin/idl
[user@computer dir]$ alias idl=~/bin/idl
ppenteado commented 7 years ago

With today's update, creating the ominas/ominasde scripts which set up the environment and start an idl/idlde session, that provided a clean way to handle the DYLD_LIBRARY_PATH setting when ominas is used. With the current version, the user would start IDL by calling either ominas or ominasde, instead of calling idl or idlde. So, though that is an IDL installation issue, it is now handled by the OMINAS startup.

penteado-jpl commented 6 years ago

This issue was moved to nasa/ominas#5