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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kp

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

    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/libapplicationa pi.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/libapplicationa pi.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/libapplicationa pi.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.
  • Kenneth Brody

    #2
    Re: Run time error on AIX: "Symbol iconv was referenced&quot ;

    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/libapplicationa pi.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/libapplicationa pi.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:ThisIsA SpamTrap@gmail. com>

    Comment

    • Walter Roberson

      #3
      [OT] Re: Run time error on AIX: &quot;Symbol iconv was referenced&quot ;

      In article <52abe2b5-385b-4d29-a4e8-db678b3e6ae9@e2 3g2000prf.googl egroups.com>,
      kp <kiran.r.pillai @gmail.comwrote :

      [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/libapplicationa pi.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

      Comment

      • jacob navia

        #4
        Re: Run time error on AIX: &quot;Symbol iconv was referenced&quot ;

        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/libapplicationa pi.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/libapplicationa pi.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

        Comment

        • jacob navia

          #5
          Re: [OT] Re: Run time error on AIX: &quot;Symbol iconv was referenced&quot ;

          Walter Roberson wrote:
          In article <52abe2b5-385b-4d29-a4e8-db678b3e6ae9@e2 3g2000prf.googl egroups.com>,
          kp <kiran.r.pillai @gmail.comwrote :
          >
          [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/libapplicationa pi.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

          Comment

          • kp

            #6
            Re: Run time error on AIX: &quot;Symbol iconv was referenced&quot ;

            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 libapplicationa pi.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 <ja...@nospam.c omwrote:
            Walter Roberson wrote:
            In article <52abe2b5-385b-4d29-a4e8-db678b3e6...@e2 3g2000prf.googl egroups.com>,
            kp <kiran.r.pil... @gmail.comwrote :
            >
            [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/libapplicationa pi.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/informatiquehtt p://www.cs.virginia .edu/~lcc-win32

            Comment

            Working...