A tale of two shared libraries and some unresolved symbols

invalidemail_at_aerojockey.com
Date: 02/18/05


Date: 18 Feb 2005 04:09:24 -0800

I'm on HPUX 11, using the 32-bit tools.

I'm trying to build a shared library. (Let's call it wrap.sl, cause
it's a wrapper). That shared library relied on another shared library.
 Let's call that one libgnat.sl (yes, that's the GNU Ada runtime
library; I don't like it either). It builds just fine.

When I try to run a program using wrap.sl, I get a couple unresolved
symbols (here's an example):

/usr/lib/dld.sl: Unresolved symbol: U_IS_STUB_OR_CALLX (code) from
/rapps/adm04/gnu/gnat/lib/gcc-lib/hppa1.1-hp-hpux11.00/3.2.3/adalib/libgnat.sl

As you see, it's libgnat.sl that has the unresolved symbols. The
symbols are exported from the library /usr/lib/libcl.sl. But look what
happens when I ldd libgnat.sl:

$ ldd libgnat.sl
        ../../libgcc_s.sl => ../../libgcc_s.sl
        /usr/lib/libc.2 => /usr/lib/libc.2
        /usr/lib/libdld.2 => /usr/lib/libdld.2
        /usr/lib/libc.2 => /usr/lib/libc.2
        /usr/lib/libm.2 => /usr/lib/libm.2

libcl.sl isn't there. So it's not just a problem with SHLIB_PATH
(which does have /usr/lib anyways); libgnat.sl doesn't know it needs to
look in libcl.sl to resolve its symbols.

So what can I do about this? Difficulty: I can rebuild neither the
main program nor libgnat.sl; I can only rebuild wrap.sl. However, as a
workaround, I could patch libgnat.sl (this is obviously not
preferrable, and I'm not exactly sure how to add a shared library.).

Thank you for any help,

-- 
CARL BANKS


Relevant Pages

  • Re: DBD DBI Problem
    ... case, ldd is your friend. ... need to rebuild Perl + DBI too). ... Run ldd on libinterp.so and see which shared libraries it can't find. ... If not, rebuild DBD::Ingres. ...
    (perl.dbi.users)
  • Re: lib/pam problems...
    ... >> Can you humour me and run a ldd on the xdm binary? ... libraries, which is why you're getting the PAM failure from dlopen. ... Rebuild it. ...
    (freebsd-questions)