Run time error on AIX: "Symbol iconv was referenced"

K

kp

Hi,

I am compiling on an AIX 5.1 box and my test machine is AIX 5.3.

I run the foll. steps for compiling my test binary "test"
/usr/vacpp/bin/xlC test.c -c -o test.o -I/home/jag/progs/include -I/
usr/lpp/application/include
/usr/vacpp/bin/xlC -o test -L/home/jag/progs/lib -L/usr/lib -L/usr/lpp/
application/lib -brtl -s test.o -lapplicationapi -liconv


Now, when I run "test" on my AIX 5.3 box, I get the foll. error:
# ./test
exec(): 0509-036 Cannot load program ./opcapitest because of the
following errors:
rtld: 0712-001 Symbol iconv was referenced
from module /usr/lpp/application/lib/libapplicationapi.so(), but
a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol iconv_open was referenced
from module /usr/lpp/application/lib/libapplicationapi.so(), but
a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol iconv_close was referenced
from module /usr/lpp/application/lib/libapplicationapi.so(), but
a runtime definition
of the symbol was not found.
You have mail in /usr/spool/mail/root
#

Could you please tell me whats wrong here?

Thanks,
kp

P.S: if this is not the right forum for this question, please direct
me to the right one.
 
K

Kenneth Brody

kp said:
Hi,

I am compiling on an AIX 5.1 box and my test machine is AIX 5.3. [...]
# ./test
exec(): 0509-036 Cannot load program ./opcapitest because of the
following errors:
rtld: 0712-001 Symbol iconv was referenced
from module /usr/lpp/application/lib/libapplicationapi.so(), but
a runtime definition
of the symbol was not found.
[... Snip similar iconv-related missing symbols ...]
P.S: if this is not the right forum for this question, please direct
me to the right one.

You would get more help in a group that discusses AIX and/or iconv.
However, my guess is that you are missing the shared / dynamically-
linked library that contains the iconv functions.

Find a group that discusses AIX and/or iconv, and show them the
above errors, along with the output of "ldd ./test" and perhaps the
output of "ldd /usr/lpp/application/lib/libapplicationapi.so" as
well.

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>
 
W

Walter Roberson

[OT]
I run the foll. steps for compiling my test binary "test"
/usr/vacpp/bin/xlC test.c -c -o test.o -I/home/jag/progs/include -I/
usr/lpp/application/include
/usr/vacpp/bin/xlC -o test -L/home/jag/progs/lib -L/usr/lib -L/usr/lpp/
application/lib -brtl -s test.o -lapplicationapi -liconv
Now, when I run "test" on my AIX 5.3 box, I get the foll. error:
# ./test
exec(): 0509-036 Cannot load program ./opcapitest because of the
following errors:
rtld: 0712-001 Symbol iconv was referenced
from module /usr/lpp/application/lib/libapplicationapi.so(), but
a runtime definition
of the symbol was not found.

You linked with -liconv on the 5.1 box, and I am going to guess
that that is linking against a shared library rather than
a static link. But the shared library symbol definitions
for the iconv library are corrupt or missing on your AIX 5.3 box.

My speculation would be that your problem is that you do not
have an accessible libiconv.so (on your dynamic link path) on
your AIX 5.3 box. iconv is sometimes an add-on or optionally-
installed library rather than something always installed with the OS.
 
J

jacob navia

kp said:
Hi,

I am compiling on an AIX 5.1 box and my test machine is AIX 5.3.

I run the foll. steps for compiling my test binary "test"
/usr/vacpp/bin/xlC test.c -c -o test.o -I/home/jag/progs/include -I/
usr/lpp/application/include
/usr/vacpp/bin/xlC -o test -L/home/jag/progs/lib -L/usr/lib -L/usr/lpp/
application/lib -brtl -s test.o -lapplicationapi -liconv


Now, when I run "test" on my AIX 5.3 box, I get the foll. error:
# ./test
exec(): 0509-036 Cannot load program ./opcapitest because of the
following errors:
rtld: 0712-001 Symbol iconv was referenced
from module /usr/lpp/application/lib/libapplicationapi.so(), but
a runtime definition
of the symbol was not found.

This means that a runtime shared object was not found that
defines the symbol iconv.

To solve this you should do:

1) ldd /usr/lpp/application/lib/libapplicationapi.so

This will list you all the shared objects needed by your shared object.


Note that all iconv methods are in /usr/lib/nls/loc/iconv/*

2) Once you find in which shared object the symbol iconv lives, you have
to add the directory where that shared object is to your LIBPATH
environment variable.

3) Then run ldd again to be sure you fixed it
 
J

jacob navia

Walter said:
[OT]
I run the foll. steps for compiling my test binary "test"
/usr/vacpp/bin/xlC test.c -c -o test.o -I/home/jag/progs/include -I/
usr/lpp/application/include
/usr/vacpp/bin/xlC -o test -L/home/jag/progs/lib -L/usr/lib -L/usr/lpp/
application/lib -brtl -s test.o -lapplicationapi -liconv
Now, when I run "test" on my AIX 5.3 box, I get the foll. error:
# ./test
exec(): 0509-036 Cannot load program ./opcapitest because of the
following errors:
rtld: 0712-001 Symbol iconv was referenced
from module /usr/lpp/application/lib/libapplicationapi.so(), but
a runtime definition
of the symbol was not found.

You linked with -liconv on the 5.1 box, and I am going to guess
that that is linking against a shared library rather than
a static link. But the shared library symbol definitions
for the iconv library are corrupt or missing on your AIX 5.3 box.


Note that all iconv methods are in /usr/lib/nls/loc/iconv/*
That is easy to verify
My speculation would be that your problem is that you do not
have an accessible libiconv.so (on your dynamic link path) on
your AIX 5.3 box. iconv is sometimes an add-on or optionally-
installed library rather than something always installed with the OS.

The LIBPATH environment variable controls where the loader searchs
for shared objects
 
K

kp

Hi All,

Thanks a lot for your answers.

I was able to find the root cause of my issue.

I was not linking with iconv when I built the libapplicationapi.so,
which was causing the issue. I recompiled the library after linking
with iconv and the issue was resolved.

Thanks once again.

-kp

Walter said:
[OT]
I run the foll. steps for compiling my test binary "test"
/usr/vacpp/bin/xlC test.c -c -o test.o -I/home/jag/progs/include -I/
usr/lpp/application/include
/usr/vacpp/bin/xlC -o test -L/home/jag/progs/lib -L/usr/lib -L/usr/lpp/
application/lib -brtl -s test.o -lapplicationapi -liconv
Now, when I run "test" on my AIX 5.3 box, I get the foll. error:
# ./test
exec(): 0509-036 Cannot load program ./opcapitest because of the
following errors:
rtld: 0712-001 Symbol iconv was referenced
from module /usr/lpp/application/lib/libapplicationapi.so(), but
a runtime definition
of the symbol was not found.
You linked with -liconv on the 5.1 box, and I am going to guess
that that is linking against a shared library rather than
a static link. But the shared library symbol definitions
for the iconv library are corrupt or missing on your AIX 5.3 box.

Note that all iconv methods are in /usr/lib/nls/loc/iconv/*
That is easy to verify
My speculation would be that your problem is that you do not
have an accessible libiconv.so (on your dynamic link path) on
your AIX 5.3 box. iconv is sometimes an add-on or optionally-
installed library rather than something always installed with the OS.

The LIBPATH environment variable controls where the loader searchs
for shared objects
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,851
Latest member
CliftonCor

Latest Threads

Top