[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: libtool issue

From: Joe Orton <jorton_at_redhat.com>
Date: 2007-12-05 11:57:44 CET

On Wed, Dec 05, 2007 at 01:02:01AM +0100, Stefan Sperling wrote:
> Basically, anyone compiling subversion trunk on an ELF platform
> should have seen this, given that they also have a subversion package
> provided by the OS installed on their system. I know that it happens
> on Debian (confirmed by Karl), FreeBSD (run ldd on the binary to see
> crazy linkage), and OpenBSD (compile fails).

Subversion (unnecessarily) links executables using "-rpath $(libdir)",
so if you have old libraries in $(libdir) at build time it should be
expected that odd things will happen.

I have previously argued that this is incorrect, and we've been fixing
it in the Fedora Subversion package for a long time, as below.

--- subversion-0.31.0/build/generator/gen_base.py.rpath
+++ subversion-0.31.0/build/generator/gen_base.py
@@ -421,6 +421,9 @@
     tfile = '%s-%s%s' % (name, cfg.version, extmap['lib', 'target'])
     self.filename = os.path.join(self.path, tfile)
 
+ ### hmm. this is Makefile-specific
+ self.link_cmd = '$(LINK_LIB)'
+
 class TargetApacheMod(TargetLib):
 
   def __init__(self, name, options, cfg, extmap):
--- subversion-0.31.0/Makefile.in.rpath
+++ subversion-0.31.0/Makefile.in
@@ -127,7 +127,8 @@
 COMPILE_SWIG_JAVA = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) $(SWIG_JAVA_INCLUDES) $(INCLUDES) -o $@ -c
 COMPILE_SWIG_PL = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) $(SWIG_PL_INCLUDES) $(INCLUDES) -o $@ -c
 
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
+LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
+LINK_LIB = $(LINK) -rpath $(libdir)
 
 # special link rule for mod_dav_svn
 LINK_APACHE_MOD = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(APACHE_LIBEXECDIR) -avoid-version -module

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 5 11:57:59 2007

This is an archived mail posted to the Subversion Dev mailing list.