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

Re: [Fwd: problem with dynamically loaded plugins]

From: Marc Haisenko <haisenko_at_comdasys.com>
Date: 2007-09-13 18:44:08 CEST

On Thursday 13 September 2007 18:23, Michael Haubenwallner wrote:
> I'm compiling svn (currently 1.4.2) with reduced capabilities (only
> 'svn' and 'file' plugins, no need for 'dav') to have less dependencies
> myself, because on the target machine I cannot assume a preinstalled svn
> nor do I have root access.
> Also, as I have svn embedded into some package-building mechanism,
> always installing complete svn on the target machine manually is too
> much work.
> But now, when this target machine has a different svn version (say
> 1.4.4) installed in /usr/bin (libs in /usr/lib) or somewhere else where
> the dynamic-loader finds shared libs, when using my own "svn --version"
> I get this error:
> svn: Mismatched RA version for 'dav': found 1.4.2, expected 1.4.4

So your problem seems to be the dynamic loader... I'm assuming the following
layout for the explanation:

1.4.4: /usr/bin/*

1.4.2: /opt/svn/bin/*

Problem is, the dynamic link loader will search only he knows about for the
SubVersion libraries: and that's /usr/lib in this case. So it will load the
one from that directory. See /etc/ld.so.conf.

The workaround is to replace the binaries in /opt/svn/bin/* with wrapper
scripts like this:


"$0.orig" "$@"

Rename the original /opt/svn/bin/svn* commands to /opt/svn/bin/svn*.orig, put
the script (or symlink to it) in their place and it should load the correct
libraries. If that doesn't work you could use the LD_PRELOAD sledgehammer,
but LD_LIBRARY_PATH should work just fine. Instead of "/opt/svn/lib" you
could also write (this time INCLUDING the quotation marks to make it work
with paths which include spaces) "`dirname "$0"`/../lib" to make it

Hope that helps,

Marc Haisenko
Comdasys AG
Rüdesheimer Straße 7
D-80686 München
Tel:   +49 (0)89 - 548 433 321
e-mail: haisenko@comdasys.com
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 13 18:40:43 2007

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