Next: , Previous: , Up: Problems running   [Contents][Index]

8.3.1 ‘cannot open shared object file

A common problem on many workstation clusters is that the head node (on which ./configure is run) has more libraries installed than do the compute nodes (on which coNCePTuaL programs themselves are run). Consequently, coNCePTuaL programs that compile and link properly on the head node will fail with a ‘cannot open shared object file’ error if they try to dynamically link a shared object that is absent on the compute nodes.

Ideally, the missing shared objects should be installed on each of the compute nodes. If they cannot be installed in their standard locations (e.g., /usr/lib), they can be installed elsewhere (e.g., in the user’s home directory) and that location can be pointed to using -rpath or LD_LIBRARY_PATH, as described below. Alternatively, configure can be instructed to disregard certain libraries—even if they exist on the head node—by passing the --with-ignored-libs option to configure (see configure). For example, if is not installed on the compute nodes one can run ./configure --with-ignored-libs=popt to prevent from being used.

The --with-ignored-libs option is of little use if the coNCePTuaL library itself cannot be found at run time. By default, make will build and make install will install both a static and a dynamic version of the coNCePTuaL run-time library. Most linkers give precedence to the dynamic library over the static library unless the static library is requested explicitly. As a consequence, the dynamic version of the coNCePTuaL run-time library needs to be available at program-load time in order to avoid error messages like the following:

a.out: error while loading shared libraries: cannot open
shared object file: No such file or directory

There are a few alternatives for pointing the dynamic loader to the coNCePTuaL run-time library. On systems that support it, the best option is the -rpath approach described in Implicit dynamic-library search paths. The second-best option is to add the directory in which was installed (by default, /usr/local/lib) to your LD_LIBRARY_PATH environment variable. Finally, as a last resort, you can use the --disable-shared configuration option (see configure) to prevent coNCePTuaL from building the dynamic version of the run-time library altogether, thereby forcing the linker to use the static version:

make uninstall
make clean
./configure --disable-shared …
make install

As mentioned in configure, however, can’t be built when --disable-shared is in effect.

Next: , Previous: , Up: Problems running   [Contents][Index]

Scott Pakin,