tng and shared libs
Elrond
Elrond at Wunder-Nett.org
Thu Mar 2 12:02:13 GMT 2000
On Thu, Mar 02, 2000 at 08:51:38AM +1100, Michael Ju. Tokarev wrote:
> Tim Potter wrote:
> >
> > Jean Francois Micouleau writes:
> >
> > > I'm required to run make install and use /usr/local/samba/bin/rpcclient
> > > instead. why ?
> > > I want to compile and run the binaries in the build directory.
> >
> > Try $SAMBA_SRC/bin/.libs/rpcclient which is the non shell-script
> > version (i.e dynamically linked) of rpcclient. Also useful for
> > running gdb on. (-:
> >
>
> But do not forget to set LD_LIBRARY_PATH to place where libraries
> was _built_, e.g.
> LD_LIBRARY_PATH=`pwd`/lib/.libs:`pwd`/smblib/.libs bin/.libs/rpcclient
> or you risk that it crashes, as it will find (if it will!) .so's from
> previous _installation_, e.g. in /usr/lib, but those probably not that
> needed... This is what exactly do wrappers in bin, e.g. bin/rpcclient
Yes and no.
Unless you have no installed libraries, it will always use
the installed libraries... The paths to the libraries are
hardcoded into the binaries, so the binary finds them even,
if they're in places that the system's dynamic linker
doesn't know about by default (/etc/ld.so.conf on Linux).
If you need to run gdb on it, do the following:
$ bin/rpcclient
(this will give you the help, but also compile a version,
that hasn't got the paths hardcoded)
$ export LD_LIBRARY_PATH=`pwd`/bin/.libs
$ gdb bin/.libs/lt-rpcclient
The "official" way to do this is something like this:
./libtool gdb bin/rpcclient
or:
./libtool --mode=execute gdb bin/rpcclient
The later form is useful, where gdb isn't realy called gdb
and libtool so can't guess, that you want to run a debugger
on your binary. You can even do this:
./libtool --mode=execute file bin/rpcclient
Elrond
More information about the samba-technical
mailing list