You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2003/08/11 16:22:51 UTC
Re: lt-svnversion consistenly linked against wrong libs (was: Re:
svnversion_tests.py: lt-svnversion uses wrong libraries)
Erik Hülsmann <e....@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.
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
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: lt-svnversion consistenly linked against wrong libs
Posted by Erik Hülsmann <e....@gmx.net>.
>>Erik H�lsmann <e....@gmx.net> writes:
>>
>>> [ snip ]
>>>
>>>>I think the problem is the -L/usr/local/lib that comes before -lssl.
>>>>
>>>>Have a look in the libtool file
>>>> /home/erik/svn/subversion/libsvn_ra_dav/libsvn_ra_dav-1.la
>>>>Is the -L/usr/local/lib there?
>>>
>>> Yes, there is, but libssl.so.2 is located in /lib and libssl.so in
>>> /usr/lib so there is no reason for the command to be there.
>>
>>I don't think it's ssl, I suspect it is the way neon links to libxml,
>>try
>>
>> grep NEON_LIBS Makefile
>>
> # grep NEON_LIBS Makefile
>NEON_LIBS = $(abs_builddir)/neon/src/libneon.la -L/usr/local/lib -lssl -lcrypto -lz -L/usr/local/lib -lxml2 -lz -lm
>
BTW:
# locate xml2.so
/usr/lib/libxml2.so.2
/usr/lib/libxml2.so.2.4.23
/usr/local/lib/libxml2.so.2.4.23
/usr/local/lib/libxml2.so.2
/usr/local/lib/libxml2.so
So then eliminating /usr/local/lib/libxml2* should eliminate my problems? It would not be my favorate solution though, since the problem in the build script remains.
bye,
Erik.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: lt-svnversion consistenly linked against wrong libs
Posted by Erik Hülsmann <e....@gmx.net>.
Hi Philip!
Thanks for your continued help!
[ snip ]
>> So what now?!
>
>So the problem is that
>
> neon-config --libs
>
>includes -L/usr/local/lib which causes problems for subsequent
>Subversion libraries.
# neon-config --libs
-L/usr/local/lib -lneon -lssl -lcrypto -lz -L/usr/local/lib -lxml2 -lz -lm
So I guess you're right.
>It's odd that svn doesn't have the same problem, I suspect some
>reordering within the the gen-make system. If you edit build.conf and
>compare the [svn] and [svnversion] sections they have different libs
>lines. You could try replacing the svnversion line with that from
>svn, then run ./gen-make.py in the source directory, run config.nice
>in the build directory, make clean and and finally make.
I saw your other post about the $(NEON_LIBS), so I decided to do that.
I think I will be running the above test too, but I am running the rebuild
now and will report back to the list when I come back from work; this evening.
bye,
Erik.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: lt-svnversion consistenly linked against wrong libs
Posted by Philip Martin <ph...@codematters.co.uk>.
Philip Martin <ph...@codematters.co.uk> writes:
> reordering within the the gen-make system. If you edit build.conf and
> compare the [svn] and [svnversion] sections they have different libs
> lines. You could try replacing the svnversion line with that from
> svn, then run ./gen-make.py in the source directory, run config.nice
> in the build directory, make clean and and finally make.
Ooops, no need to rerun configure. Just run ./gen-make.py in the
source directory, make clean and make.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: lt-svnversion consistenly linked against wrong libs
Posted by Philip Martin <ph...@codematters.co.uk>.
Erik Hülsmann <e....@gmx.net> writes:
> # grep NEON_LIBS Makefile
> NEON_LIBS = $(abs_builddir)/neon/src/libneon.la -L/usr/local/lib -lssl -lcrypto -lz -L/usr/local/lib -lxml2 -lz -lm
>
> So what now?!
So the problem is that
neon-config --libs
includes -L/usr/local/lib which causes problems for subsequent
Subversion libraries.
It's odd that svn doesn't have the same problem, I suspect some
reordering within the the gen-make system. If you edit build.conf and
compare the [svn] and [svnversion] sections they have different libs
lines. You could try replacing the svnversion line with that from
svn, then run ./gen-make.py in the source directory, run config.nice
in the build directory, make clean and and finally make.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: lt-svnversion consistenly linked against wrong libs
Posted by Erik Hülsmann <e....@gmx.net>.
>Erik H�lsmann <e....@gmx.net> writes:
>
>> [ snip ]
>>
>>>I think the problem is the -L/usr/local/lib that comes before -lssl.
>>>
>>>Have a look in the libtool file
>>> /home/erik/svn/subversion/libsvn_ra_dav/libsvn_ra_dav-1.la
>>>Is the -L/usr/local/lib there?
>>
>> Yes, there is, but libssl.so.2 is located in /lib and libssl.so in
>> /usr/lib so there is no reason for the command to be there.
>
>I don't think it's ssl, I suspect it is the way neon links to libxml,
>try
>
> grep NEON_LIBS Makefile
>
# grep NEON_LIBS Makefile
NEON_LIBS = $(abs_builddir)/neon/src/libneon.la -L/usr/local/lib -lssl -lcrypto -lz -L/usr/local/lib -lxml2 -lz -lm
So what now?!
bye,
Erik.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: lt-svnversion consistenly linked against wrong libs
Posted by Philip Martin <ph...@codematters.co.uk>.
Erik Hülsmann <e....@gmx.net> writes:
> [ snip ]
>
>>I think the problem is the -L/usr/local/lib that comes before -lssl.
>>
>>Have a look in the libtool file
>> /home/erik/svn/subversion/libsvn_ra_dav/libsvn_ra_dav-1.la
>>Is the -L/usr/local/lib there?
>
> Yes, there is, but libssl.so.2 is located in /lib and libssl.so in
> /usr/lib so there is no reason for the command to be there.
I don't think it's ssl, I suspect it is the way neon links to libxml,
try
grep NEON_LIBS Makefile
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: lt-svnversion consistenly linked against wrong libs (was: Re:
svnversion_tests.py: lt-svnversion uses wrong libraries)
Posted by Erik Hülsmann <e....@gmx.net>.
[ snip ]
>I think the problem is the -L/usr/local/lib that comes before -lssl.
>
>Have a look in the libtool file
> /home/erik/svn/subversion/libsvn_ra_dav/libsvn_ra_dav-1.la
>Is the -L/usr/local/lib there?
Yes, there is, but libssl.so.2 is located in /lib and libssl.so in
/usr/lib so there is no reason for the command to be there. How
do I make sure that the -L/usr/local/lib does not appear in that
file anymore!?
bye,
Erik.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: lt-svnversion consistenly linked against wrong libs (was: Re:
svnversion_tests.py: lt-svnversion uses wrong libraries)
Posted by Philip Martin <ph...@codematters.co.uk>.
Erik Hülsmann <e....@gmx.net> writes:
> 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 think the problem is the -L/usr/local/lib that comes before -lssl.
Have a look in the libtool file
/home/erik/svn/subversion/libsvn_ra_dav/libsvn_ra_dav-1.la
Is the -L/usr/local/lib there?
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: lt-svnversion consistenly linked against wrong libs (was: Re:
svnversion_tests.py: lt-svnversion uses wrong libraries)
Posted by Erik Hülsmann <e....@gmx.net>.
>Erik H�lsmann <e....@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