Skip to main content

This article explains what you can do if you receive this error during compilation.

Problem:

This error may occur during compilation: “cobchecker64: fatal: relocation error symbol check: referenced symbol not found”. The text of the error message will resemble the following:

ld.so.1: cobchecker64: fatal: relocation error: file /opt/cobolse5wp4_64/bin/cobchecker64: symbol check: referenced symbol not found.

This is caused by a mistake in the library path environment variable.

Resolution:

On AIX, the name of the library path environment variable is LIBPATH. On 32-bit HP/UX, it is SHLIB_PATH, and on all other UNIX and Linux platforms, it is LD_LIBRARY_PATH.

The environment variable is supposed to contain a colon-delimited list of directory locations where the system linker should look for libraries. When using Server Express, this must include $COBDIR/lib (where $COBDIR is an environment variable pointing to the install location of Server Express). The error occurs when a library path environment variable contains two different $COBDIR/lib locations, and when the first location to appear does not match the current setting of $COBDIR. Here's an example:

On a certain machine, an old version of Server Express is installed in /opt/SE_40SP2, and a new version is installed in /opt/SE_50WP2. Currently, the COBDIR environment variable is set to the new installation, /opt/SE_50WP2. But LD_LIBRARY_PATH is set to /opt/SE_40SP2/lib:/opt/SE_50WP2/lib, as shown below:


$> echo $COBDIR
/opt/SE_50WP2
$> echo $LD_LIBRARY_PATH
/opt/SE_40SP2/lib:/opt/SE_50WP2/lib

The problem here is that the library location for the older Server Express installation appears first on LD_LIBRARY_PATH, before the location for the new Server Express, while COBDIR is pointing to the new location.

The solution is to modify the library path environment variable, specifying a location matching the current setting of $COBDIR first. In the above example, this would be:


$> LD_LIBRARY_PATH=/opt/SE_50WP2/lib:/opt/SE_40SP2/lib
$> export LD_LIBRARY_PATH

This prevents the error from occurring.

Old KB# 14375