You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Reser <be...@reser.org> on 2004/05/02 04:30:01 UTC

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

On Fri, Apr 30, 2004 at 06:25:57AM +0200, David Kimdon wrote:
> On Fri, Apr 30, 2004 at 02:17:56PM +1000, Daniel F Garcia wrote:
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=246258
> 
> This is completely a Debian bug and my fault.  It is a side effect of
> getting rpath out of the subversion shared libraries.  You should
> downgrade to 1.0.2-1 until this is fixed.

We really need to fix the Subversion build path to either by default not
put an rpath in the binary or add an option or something.  I've been
unable to figure out how to do this so right now I'm using chrpath to
deal with this.  I don't think chrpath (IIRC) is an acceptable solution
for Debian so if you have a solution that fixes the build system somehow
I'd like to see it so I can work it in somehow.

Thanks.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Joe Orton <jo...@redhat.com>.
On Tue, May 04, 2004 at 11:37:15AM -0700, Justin Erenkrantz wrote:
> --On Sunday, May 2, 2004 1:14 PM +0100 Joe Orton <jo...@redhat.com> wrote:
> 
> >I've never seen an RPATH in the SVN libraries like David mentioned; but
> >the RPATH in SVN programs is really just a mis-use of libtool; -rpath is
> >only supposed to be used when linking libraries not programs.  We use
> >this in the Red Hat RPMs:
> 
> Um, how would the OS find the libraries from the binaries if -R isn't 
> specified?  -- justin

They're in /usr/lib, so via the standard search algorithm (man ld.so). 
A binary with an RPATH of /usr/lib is usually a bug from a packager's
perspective; at best it causes a few redundant open() calls in the
run-time loader; at worst it screws up selection of libraries by causing
a generic unoptimised /usr/lib/libdb-4.x.so to be chosen over
arch-variant-optimised /lib/i686/libdb-4.x.so, for instance.

Regards,

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Joe Orton <jo...@manyfish.co.uk>.
On Wed, May 05, 2004 at 11:33:21AM -0500, Albert Chin wrote:
> On Wed, May 05, 2004 at 08:14:16AM -0700, Ben Reser wrote:
> > On Wed, May 05, 2004 at 11:02:19AM +0100, Joe Orton wrote:
> > > libtool automatically adds an appropriate RPATH to programs if they are
> > > linked against libtool libraries which will be installed into non-system
> > > directories; -rpath doesn't make any difference at all for that case.
> > > 
> > > see e.g. httpd, which doesn't pass -rpath when linking programs yet
> > > works as expected when installed with prefix != /usr.
> > 
> > Is this true only after a certain version of libtool?  If it's true of a
> > reasonably well deployed set of libtools then maybe we should rip -rpath
> > out of there period.

libtool 1.3 had the logic to add the RPATH automatically, so it's been
there "forever" as far as SVN is concerned.

> >From libtool.info for 1.5:
> `-rpath LIBDIR'
>      If OUTPUT-FILE is a library, it will eventually be installed in
>      LIBDIR.  If OUTPUT-FILE is a program, add LIBDIR to the run-time
>      path of the program.

Ah, so it is documented to work for programs somewhere too.

> So, I think it's need for libraries and programs.

Did you read the above statement about libtool automatically adding the
RPATH for $libdir to programs anyway?  So why do you think it's needed
for programs?

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Albert Chin <su...@mlists.thewrittenword.com>.
On Wed, May 05, 2004 at 08:14:16AM -0700, Ben Reser wrote:
> On Wed, May 05, 2004 at 11:02:19AM +0100, Joe Orton wrote:
> > libtool automatically adds an appropriate RPATH to programs if they are
> > linked against libtool libraries which will be installed into non-system
> > directories; -rpath doesn't make any difference at all for that case.
> > 
> > see e.g. httpd, which doesn't pass -rpath when linking programs yet
> > works as expected when installed with prefix != /usr.
> 
> Is this true only after a certain version of libtool?  If it's true of a
> reasonably well deployed set of libtools then maybe we should rip -rpath
> out of there period.

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Ben Reser <be...@reser.org>.
On Wed, May 05, 2004 at 11:02:19AM +0100, Joe Orton wrote:
> libtool automatically adds an appropriate RPATH to programs if they are
> linked against libtool libraries which will be installed into non-system
> directories; -rpath doesn't make any difference at all for that case.
> 
> see e.g. httpd, which doesn't pass -rpath when linking programs yet
> works as expected when installed with prefix != /usr.

Is this true only after a certain version of libtool?  If it's true of a
reasonably well deployed set of libtools then maybe we should rip -rpath
out of there period.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Joe Orton <jo...@manyfish.co.uk>.
On Tue, May 04, 2004 at 12:06:36PM -0700, Justin Erenkrantz wrote:
> --On Tuesday, May 4, 2004 11:56 AM -0700 Ben Reser <be...@reser.org> wrote:
> 
> >From the libraries being installed in the proper paths.  It's considered
> >a violation of Mandrakesoft policy for any binary to contain an rpath.
> >I'm currently stripping them with chrpath in the Mandrake packages.
> 
> By installing them to /usr/lib or hand-modifying /etc/ld.so.conf to add 
> your installed path?  Or, heaven forbid, setting LD_LIBRARY_PATH?
> 
> I think that's completely bogus behavior when you aren't installing into 
> /usr.  I could see packagers wanting that behavior as they are installing 
> it into /usr themselves, but I don't believe that's good behavior for 
> normal people.  This, of course, breaks Subversion when you don't have root 
> permissions.  I *love* that behavior - not.  -rpath should stay.  -- justin

libtool automatically adds an appropriate RPATH to programs if they are
linked against libtool libraries which will be installed into non-system
directories; -rpath doesn't make any difference at all for that case.

see e.g. httpd, which doesn't pass -rpath when linking programs yet
works as expected when installed with prefix != /usr.

Regards,

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Ben Reser <be...@reser.org>.
On Tue, May 04, 2004 at 12:06:36PM -0700, Justin Erenkrantz wrote:
> By installing them to /usr/lib or hand-modifying /etc/ld.so.conf to add 
> your installed path?  Or, heaven forbid, setting LD_LIBRARY_PATH?
> 
> I think that's completely bogus behavior when you aren't installing into 
> /usr.  I could see packagers wanting that behavior as they are installing 
> it into /usr themselves, but I don't believe that's good behavior for 
> normal people.  This, of course, breaks Subversion when you don't have root 
> permissions.  I *love* that behavior - not.  -rpath should stay.

That's why I said it should be an optional flag to disable it. :)

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Tuesday, May 4, 2004 11:56 AM -0700 Ben Reser <be...@reser.org> wrote:

> From the libraries being installed in the proper paths.  It's considered
> a violation of Mandrakesoft policy for any binary to contain an rpath.
> I'm currently stripping them with chrpath in the Mandrake packages.

By installing them to /usr/lib or hand-modifying /etc/ld.so.conf to add 
your installed path?  Or, heaven forbid, setting LD_LIBRARY_PATH?

I think that's completely bogus behavior when you aren't installing into 
/usr.  I could see packagers wanting that behavior as they are installing 
it into /usr themselves, but I don't believe that's good behavior for 
normal people.  This, of course, breaks Subversion when you don't have root 
permissions.  I *love* that behavior - not.  -rpath should stay.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Ben Reser <be...@reser.org>.
On Tue, May 04, 2004 at 11:37:15AM -0700, Justin Erenkrantz wrote:
> --On Sunday, May 2, 2004 1:14 PM +0100 Joe Orton <jo...@redhat.com> wrote:
> 
> >I've never seen an RPATH in the SVN libraries like David mentioned; but
> >the RPATH in SVN programs is really just a mis-use of libtool; -rpath is
> >only supposed to be used when linking libraries not programs.  We use
> >this in the Red Hat RPMs:
> 
> Um, how would the OS find the libraries from the binaries if -R isn't 
> specified?

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Sunday, May 2, 2004 1:14 PM +0100 Joe Orton <jo...@redhat.com> wrote:

> I've never seen an RPATH in the SVN libraries like David mentioned; but
> the RPATH in SVN programs is really just a mis-use of libtool; -rpath is
> only supposed to be used when linking libraries not programs.  We use
> this in the Red Hat RPMs:

Um, how would the OS find the libraries from the binaries if -R isn't 
specified?  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Ben Reser <be...@reser.org>.
On Sun, May 02, 2004 at 01:14:15PM +0100, Joe Orton wrote:
> I've never seen an RPATH in the SVN libraries like David mentioned; but
> the RPATH in SVN programs is really just a mis-use of libtool; -rpath is
> only supposed to be used when linking libraries not programs.  We use
> this in the Red Hat RPMs:

I've seen it on the bindings.  I remember when it started showing up.
I'll look into this and see if I can fix all of it.  Thanks for giving
me that patch.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Has you guys seen this problem - undefined symbol: svn_sort_compare_items_as_paths

Posted by Joe Orton <jo...@redhat.com>.
On Sat, May 01, 2004 at 09:30:01PM -0700, Ben Reser wrote:
> On Fri, Apr 30, 2004 at 06:25:57AM +0200, David Kimdon wrote:
> > On Fri, Apr 30, 2004 at 02:17:56PM +1000, Daniel F Garcia wrote:
> > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=246258
> > 
> > This is completely a Debian bug and my fault.  It is a side effect of
> > getting rpath out of the subversion shared libraries.  You should
> > downgrade to 1.0.2-1 until this is fixed.
> 
> We really need to fix the Subversion build path to either by default not
> put an rpath in the binary or add an option or something.  I've been
> unable to figure out how to do this so right now I'm using chrpath to
> deal with this.  I don't think chrpath (IIRC) is an acceptable solution
> for Debian so if you have a solution that fixes the build system somehow
> I'd like to see it so I can work it in somehow.

I've never seen an RPATH in the SVN libraries like David mentioned; but
the RPATH in SVN programs is really just a mis-use of libtool; -rpath is
only supposed to be used when linking libraries not programs.  We use
this in the Red Hat RPMs:

--- 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