DB2 10.5 for Linux, UNIX, and Windows

Bundled library and process rules

When DB2® for Linux, UNIX, and Windows bundles vendor software that requires GSKit, or when vendor software that requires GSKit bundles DB2 for Linux, UNIX, and Windows, certain rules must be followed.

Library rule

When DB2 for Linux, UNIX, and Windows bundles vendor software that requires GSKit, the vendor software provides libraries that DB2 for Linux, UNIX, and Windows links with. These libraries must follow a certain rule. This rule is called a library rule.

Library rule: Use short name

When dynamically loading a GSKit library, the caller must pass the loader function only the base file name of the GSKit library and not the path.

For example, dlopen("libgsk8ssl_64.so", RTLD_NOW | RTLD_GLOBAL) is correct, while dlopen("/usr/opt/ibm/gsk8_64/lib/libgsk8ssl_64.so", RTLD_NOW | RTLD_GLOBAL) is incorrect.

Process rule

When vendor software that requires GSKit, bundles DB2 for Linux, UNIX, and Windows, the vendor software links with the IBM® data server client. The vendor software must follow a certain rule. This rule is called a process rule.

Process rule: Set up the environment search path

A process must set up the environment search path under which it finds the GSKit libraries. The process must do this setup so that the included libraries can load the GSKit libraries from the same location.

On AIX®, a process can set LIBPATH or RPATH of the program to the path of the GSKit libraries. In setuid and setgid cases, a process can use db2chglibpath to include the search path of GSKit in the RPATH of the program. Only then, can GSKit libraries from that location can be used. On Linux, Sun, and HP-UX, a process can set LD_LIBRARY_PATH to the path of the GSKit libraries. In setuid and setgid cases, a process can use db2chglibpath to include the search path of GSKit in the RPATH of the IBM data server client library. Only then, can GSKit libraries from that location can be used. For example, when a process must use global GSKit in server instances, or it must use its own local GSKit in client or server instances, it might use db2chglibpath to change the RPATH.

Symbolic link approach and restriction

When you install DB2 for Linux, UNIX, and Windows on UNIX and Linux, local GSKit libraries are installed as well. Those libraries are in <db2_install_path>/lib64/gskit_db2 or <db2_install_path>/lib32/gskit_db2.

During the installation of other IBM products another copy of the GSKit libraries might be installed. Depending on the product, these libraries might be either local GSKit libraries or global GSKit libraries. When DB2 for Linux, UNIX, and Windows and another IBM product that includes GSKit libraries are both installed on the same system, some interoperability issues might arise. These interoperability issues might occur because GSKit allows only libraries from a single GSKit source to exist in any single process. The interoperability issues might lead to unpredictable behavior and runtime errors.

To ensure that a single source of GSKit libraries is used, the symbolic link approach can be used. During an initial DB2 for Linux, UNIX, and Windows installation, the installer creates a symbolic link <db2_install_path>/lib64/gskit or <db2_install_path>/lib32/gskit to <db2_install_path>/lib64/gskit_db2 or <db2_install_path>/lib32/gskit_db2. This location is the default location from which GSKit libraries are loaded. Products that bundle DB2 for Linux, UNIX, and Windows and change the symbolic link from the default directory to the library directory of another copy of GSKit must ensure that the newly installed GSKit is at the same or newer level. This restriction applies whether the libraries are global or local. During an upgrade or update of DB2 for Linux, UNIX, and Windows, the symbolic link is preserved. If the newly installed copy has a symbolic link to the default location, the symbolic link that is associated with the older installation copy is preserved. If the newly installed copy has a symbolic link that does not point to the default, the symbolic link that is associated with the newer installation copy is used in the newer installation copy. Some limitations exist since the symbolic link <db2_install_path>/lib64/gskit or <db2_install_path>/lib32/gskit is in the path of the DB2 for Linux, UNIX, and Windows installation copy. For example, if there are two or more instances that are created for any DB2 copy, the symbolic link changes affect all the instances.

The GSKit version included with DB2 for Linux, UNIX, and Windows is 8.0.50.31.

Examples

DB2 for Linux, UNIX, and Windows bundles the LDAP client. The DB2 for Linux, UNIX, and Windows processes follow the process rule. To follow the process rule, the environment search path in RPATH is set to its local copy of GSKit. LDAP client libraries loads GSKit libraries from the same location. LDAP client libraries, which follow library rules, loads GSKit libraries by their base file names when GSKIT_LOCAL_INSTALL_MODE is set.

LDAP server bundles DB2 for Linux, UNIX, and Windows. LDAP processes follow the process rule. The environment search path is set to the global copy of GSKit and IBM data server client libraries loads GSKit libraries from the same location. IBM data server client libraries, which follow library rules, loads GSKit libraries by their base file names.