Internal: Missing Linux Libraries: Using ldd to check for dependencies
Note: Older versions of IDL (probably pre-IDL 8.x) relayed more on having the right system libraries, and therefore, the following Help Article was much more useful in the past, not so much for IDL 8.x or greater.
This is a brief Help Article to show what to look for when library dependencies are missing in Linux systems. Many Linux distributions don't have all the necessary libraries. The undesired effect is that the IDL Workbench would not work properly.
Discussion
The examples below use IDL 7.0, though similar results will be output using newer versions of IDL. Missing dependencies could give rise to the following errors:
Example 1:
IDL> ?
% ONLINE_HELP: Starting the IDL online help browser.
IDL> /usr/local/itt/idl70/idlde/idlde.linux.x86: error while loading
shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file:
No such file or directory
Example 2:
If the customer creates the following object:
IDL> o=obj_new('idl_idlbridge')
% OBJ_NEW: Error loading sharable executable.
Symbol: IDL_Load, File= /usr/local/itt/idl70/bin/bin.linux.x86/idl_idlbridge.so
libstdc++.so.5: cannot open shared object file: No such file or directory
Example 3:
When trying to run
ittlicense
from
/usr/local/itt/idl70/bin
the following error occurs:
/usr/local/itt/idl70/bin# ittlicense
IDL Version 7.0 (linux x86 m32). (c) 2007, ITT Visual Information Solutions
% Embedded IDL: ITT Visual Information Solutions, License Wizard.
% IDLRTMAIN: The following error was encountered: Error loading sharable executable.
Symbol: IDL_Load, File = /usr/local/itt/idl70/bin/bin.linux.x86/idl_xml.so
libstdc++.so.5: cannot open shared object file: No such file or directory
Please consult the supplier of the application.
% Execution halted at: IDLRTMAIN
% $MAIN$
Example 4:
IDL> gmem_map, 'test', 1234
% GMEM_MAP: Error loading sharable executable.
Symbol: IDL_Load, File = /usr/local/itt/idl70/bin/bin.linux.x86_6
4/idl_gmem.so
libstdc++.so.5: cannot open shared object file: No such file or
directory
% Execution halted at: $MAIN$
Three steps to be taken to check for missing dependencies and libraries
The Unix "ldd" command should be used to check for dependencies. This command prints the shared libraries required by each program or shared library specified on the command line.
When using IDL the following steps can be taken to look for those dependencies on 32bit version of those libraries (sometimes it will also be necesary to check the 64bit version too):
ldd /usr/local/itt/idl70/bin/bin.linux.x86/idl
ldd /usr/local/itt/idl70/idlde/idlde.linux.x86
ldd /usr/local/itt/idl70/idlde/bin.linux.x86/libidl_jdml.so
ldd /usr/local/itt/idl70/bin/bin.linux.x86/idl_opserver
After running "ldd" in each of those three cases it will be obvious what libraries are missing. For example, one case would be that some of the "gtk" libraries are missing:
libgtk-x11-2.0.so.0 => not found
libgdk_pixbuf-2.0.so.0 => not found
libgobject-2.0.so.0 => not found
libgdk-x11-2.0.so.0 => not found
Then, it will be necessary for the user to search in internet for the Linux package or packages that contain those missing libraries. The user will need to specify the Linux flavor and the name of the library to find the package that will work for his/her system. There are two good website where this can be done:
http://www.rpmfind.net/
http://rpm.pbone.net/