You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mathias Weinert <ma...@gfa-net.de> on 2005/10/20 10:50:52 UTC

[BUG] Linker error while building perl bindings

I just fetched the sources from branches/1.3.x (revision 16850) and
tried to build subversion including the perl bindings under cygwin.
With subversion itself everything was okay but I was not able
to build the perl bindings. Instead I got the following linker error:

Creating library file: lib_Core.dll.a
core.o(.text+0x1589f): In function `_wrap_svn_prop_dup':
/d/Subversion/subversion-trunk/subversion/bindings/swig/perl/native/core.c:4429: undefined reference to `_svn_prop_dup'
core.o(.text+0x15c0f): In function `_wrap_svn_prop_array_dup':
/d/Subversion/subversion-trunk/subversion/bindings/swig/perl/native/core.c:4469: undefined reference to `_svn_prop_array_dup'
collect2: ld returned 1 exit status
perlld: *** system() failed to execute

The cause of this was, that the linker got -L/usr/local/lib as one of its
first options and so it found an older version of the svn_subr-1 library
there.

In my opinion this is a bug because with this I would have to remove the
libraries I am currently using before I could build any new version.

In order to avoid this I did the following patch of
subversion/bindings/swig/perl/native/Makefile.PL.in but I am not sure if
this makes sense (although it worked for me). So if you find any better
solution please tell me (and commit it).

Mathias

--- subversion/bindings/swig/perl/native/Makefile.PL.in.orig	2005-10-20 10:47:10.000000000 +0200
+++ subversion/bindings/swig/perl/native/Makefile.PL.in	2005-10-20 12:26:31.966167900 +0200
@@ -47,6 +47,7 @@
                   (map {$_ = abs_path($_); "-L$_"} @ldpaths),
                   @ldmodules, '-lsvn_swig_perl-1',
                   `$swig -perl -ldflags`)],
+    LDDLFLAGS => ' ',
     test => { TESTS => "$swig_srcdir/perl/native/t/*.t" }
 );

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [BUG] Linker error while building perl bindings

Posted by Marcus Rueckert <da...@web.de>.
On 2005-10-20 13:34:55 +0200, Peter N. Lundblad wrote:
> Is this new for 1.3? In that case, should it be added to the release
> notes?

no. that is a pretty old issue.

darix

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [BUG] Linker error while building perl bindings

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Thu, 20 Oct 2005, John Peacock wrote:

> Mathias Weinert wrote:
> > The cause of this was, that the linker got -L/usr/local/lib as one of its
> > first options and so it found an older version of the svn_subr-1 library
> > there.
>
> This is a known problem.  Max had checked in a solution which unfortunately left
> the Perl bindings in a state where they were explicitely linked to the build

Is this new for 1.3? In that case, should it be added to the release
notes?

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [BUG] Linker error while building perl bindings

Posted by John Peacock <jp...@rowman.com>.
Mathias Weinert wrote:
> The cause of this was, that the linker got -L/usr/local/lib as one of its
> first options and so it found an older version of the svn_subr-1 library
> there.

This is a known problem.  Max had checked in a solution which unfortunately left
the Perl bindings in a state where they were explicitely linked to the build
directory (and would fail when you blew that away).  So that was reverted.  Your
solution works for you, but it isn't the right way long term (since it would
prevent linking against other installed libraries which we need).  The short
answer is that, for now, you must install the new Subversion libraries before
attempting to build the Perl bindings.

Once 1.3.0 is out, I plan on taking a good long look at how the Perl bindings
are constructed and try and rework the Makefile.PL.  I think if we use an
appropriate LD_LIBRARY_PATH instead of LD_RUN_PATH, we can get where we are
going (linking against the new libraries for testing but loading the system
libraries for running).

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org