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.
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/188.8.131.52/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.
Pinned topic Issue with loading of a shared application library on AIX 6.1
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-09-23T19:37:15Z at 2011-09-23T19:37:15Z by Dwayne_M
Dwayne_M 10000005FD27 Posts
Re: Issue with loading of a shared application library on AIX 6.12011-09-23T18:04:53ZThis is the accepted answer. This is the accepted answer.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.
Product Manager, Power & Compilers
IBM Corporation | Rational Software
MohanShanbhag 270003CDFB2 Posts
Re: Issue with loading of a shared application library on AIX 6.12011-09-23T19:17:04ZThis is the accepted answer. This is the accepted answer.
- Dwayne_M 10000005FD
We have tried the options mentioned by you. However, it still gives us the same error while loading.
Dwayne_M 10000005FD27 Posts
Re: Issue with loading of a shared application library on AIX 6.12011-09-23T19:37:15ZThis is the accepted answer. This is the accepted answer.
- MohanShanbhag 270003CDFB
Dwayne Moore Market Manager, Power & Compilers IBM Corporation | Rational Software