libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to run ldd on non-installed .so ?


From: Gary V . Vaughan
Subject: Re: how to run ldd on non-installed .so ?
Date: Sat, 16 Jun 2001 15:12:47 +0100

On Wednesday 13 June 2001  9:24 pm, John Reiser wrote:
> ltmain.sh (GNU libtool) 1.4 (1.920 2001/04/24 23:26:18)
>
> How should I run ldd on a built, but non-installed, .so library?
> What I'm looking for is automatic setting of LD_LIBRARY_PATH
> before invoking ldd.  I want the ldd output for its identification
> of .soname and some path to each DT_NEEDED module, and the
> absolute address at which each library is loaded.
>
> "libtool --mode=execute ldd .libs/foo.so" eventually tries to
>       eval 'exec $cmd "/"'
>       exec ldd /
> because both $progdir and $program are empty strings.
>
> A similar fate awaits both
>       libtool --mode=execute ldd .libs/foo.la
> and
>       libtool --mode=execute -dlopen .libs/foo.la ldd .libs/foo.so
>
> Hints?

In the first instance Peter is correct in that you shouldn't be trying to use 
libtool in this way for the purpose you describe, unless you don't care about 
portability.

However, for the archives, libtool always operates on libtool libraries, so 
you should be using:

  $top_builddir/libtool --mode=execute ldd foo.la

$top_builddir is important, because theoretically you might have problems if 
the installed libtool is a very different version to the package version that 
built the .la file.

Cheers,
        Gary.
-- 
  ())_.  Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/   Research Scientist  http://www.oranda.demon.co.uk        ,_())____
  / )=   GNU Hacker          http://www.gnu.org/software/libtool   \'      `&
`(_~)_   Tech' Author        http://sources.redhat.com/autobook    =`---d__/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]