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

Re: lt-svnversion consistenly linked against wrong libs (was: Re: svnversion_tests.py: lt-svnversion uses wrong libraries)

From: Erik Hülsmann <e.huelsmann_at_gmx.net>
Date: 2003-08-11 20:47:11 CEST
('binary' encoding is not supported, stored as-is) >Erik Hülsmann <e.huelsmann@gmx.net> writes:
>
>> The problem:
>> the program subversion/svnversion/.libs/lt-svnversion is linked against (some - not all) libsvn_* libraries in the /usr/local/lib directory instead of the ones in the build tree.
>>
>> The following output demonstrates the problem I describe:
>>
>> After building (using 'make') and executing 'subversion/svnversion/svnversion' (to let libtool do its job), I get the following output when running:
>>
>> $ ldd subversion/svnversion/.libs/lt-svnversion | grep -v '.libs/' | grep 'libsvn_'
>> libsvn_ra_svn-1.so.0 => /usr/local/lib/libsvn_ra_svn-1.so.0 (0x402fd000)
>> libsvn_delta-1.so.0 => /usr/local/lib/libsvn_delta-1.so.0 (0x40306000)
>> libsvn_diff-1.so.0 => /usr/local/lib/libsvn_diff-1.so.0 (0x4030d000)
>> libsvn_subr-1.so.0 => /usr/local/lib/libsvn_subr-1.so.0 (0x40312000)
>>
>> This problem only occurs to svnversion; not to any of the other svn programs in the tree.
>Try running
>
>LD_DEBUG=libs subversion/svnversion/svnversion
>
>to get some debug output from the shared library loader.

The information from the shared library loader indicates the effects
to be expected from the output of the objdump command below.

>Examining the RPATH embedded in the executable and the libraries may
>help, use objdump:
>
>objdump -x subversion/svnversion/.libs/lt-svnversion | grep RPATH
>objdump -x subversion/libsvn_client/.libs/libsvn_client-1.so | grep RPATH

the output of the objdump command is given below (actual output is one line!)

 # objdump -x subversion/svnversion/.libs/lt-svnversion | grep RPATH
 RPATH /home/erik/svn/subversion/libsvn_client/.libs:
/home/erik/svn/subversion/libsvn_wc/.libs:
/home/erik/svn/subversion/libsvn_ra/.libs:
/home/erik/svn/subversion/libsvn_ra_local/.libs:
/home/erik/svn/subversion/libsvn_repos/.libs:
/home/erik/svn/subversion/libsvn_fs/.libs:
/home/erik/svn/subversion/libsvn_ra_dav/.libs:
/home/erik/svn/neon/src/.libs:
/usr/local/lib:
/home/erik/svn/subversion/libsvn_ra_svn/.libs:
/home/erik/svn/subversion/libsvn_diff/.libs:
/home/erik/svn/subversion/libsvn_delta/.libs:
/home/erik/svn/subversion/libsvn_subr/.libs:
/home/erik/svn/apr-util/.libs:
/home/erik/svn/apr/.libs:
/usr/local/apr/lib

To see if the libtool command also contains the /usr/local/lib in the middle
of the list of libsvn_* libraries, I executed the command:

 # make LTFLAGS=

which gave as output (3 lines actual output):

cd subversion/svnversion && /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 ../../subversion/libsvn_ra_svn/libsvn_ra_svn-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_diff/libsvn_diff-1.la ../../subversion/libsvn_subr/libsvn_subr-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
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_diff/.libs/libsvn_diff-1.so ../../subversion/libsvn_ra_svn/.libs/libsvn_ra_svn-1.so /home/erik/svn/subversion/libsvn_delta/.libs/libsvn_delta-1.so ../../subversion/libsvn_delta/.libs/libsvn_delta-1.so ../../subversion/libsvn_diff/.libs/libsvn_diff-1.so /home/erik/svn/subversion/libsvn_subr
 /.libs/libsvn_subr-1.so ../../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/libapr-0.so -lrt -lm -lcrypt -lnsl -ldl -lz -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/apr/lib
creating svnversion

I have no idea what the output from libtool means with respect to resolving this problem though.

I figure this is a problem within the link stage of the program, maybe with the arguments from libtool for gcc?

Philip, do you know what my next step could be?

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 11 20:48: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.