using -q64 on AIX for a C-ISAM compile can give undefined symbols errors

Technote (troubleshooting)


Problem(Abstract)

using -q64 on AIX for a C-ISAM compile can give undefined symbols errors on symbols such as isbuild , isclose

Cause

The reason for the errors is due to the fact that a previous installation of the C-ISAM product ( 32-bit ) has left libraries in the /usr/lib area .

.
If the 64-bit compilation does not specify the $INFORMIXDIR/lib path as part of the compile line , then the libraries in /usr/lib will be picked up - and since they are 32-bit the linking errors occur.

The 32-bit libraries are put into the /usr/lib area during installation time , when the option to specify that the libraries go into an alternate directory is not taken up.


Diagnosing the problem

When a 64-bit compilation is attempted , the following errors can be seen at link time

.

    cc test.o /usr/ccs/lib/libcurses.a /usr/lib/libpthreads.a -otest -lisam   -lm -q64 -brtl -bnoquiet  

    ld: 0711-318 ERROR: Undefined symbols were found.
            The following symbols are in error:
     Symbol                    Inpndx  TY CL Source-File(Object-File) OR Import-File{Shared-object}
                                  RLD: Address  Section  Rld-type Referencing Symbol
     ----------------------------------------------------------------------------------------------
     .isbuild                  [74]    ER PR test.c(test.o)
                                       000000e8 .text    R_RBR    [6]     .main
     iserrno                   [46]    ER UA test.c(test.o)
                                       000001c8 .data    R_POS    [48]    <iserrno>
     .isclose                  [76]    ER PR test.c(test.o)
                                       0000013c .text    R_RBR    [6]     .main
    ER: The return code is 8.

Resolving the problem

To resolve the issue make sure that the $INFORMIXDIR/lib is specified in the compile line so that the correct C-ISAM libraries are picked up - rather than any previous installed C-ISAM libraries residing in the /usr/lib area.

.
cc test.o -L$INFORMIXDIR/lib /usr/ccs/lib/libcurses.a /usr/lib/libpthreads.a -otest -lisam -lm -q64 -brtl -bnoquiet

......

RC: Highest return code was 0.

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Informix C-ISAM

Software version:

7.2

Operating system(s):

AIX

Reference #:

1429242

Modified date:

2010-12-24

Translate my page

Machine Translation

Content navigation