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

Re: svnversion_tests.py: lt-svnversion uses wrong libraries

From: Erik Hülsmann <e.huelsmann_at_gmx.net>
Date: 2003-08-08 16:31:07 CEST
('binary' encoding is not supported, stored as-is) Hi Philip,

>Erik Hülsmann <e.huelsmann@gmx.net> writes:
>
>> I have a problem running the svnversion tests. In a previous thread
>> I was able to figure out what the problem was thanks to help from
>> Philip Martin. As it turns out the lt-subversion library in
>> subversion/svnversion/.libs/ uses the wrong version for
>> libsvn_subr.so. Instead of using the one in the build tree, it uses
>> the one already installed on my system.
>>
>> To cure the problem, I ran the complete build cycle again after
>> running make clean and make check-clean, but nothing seems to
>> help. Where should I start looking to solve this problem?
>
>This problem gets reported from time to time. It's never happened on
>any of my machines and I don't really know what causes it. I suspect
>a libtool bug, but you haven't mentioned any versions, or even what OS
>you are using.

Sorry about that. I will try to be more elaborate this time.

I'm using:
- RedHat Linux 8.0.
- libtool --version reports:
    ltmain.sh (GNU libtool) 1.4.2 (1.922.2.54 2001/09/11 03:33:37)

>Which libraries are wrongly located?

These libraries where wronly located in lt-svnversion:
libsvn_ra_svn-1.so.0 => /usr/local/lib/libsvn_ra_svn-1.so.0
libsvn_delta-1.so.0 => /usr/local/lib/libsvn_delta-1.so.0
libsvn_diff-1.so.0 => /usr/local/lib/libsvn_diff-1.so.0
libsvn_subr-1.so.0 => /usr/local/lib/libsvn_subr-1.so.0

meaning that
libsvn_client-1.so.0
libsvn_wc-1.so.0
libsvn_ra-1.so.0
libsvn_ra_local-1.so.0
libsvn_repos-1.so.0
libsvn_fs-1.so.0
libsvn_ra_dav-1.so.0
libneon.so.23
libaprutil-0.so.0
libapr-0.so.0
in lt-svnversion all point into the build tree.

the libraries in lt-svn (from the command line client) all point into
the build tree, which corresponds with the fact that only svnversion
is failing the testsuite.

>Does the problem only affect svnversion, or does it affect the other
>binaries such as subversion/clients/cmdline/.libs/lt-svn?

>If it affects other binaries, is it always the same libraries?
No, no other binaries are affected.

>Do this to see the link command:
>
>$ rm subversion/svnversion/svnversion
>$ make

>then repeat the link command at the command prompt but remove the
>--silent option, this will cause libtool to print the link command it
>uses. Does that command treat the libraries that are correctly
>located differently from those that are not?
Did that. libsvn_client, libaprutil and libapr are mentioned explicitly
on the command line. other libraries are passed using the gcc -l option
(like -lz and -ldb-4.0)

The link command is:
/bin/sh /home/erik/svn/libtool --mode=link gcc -O2 -pipe -pthread -DNEON_ZLIB -DNEON_SSL -rpath /usr/local/lib -o svnversion main.o ../../subversion/libsvn_client/libsvn_client-1.la /home/erik/svn/apr-util/libaprutil-0.la -lgdbm -ldb-4.0 -lexpat /home/erik/svn/apr/libapr-0.la -lrt -lm -lcrypt -lnsl -ldl -lz

Which results in the following gcc command:
gcc -O2 -pipe -pthread -DNEON_ZLIB -DNEON_SSL -o .libs/svnversion main.o ../../subversion/libsvn_client/.libs/libsvn_client-1.so /home/erik/svn/subversion/libsvn_wc/.libs/libsvn_wc-1.so /home/erik/svn/subversion/libsvn_ra/.libs/libsvn_ra-1.so /home/erik/svn/subversion/libsvn_ra_local/.libs/libsvn_ra_local-1.so /home/erik/svn/subversion/libsvn_repos/.libs/libsvn_repos-1.so /home/erik/svn/subversion/libsvn_fs/.libs/libsvn_fs-1.so -ldb /home/erik/svn/subversion/libsvn_ra_dav/.libs/libsvn_ra_dav-1.so /home/erik/svn/neon/src/.libs/libneon.so -L/usr/local/lib -lssl -lcrypto /usr/local/lib/libxml2.so /home/erik/svn/subversion/libsvn_ra_svn/.libs/libsvn_ra_svn-1.so /home/erik/svn/subversion/libsvn_delta/.libs/libsvn_delta-1.so /home/erik/svn/subversion/libsvn_diff/.libs/libsvn_diff-1.so /home/erik/svn/subversion/libsvn_subr/.libs/libsvn_subr-1.so /home/erik/svn/apr-util/.libs/libaprutil-0.so /usr/lib/libgdbm.so /usr/lib/libdb-4.0.so /usr/lib/libexpat.so /home/erik/svn/apr/.libs/liba
 pr-0.so -lrt -lm -lcrypt -lnsl -ldl -lz -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/apr/lib
creating svnversion

>What about the link command for other binaries? How do they treat the
>libraries that are not correctly located?
The client command explicitly mentions libsvn_subr and libsvn_delta, but
does not explicitly mention libsvn_diff or libsvn_ra_svn.

After running the make command *all* libraries point to /usr/local and
the contents of the .libs directory is empty.
When I have run
  make check CLEANUP=1 TESTS=subversion/tests/clients/cmdline/svnversion_tests.py

the .libs directories is not empty anymore and the ldd command says that libraries
are linked agains the versions in my build tree again. I tried to find where
this happens, but I didn't find any call to libtool to relocate links or so...

Do you know where I can find the relocation call where libtool is instructed to
use other libraries?!

bye,

Erik.

PS: I hope I was more verbose and thus more helpful this time.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 8 16:32:01 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.