IBM AIX platform notes

XL C++ Runtime for AIX version

The "IBM XL C++ Runtime for AIX" version must be 13.1

To check the installed C++ runtime version, execute the following commands:
$ lslpp -l | grep "IBM XL C++ Runtime for AIX"
  xlC.aix61.rte             13.1.3.0  COMMITTED  IBM XL C++ Runtime for AIX 6.1
  xlC.rte                   13.1.3.0  COMMITTED  IBM XL C++ Runtime for AIX 

For more details about the C++ runtime package installation on AIX, see https://www.ibm.com/support/pages/ibm-xl-cc-runtime-aix-131

LIBPATH environment variable

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.

Shared libraries archives

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, based on the database type and version. No particular manipulation is needed to use any supported database client libraries on this platform.

The dump command

On IBM® AIX, you can check the library dependencies with the dump command:

$ dump -Hv -X64 libstckp.so

Unloading shared libraries from memory

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 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 different directory. Since shared libraries have the same name, AIX will not allow multiple versions of the same library to load. 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 unloads a shared library from the system shared library segment.

POSIX Threads and shared libraries

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.

Java Interface

Check IBM AIX platform notes when using the Java Interface on this operating system.