Installation / Operating system specific notes |
The LIBPATH environment variable defines the search path for shared libraries. Make sure LIBPATH contains all required library directories, including the system library path /lib and /usr/lib.
On AIX®, shared libraries are usually provided in .a archives containing the shared object(s). For example, the DB2® client library libdb2.a contains both the 32 bit (shr.o) and the 64 bit (shr_64.o) versions of the shared library. Not all products follow this rule: for example Oracle 9.2 provides libclntsh.a with shr.o on 64 bit platforms, and Informix® provides both .a archives with static objects and .so shared libraries as on other platforms.
The runtime system database drivers are created with the library archives or with the .so shared objects, according to the database type and version. No particular manipulation is needed to use any supported database client libraries on this platform.
On IBM® AIX, you can check the library dependencies with the dump command:
$ dump -Hv -X64 dbmora92x.so
In production environments, AIX loads shared libraries into the system shared library segment in order to improve program load time. Once a shared library is loaded, other programs using the same library are just attached to that memory segment.
Once a shared library is loaded by the system, you cannot copy the executable file unless you unload the library from the system memory. This problem will occur when installing a new version of the software, even if it is installed in a differente directory: Since shared libraries will have the same name, AIX will not allow to load multiple versions of the same library. Therefore, before installing a new version, make sure all shared libraries are unloaded from memory.
The genkld command prints the list of shared libraries currently loaded into memory. The slibclean command allows to unload a shared library from the system shared library segment.
When using a thread-enabled shared library like Oracle's libclntsh, the program using the shared object must be linked with thread support, otherwise you can experience problems (like segmentation fault when the runner program ends). IBM recommends using the xlc_r compiler to link a program with pthread support.
By default, the runtime system provided for AIX platforms is linked with pthread support.