You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "bzb.dev001" <bz...@gmail.com> on 2013/12/05 21:24:02 UTC

subversion hardcoded to look for libserf-1.so.1 when a newer libserf is available

I'm compiling subversion-1.8.5 from source with the following supporting 
projects.  The system is a linux box running Lubuntu 12.04 64bit.

subversion-1.8.5
serf-1.3.2
apache-apr-1.5.0
apache-apr-util-1.5.3


After compiling from source, when run 'svn', the following error occurs.

$ /usr/local/bin/subversion-1.8.5/bin/svn
/usr/local/bin/subversion-1.8.5/bin/svn: error while loading shared 
libraries: libserf-1.so.1: cannot open shared object file: No such file 
or directory


I know that serf had been compiled and it's location was given as a 
parameter to the subversion 'configure' app.  I do not know why it 
insists on finding libserf-1.so.1 when libserf-1.so.1.3.0 was compiled.

Any help is greatly appreciated.
Thanks in advance.



How to reproduce the issue:

o) compile apache-apr-1.5.0

./configure --prefix=/usr/local/bin/apache-apr-1.5.0
make; make test
sudo make install

o) compile apache-apr-util-1.5.3

./configure --prefix=/usr/local/bin/apache-apr-util-1.5.3 
--with-apr=/usr/local/bin/apache-apr-1.5.0
make; make test
sudo make install

o) compile serf-1.3.2

$ scons APR=/usr/local/bin/apache-apr-1.5.0 
APU=/usr/local/bin/apache-apr-util-1.5.3
$ sudo scons install

Details of the output are here: http://pastebin.ca/2492961

The resulting serf headers and libraries are installed here:

/usr/local/lib/libserf-1.a
/usr/local/lib/libserf-1.so.1.3.0
/usr/local/include/serf-1/serf.h
/usr/local/include/serf-1/serf_bucket_types.h
/usr/local/include/serf-1/serf_bucket_util.h
/usr/local/lib/pkgconfig/serf-1.pc

o) compile subversion-1.8.5

$ ./configure --prefix=/usr/local/bin/subversion-1.8.5 
--with-apxs=/usr/local/bin/apache-httpd-2.4.7/bin/apxs --with-jdk 
--enable-javahl --enable-mod-activation --enable-shared --with-openssl 
--with-serf=/usr/local
-output of the config.log is here: http://pastebin.ca/2492975
$ make
-output of the make is here: http://pastebin.ca/2492985
$ sudo make install


After a successful compile and install of all projects.

$ /usr/local/bin/subversion-1.8.5/bin/svn
/usr/local/bin/subversion-1.8.5/bin/svn: error while loading shared 
libraries: libserf-1.so.1: cannot open shared object file: No such file 
or directory




Re: subversion hardcoded to look for libserf-1.so.1 when a newer libserf is available

Posted by Philip Martin <ph...@wandisco.com>.
"bzb.dev001" <bz...@gmail.com> writes:

> Since there is not problem with the permissions.  That means that
> subversion is looking elsewhere for libserf-1.so.1

The serf dependency is part of libsvn_ra_serf, you can see it using

$ objdump -x libsvn_ra_serf-1.so | grep NEEDED.*serf
  NEEDED               libserf-1.so.1

The tarball libtool might also add that dependency to the svn
executable.

You can see the RPATH in svn or libsvn_ra_serf-1.so using

$ objdump -x svn | grep RPATH
  RPATH                /usr/local/serf/lib:/usr/local/subversion/lib

You can see the search as carried out by the linker using

$ LD_DEBUG=libs svn 2>&1 | grep -A1 libserf
     19995:	find library=libserf-1.so.1 [0]; searching
     19995:	 search path=/usr/local/subversion/lib:/usr/local/serf/lib	(RPATH from file svn)
     19995:	  trying file=/usr/local/subversion/lib/libserf-1.so.1
     19995:	  trying file=/usr/local/serf/lib/libserf-1.so.1

I see I had to add an extra RPATH to svn and libsvn_ra_serf by
configuring Subversion with

 ./configure LDFLAGS=-Wl,-rpath,/usr/local/serf/lib

but I install serf in an non-standard place.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Re: subversion hardcoded to look for libserf-1.so.1 when a newer libserf is available

Posted by "bzb.dev001" <bz...@gmail.com>.
On 13-12-05 04:06 PM, Philip Martin wrote:
> "bzb.dev001" <bz...@gmail.com> writes:
>
>> o) compile serf-1.3.2
>>
>> $ scons APR=/usr/local/bin/apache-apr-1.5.0 APU=/usr/local/bin/apache-apr-util-1.5.3
>> $ sudo scons install
>>
>> Details of the output are here: http://pastebin.ca/2492961
>>
>> The resulting serf headers and libraries are installed here:
>>
>> /usr/local/lib/libserf-1.a
>> /usr/local/lib/libserf-1.so.1.3.0
>> /usr/local/include/serf-1/serf.h
>> /usr/local/include/serf-1/serf_bucket_types.h
>> /usr/local/include/serf-1/serf_bucket_util.h
>> /usr/local/lib/pkgconfig/serf-1.pc
> That looks like a serf problem, there should be symlinks
>
>   libserf-1.so -> libserf-1.so.1.3.0
>   libserf-1.so.1 -> libserf-1.so.1.3.0
>

The serf installation does contain your specified symlinks. This is what 
I have in my directory listing at /usr/local/lib.  Since there is not 
problem with the permissions.  That means that subversion is looking 
elsewhere for libserf-1.so.1

# l
total 1.3M
drwxr-xr-x 2 root root  4.0K Dec  5 14:05 pkgconfig/
drwxrwsr-x 4 root staff 4.0K Oct  2 12:07 python2.7/
drwxr-xr-x 3 root root  4.0K Dec  5 09:54 scons-2.3.0/
drwxr-xr-x 3 root root  4.0K Nov 28 02:02 site_ruby/
-rw-r--r-- 1 root root  803K Dec  5 14:04 libserf-1.a
lrwxrwxrwx 1 root root    18 Dec  5 14:05 libserf-1.so -> 
libserf-1.so.1.3.0*
lrwxrwxrwx 1 root root    18 Dec  5 14:05 libserf-1.so.1 -> 
libserf-1.so.1.3.0*
-rwxr-xr-x 1 root root  451K Dec  5 14:05 libserf-1.so.1.3.0*




Re: subversion hardcoded to look for libserf-1.so.1 when a newer libserf is available

Posted by Philip Martin <ph...@wandisco.com>.
"bzb.dev001" <bz...@gmail.com> writes:

> o) compile serf-1.3.2
>
> $ scons APR=/usr/local/bin/apache-apr-1.5.0 APU=/usr/local/bin/apache-apr-util-1.5.3
> $ sudo scons install
>
> Details of the output are here: http://pastebin.ca/2492961
>
> The resulting serf headers and libraries are installed here:
>
> /usr/local/lib/libserf-1.a
> /usr/local/lib/libserf-1.so.1.3.0
> /usr/local/include/serf-1/serf.h
> /usr/local/include/serf-1/serf_bucket_types.h
> /usr/local/include/serf-1/serf_bucket_util.h
> /usr/local/lib/pkgconfig/serf-1.pc

That looks like a serf problem, there should be symlinks

 libserf-1.so -> libserf-1.so.1.3.0
 libserf-1.so.1 -> libserf-1.so.1.3.0

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*