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

upstream libtool 0.3c does *not* use -rpath!!!



Hello,

It seems that the upstream maintainers of libtool have made changes,
at least for the Debian i386 platform, that means it no longer uses
rpath (or have I got something seriously wrong).

Anyway, I encountered the same problem as bug #66135. To work
around this problem, I removed the -rpath hack and recompiled.

To my surprise after I compiled my code, and run lintian on it, it
didn't give me any errors about hardcoding rpath.

What is going on here? is

a) lintian buggy?

b) or have the upstream authors of libtool really fixed the dreaded
rpath problem?

I have noted that libtool compiles two copies of the executable
file. By default, it only compiles the installable version, which
doesn't contain any rpath. However, if you execute the wrapper script,
then another executable is compiled "on-the-fly" that contains rpath
information to the un-installed libraries. This version is never
installed. I believe this should be satisfactory for all concerned.

So, if I am correct, I recommend that bugs 66135 and 47766 be closed.
The solution to bug 66135 is simple: the rpath hack is no longer
required.

As proof, here is the output generated by linking a binary:

/bin/sh ../../libtool --mode=link gcc  -Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -I../../lib/roken -I../../lib/roken -g -O2   -o asn1_print  asn1_print.o libasn1.la ../com_err/libcom_err.la ../../lib/vers/libvers.la ../../lib/roken/libroken.la -lcrypt -ldb -lresolv -lresolv 
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -I../../lib/roken -I../../lib/roken -g -O2 -o .libs/asn1_print asn1_print.o  ./.libs/libasn1.so -lresolv -lresolv ../com_err/.libs/libcom_err.so -lresolv -lresolv ../../lib/vers/.libs/libvers.so -lresolv -lresolv ../../lib/roken/.libs/libroken.so -lresolv -lresolv -lcrypt -ldb -lresolv -lresolv
creating asn1_print

contains no rpath!

It is not until run the *uninstalled version* do:

sh -x asn1_print

that rpath is used

[...]
++ gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast -Wmissing-declarations -Wnested-externs -I../../lib/roken -I../../lib/roken -g -O2 -o /homes/bam/build/heimdal-0.3a/lib/asn1/.libs/23129-lt-asn1_print asn1_print.o ./.libs/libasn1.so -lresolv -lresolv ../com_err/.libs/libcom_err.so -lresolv -lresolv ../../lib/vers/.libs/libvers.so -lresolv -lresolv ../../lib/roken/.libs/libroken.so -lresolv -lresolv -lcrypt -ldb -lresolv -lresolv -Wl,--rpath -Wl,/homes/bam/build/heimdal-0.3a/lib/asn1/.libs -Wl,--rpath -Wl,/homes/bam/build/heimdal-0.3a/lib/com_err/.libs -Wl,--rpath -Wl,/homes/bam/build/heimdal-0.3a/lib/vers/.libs -Wl,--rpath -Wl,/homes/bam/build/heimdal-0.3a/lib/roken/.libs
+ :
+ mv -f /homes/bam/build/heimdal-0.3a/lib/asn1/.libs/23129-lt-asn1_print /homes/bam/build/heimdal-0.3a/lib/asn1/.libs/lt-asn1_print
[...]
-- 
Brian May <bam@debian.org>



Reply to: