Topic
  • 3 replies
  • Latest Post - ‏2011-09-23T19:37:15Z by Dwayne_M
MohanShanbhag
MohanShanbhag
2 Posts

Pinned topic Issue with loading of a shared application library on AIX 6.1

‏2011-09-23T16:46:30Z |
Hi,

I had posted this question incorrectly in the Tivoli forum. Am posting this now in the AIX forum.

We are in the process of migration of our C/C++ based code from HP-Unix 11.11 to AIX 6.1. We are facing an issue with respect to running of an executable. The background is as below.

We have a binary, e.g., bin.exe which uses two application libraries say lib1.sl and lib2.sl on HP-Unix. These 2 libraries are our application libraries only. There are some functions referenced in lib1.sl which are defined in lib2.sl. In the normal path of run, these functions do not get referenced. When the binary runs on HP-UX, it works fine. On AIX, we converted libraries to lib1.so and lib2.so. However, while running on AIX 6.1, we got the following error.
/usr2/emp58318/TRIMS/DLVIN_inSvr/>>./DLVIN_inSvr_tal
exec(): 0509-036 Cannot load program ./DLVIN_inSvr_tal because of the following errors:
rtld: 0712-001 Symbol FileNetDeleteBatch was referenced
from module /usr2/emp61116/LIB/libImgClient.so(), but a runtime definition
of the symbol was not found.

The options for creating the library are as below.

/usr/vacpp/bin/xlC -q32 -qmkshrobj -o <applib.so> <a.o> <b.o> ....

The options for creating the binary are as below.

/usr/vacpp/bin/xlC -bnoquiet -bmaxdata:0x30000000 -L /usr/vac/lib/aix53 -L/usr/vac/lib -L/usr/lib -lhu -lpthreads -lm -L/oracle/app/product/11.1.0.7/lib32 -lsqlplus -lclntsh -lncrypt11 -lsql11 -L/usr2/emp61116/LIB -lapplib <x.o> <y.o> ...... -o ./bin.exe

I can provide more details if necessary. Request help on this.

Regards,
Mohan.
Updated on 2011-09-23T19:37:15Z at 2011-09-23T19:37:15Z by Dwayne_M
  • Dwayne_M
    Dwayne_M
    27 Posts

    Re: Issue with loading of a shared application library on AIX 6.1

    ‏2011-09-23T18:04:53Z  
    Much of your append mentions that you are using runtime linking - for example naming your shared libraries with ".so" suffixes, as well as the text of the error message that you provided.... However the compiler command lines which you have provided do not include the options necessary for runtime linking.

    That is when creating the shared objects you should have -G in addition to -qmkshrobj. When creating the executable (bin.exe in your example) you need the -brtl option.
    Dwayne Moore
    Product Manager, Power & Compilers
    IBM Corporation | Rational Software
  • MohanShanbhag
    MohanShanbhag
    2 Posts

    Re: Issue with loading of a shared application library on AIX 6.1

    ‏2011-09-23T19:17:04Z  
    • Dwayne_M
    • ‏2011-09-23T18:04:53Z
    Much of your append mentions that you are using runtime linking - for example naming your shared libraries with ".so" suffixes, as well as the text of the error message that you provided.... However the compiler command lines which you have provided do not include the options necessary for runtime linking.

    That is when creating the shared objects you should have -G in addition to -qmkshrobj. When creating the executable (bin.exe in your example) you need the -brtl option.
    Dwayne Moore
    Product Manager, Power & Compilers
    IBM Corporation | Rational Software
    Hi Dwayne,

    We have tried the options mentioned by you. However, it still gives us the same error while loading.

    Regards,
    Mohan
  • Dwayne_M
    Dwayne_M
    27 Posts

    Re: Issue with loading of a shared application library on AIX 6.1

    ‏2011-09-23T19:37:15Z  
    Hi Dwayne,

    We have tried the options mentioned by you. However, it still gives us the same error while loading.

    Regards,
    Mohan
    For the command lines that you mentioned for linking the executable or linking the first shared object, I do not see a reference to a second shared object (i.e. the one containing the definition of the function) ?

    Dwayne Moore Market Manager, Power & Compilers IBM Corporation | Rational Software