This article explains an archive library error when running a script on AIX.
Problem:
A script is employed to build an RTS executable using the cob –x command. The script runs successfully on HP/UX but fails on AIX. On AIX, an error appears saying archive library CLAIMCHK cannot be found. The same cob -x command is used in each case. The archive library is specified on the cob –x using the following syntax: -l:CLAIMCHK.a
Resolution:
The “-l” option is accepted by the cob command, but cob in turn passes this option to the system linker "ld". The “-l” option is actually a feature of the system linker. For information about the “-l” option, consult the HP/UX and AIX Operating System documentation, and in particular the man pages for "ld”.
On HP/UX, the linker "ld" accepts the syntax: -l:library
That is, “-l” followed by a colon (:) followed by a library name. The "ld" main page on HP/UX includes a description of how the colon changes the behavior the “-l” option.
On AIX, a colon cannot be specified. The system linker expects the syntax "-l library". This is the reason the script fails on AIX. As a quick fix for AIX remove the colon, but first determine why the colon was originally specified. Consider the behavior the colon is supposed to invoke in HP/UX’s linker, and decide whether an analogous approach should be implemented on AIX.
Incident Number: 2286648