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

Discussion in 'C Programming' started by kp, Mar 13, 2008.

  1. kp

    kp Guest

    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.
    kp, Mar 13, 2008
    #1
    1. Advertising

  2. kp wrote:
    >
    > 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:>
    Kenneth Brody, Mar 13, 2008
    #2
    1. Advertising

  3. [OT] Re: Run time error on AIX: "Symbol iconv was referenced"

    In article <>,
    kp <> wrote:

    [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.
    --
    "Ignorance has been our king... he sits unchallenged on the throne of
    Man. His dynasty is age-old. His right to rule is now considered
    legitimate. Past sages have affirmed it. They did nothing to unseat
    him." -- Walter M Miller, Jr
    Walter Roberson, Mar 13, 2008
    #3
  4. kp

    jacob navia Guest

    kp wrote:
    > 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


    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
    jacob navia, Mar 13, 2008
    #4
  5. kp

    jacob navia Guest

    Re: [OT] Re: Run time error on AIX: "Symbol iconv was referenced"

    Walter Roberson wrote:
    > In article <>,
    > kp <> wrote:
    >
    > [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


    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
    jacob navia, Mar 13, 2008
    #5
  6. kp

    kp Guest

    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

    On Mar 13, 7:36 pm, jacob navia <> wrote:
    > Walter Roberson wrote:
    > > In article <>,
    > > kp <> wrote:

    >
    > > [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
    >
    > --
    > jacob navia
    > jacob at jacob point remcomp point fr
    > logiciels/informatiquehttp://www.cs.virginia.edu/~lcc-win32
    kp, Mar 13, 2008
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris

    run a JAR on AIX platform

    Chris, Jan 27, 2005, in forum: Java
    Replies:
    1
    Views:
    6,559
    Rhino
    Jan 27, 2005
  2. flamesrock
    Replies:
    8
    Views:
    449
    Hendrik van Rooyen
    Nov 24, 2006
  3. ClownPleco

    putenv for AIX and ifdef for AIX

    ClownPleco, Aug 22, 2007, in forum: C Programming
    Replies:
    5
    Views:
    1,121
    Thomas Dickey
    Aug 24, 2007
  4. Pierre Yves
    Replies:
    2
    Views:
    481
    Pierre Yves
    Jan 10, 2008
  5. Replies:
    5
    Views:
    198
    Philippe Lucas
    Jul 8, 2005
Loading...

Share This Page