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

Re: debian/rules and wrong run-time library



On Fri, May 16, 2003 at 10:50:05AM -0700, Bill Moseley wrote:
[...]
> Specifying the prefix works as expected.  For example, building for a new prefix:

>    moseley@bumby:~/f$ ../swish-e/configure --prefix=$HOME/f2 >/dev/null \
[...]
> note that the run-time linkages are correct (they point to the libswish-e I just built):
 
>    moseley@bumby:~/f$ ldd ~/f2/bin/swish-e
>         libxml2.so.2 => /usr/lib/libxml2.so.2 (0x4001b000)
>    >>>  libswish-e.so.2 => /home/moseley/f2/lib/libswish-e.so.2 (0x400fc000)  <<<<<
[...]
> So notice that swish-e will use /home/moseley/f2/lib/libswish-e.so.2 as expected.

If you use the non-standard prefix libtool afaik adds --rpath to
the linker options.

> First problem is that using debian/rules to build ends up swish-e finding the wrong library:
>
>    moseley@bumby:~/f$ ldd /usr/bin/swish-e
>         libxml2.so.2 => /usr/lib/libxml2.so.2 (0x4001b000)
>   >>>   libswish-e.so.2 => /usr/local/lib/libswish-e.so.2 (0x400fc000)  <<<<<
>         libz.so.1 => /lib/libz.so.1 (0x40118000)
>         libm.so.6 => /lib/libm.so.6 (0x40125000)
>         libc.so.6 => /lib/libc.so.6 (0x40146000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> Notice that it built swish-e and is using the library in /usr/local/lib (which is there from
> building swish-e from soucre on my machine).
[...]

~/f/wherever/you/temporary/placed/libswish-e is not in the search path
of the dynamic-linker (see ld.so(8)), /usr/local/lib/ might be
specified in /etc/ld.so.conf on your system, once the library is
installed to /usr/lib and ldconfig has been run, the new version will
probably be used.

> dpkg-shlibdeps: warning: could not find any packages for
> /usr/local/lib/libswish-e.so.2 (libswish-e.so.2)
> 
> dpkg-shlibdeps: warning: unable to find dependency information for shared
> library libswish-e (soname 2, path /usr/local/lib/libswish-e.so.2,
> dependency field Depends)
[...]

You are probably looking for something like
dh_shlibdeps -ldebian/libswish-e/usr/lib

You haven't read the library packaging guide
http://www.netfort.gr.jp/~dancer/column/libpkg-guide/
have you?
             cu andreas
-- 
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"



Reply to: