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

Fwd: Linking issues for subversion Perl bindings when using --prefix

From: Paddy Newman <paddynewman_at_gmail.com>
Date: 2005-12-18 12:47:45 CET

I'm not subscribed to the list so please CC me if you reply to this
email.

Begin forwarded message:

> From: Paddy Newman <paddynewman@gmail.com>
> Date: 10 November 2005 11:36:35 GMT
> To: Chia-liang Kao <clkao@clkao.org>
> Subject: Linking issues for subversion Perl bindings when using --
> prefix
>
> Hello,
>
> I'm having trouble with the Subversion Perl bindings. It looks like
> the so's are being linked against libraries in the subversion build
> directory and not in the subversion install directory.
>
> I'm not very knowlegable with C so I will just detail what I did to
> get the error:
>
> - Download perl (perl-5.8.7) and untar it to perl-5.8.7 and cd to it
> $ sh Configure -Dprefix=/opt/dap/newmpad/perl -des
> $ make
> $ make test
> $ make install
> $ export PATH=/opt/dap/newmpad/perl/bin:$PATH
>
> - Download swig (swig-1.3.27) and untar it to swig-1.3.27 and cd to it
> $ ./configure --prefix=/opt/dap/newmpad/swig
> $ make
> $ make install
>
> - Download subverion (subversion-1.2.3) and untar it subversion-1.2.3
> and cd to it
> $ ./configure --prefix=/opt/dap/newmpad/subversion \
> --with-swig=/opt/dap/newmpad/swig
> $ make
> $ make install
> $ make swig-pl
> $ make check-swig-pl
> $ make install-swig-pl
>
> Now, when I run: perl -MSVN::Core -e0 everything is fine.
> Then I move subversion-1.2.3 to subversion-1.2.3.bkp
> And now, when I run: perl -MSVN::Core -e0 I get the following message:
>
> Can't load '/opt/dap/newmpad/perl/lib/site_perl/5.8.7/i686-linux/
> auto/SVN/_Core/_Core.so'
> for module SVN::_Core: libsvn_client-1.so.0: cannot open shared object
> file: No such file or directory at
> /opt/dap/newmpad/perl/lib/5.8.7/i686-linux/DynaLoader.pm line 230.
> at /opt/dap/newmpad/perl/lib/site_perl/5.8.7/i686-linux/SVN/
> Base.pm line 59
> BEGIN failed--compilation aborted at
> /opt/dap/newmpad/perl/lib/site_perl/5.8.7/i686-linux/SVN/Core.pm line
> 5.
> Compilation failed in require.
> BEGIN failed--compilation aborted.
>
> If I run: ldd /opt/dap/newmpad/perl/lib/site_perl/5.8.7/i686-linux/
> auto/SVN/_Core/_Core.so
> I get the following:
>
> libsvn_client-1.so.0 => not found
> libsvn_delta-1.so.0 => not found
> libsvn_fs-1.so.0 => not found
> libsvn_ra-1.so.0 => not found
> libsvn_repos-1.so.0 => not found
> libsvn_wc-1.so.0 => not found
> libsvn_diff-1.so.0 => not found
> libsvn_subr-1.so.0 => not found
> libsvn_swig_perl-1.so.0 => not found
> libc.so.6 => /lib/i686/libc.so.6 (0x4004d000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>
> If I move subversion-1.2.3.bkp back to subversion1.2.3 then perl
> -MSVN::Core -e0 works and ldd shows the following:
>
> ldd /opt/dap/newmpad/perl/lib/site_perl/5.8.7/i686-linux/auto/SVN/
> _Core/_Core.so
> libsvn_client-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_client/.libs/libsvn_client-1.so.0
> (0x40043000)
> libsvn_delta-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_delta/.libs/libsvn_delta-1.so.0
> (0x40064000)
> libsvn_fs-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_fs/.libs/libsvn_fs-1.so.0
> (0x4006c000)
> libsvn_ra-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_ra/.libs/libsvn_ra-1.so.0
> (0x40071000)
> libsvn_repos-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_repos/.libs/libsvn_repos-1.so.0
> (0x40076000)
> libsvn_wc-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_wc/.libs/libsvn_wc-1.so.0
> (0x40090000)
> libsvn_diff-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_diff/.libs/libsvn_diff-1.so.0
> (0x400b3000)
> libsvn_subr-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_subr/.libs/libsvn_subr-1.so.0
> (0x400b9000)
> libsvn_swig_perl-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> bindings/swig/perl/libsvn_swig_perl/.libs/libsvn_swig_perl-1.so.0
> (0x400dd000)
> libc.so.6 => /lib/i686/libc.so.6 (0x400ee000)
> libaprutil-0.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/apr-util/.libs/
> libaprutil-0.so.0
> (0x4020d000)
> libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40222000)
> libdb-4.0.so => /usr/lib/libdb-4.0.so (0x40229000)
> libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402cf000)
> libapr-0.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/apr/.libs/
> libapr-0.so.0
> (0x402ef000)
> librt.so.1 => /lib/librt.so.1 (0x40310000)
> libm.so.6 => /lib/i686/libm.so.6 (0x40321000)
> libcrypt.so.1 => /lib/libcrypt.so.1 (0x40344000)
> libnsl.so.1 => /lib/libnsl.so.1 (0x40375000)
> libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4038a000)
> libdl.so.2 => /lib/libdl.so.2 (0x4039e000)
> libsvn_fs_fs-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_fs_fs/.libs/libsvn_fs_fs-1.so.0
> (0x403a2000)
> libsvn_fs_base-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_fs_base/.libs/libsvn_fs_base-1.so.0
> (0x403ba000)
> libsvn_ra_local-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_ra_local/.libs/libsvn_ra_local-1.so.0
> (0x403dc000)
> libsvn_ra_svn-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_ra_svn/.libs/libsvn_ra_svn-1.so.0
> (0x403e2000)
> libsvn_ra_dav-1.so.0 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/subversion/
> libsvn_ra_dav/.libs/libsvn_ra_dav-1.so.0
> (0x403f2000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> libneon.so.24 =>
> /home/newmpad/tmp/svnweb-build/tmp/subversion-1.2.3/neon/src/.libs/
> libneon.so.24
> (0x40408000)
> libz.so.1 => /lib/libz.so.1 (0x4041f000)
>
> my LD_LIBRARY_PATH contains:
> /opt/relicore/emx/agent/4.0/bin/Linux_2.4-i686 and nothing else.
>
> I think the problem may be in the Makefile.PL in
> subversion-1.2.3/subversion/bindings/swig/perl/native/Makefile.PL and
> with these lines:
>
> ...
> my $top_builddir = '../../../../../';
> ...
> my $svnlib_builddir = "${top_builddir}/subversion";
> ...
> my $swig_builddir = "${svnlib_builddir}/bindings/swig";
> ...
> my @ldpaths = ("$swig_builddir/perl/libsvn_swig_perl/.libs", ...
>
> I think it should be using the value passed to --prefix= when
> subversion is configured to locate the correct libraries to link
> against.
>
> There are swig values in this Makefile.PL so maybe there is a way take
> in the subversion install prefix as well and use that?
>
> I hope this is of interest to you.
>
> Thanks for you time,
>
> Paddy Newman

A diff which fixed the problem for me:

--- Makefile.PL.in 2005-03-22 09:31:58.000000000 +0000
+++ Makefile.PL.in.new 2005-11-10 12:55:10.000000000 +0000
@@ -15,17 +15,14 @@
my $swig_srcdir = "${svnlib_srcdir}/bindings/swig";
my $swig_builddir = "${svnlib_builddir}/bindings/swig";
+my $svn_isntall_prefix = '@prefix@';
+my $svn_library_path = $svn_isntall_prefix . "/lib";
+
my $swig_version = @SWIG_VERSION@;
my $swig = '@SWIG@';
my @modules = qw/client delta fs ra repos wc/;
-my @ldpaths = ("$swig_builddir/perl/libsvn_swig_perl/.libs",
- map {"$svnlib_builddir/libsvn_$_/.libs"} (@modules,
qw/diff subr
- r
a_local
- r
a_svn
- r
a_dav
- f
s_base
- f
s_fs/));
+my @ldpaths = ("$swig_builddir/perl/libsvn_swig_perl/.libs",
$svn_library_path);
my @ldmodules = map {"-lsvn_$_-1"} (@modules, qw/diff subr/);
my $apr_shlib_path_var = '@SVN_APR_SHLIB_PATH_VAR@';

-paddy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Dec 18 13:37:44 2005

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