[zeromq-dev] [PATCH] Don't change libtool RPATH behaviour on Linux
Martin Lucina
mato at kotelna.sk
Tue Oct 5 10:15:38 CEST 2010
Hi all,
an issue has come up with the automated build system that Mikko is
experimenting with; namely that our configure.in contains code to disable
RPATH manipulation for libtool-linked binaries, on Linux.
What this means in practice is that you cannot run the standard
$ ./configure
$ make
$ make check
set of commands, since the test programs will not be able to find the
libzmq.so shared library.
AFAICS the "disable RPATH handling" hook was introduced into configure.in
way long ago by Palo Malosek; I don't know why this was done and cannot
find any useful reference in the list archives.
Hence, unless anyone speaks up quickly, I will ask that the attached patch
be applied to both maint and master.
For reference, see for example http://wiki.debian.org/RpathIssue.
Testing on my system (Debian stable with a backported version of libtool
2.2.6b) shows that if I apply this patch then I get the correct behaviour:
$ chrpath -l perf/.libs/local_lat
perf/.libs/local_lat: no rpath or runpath tag found.
$ ./local_lat
usage: local_lat <bind-to> <message-size> <roundtrip-count>
$ chrpath -l .libs/lt-local_lat
.libs/lt-local_lat: RPATH=/home/mato/src/zeromq2/src/.libs
i.e. .libs/local_lat has no RPATH, but the invocation of its libtool
wrapper script creates a .libs/lt-local_lat with the correct RPATH.
I've also verified that the installed libzmq.so and
zmq_{streamer/queue/forwarder} binaries have no RPATH.
-mato
(patch follows}
index a27dd13..7f0e29a 100644
--- a/configure.in
+++ b/configure.in
@@ -363,15 +363,3 @@ AC_OUTPUT(Makefile src/Makefile doc/Makefile
devices/Makefile devices/zmq_forwarder/Makefile \
devices/zmq_streamer/Makefile devices/zmq_queue/Makefile \
builds/msvc/Makefile tests/Makefile)
-
-# On Linux patch libtool to delete hardcoded paths (rpath).
-case "${host_os}" in
- *linux*)
- sed < libtool > libtool-2 \
- 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" "/'
- mv libtool-2 libtool
- chmod 755 libtool
- ;;
-esac
-
-
More information about the zeromq-dev
mailing list