Stéphane Gaudreault <stephane_at_archlinux.org> writes:
> Here is a patch that fix compilation of the perl bindings on i686 :
Is the compilation failing? I think the compilation works, the problem
is the bindings fail at runtime.
> https://bugs.archlinux.org/task/24540
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628507
>
> This problem was also discussed on the user mailing list.
>
> diff -Naur subversion-1.6.17.ori/subversion/bindings/swig/perl/native/Makefile.PL.in subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in
> --- subversion-1.6.17.ori/subversion/bindings/swig/perl/native/Makefile.PL.in 2010-11-24 20:42:16.000000000 +0000
> +++ subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in 2011-07-01 20:16:16.520892074 +0000
> @@ -43,7 +43,7 @@
> my %config = (
> ABSTRACT => 'Perl bindings for Subversion',
> DEFINE => $cppflags,
> - CCFLAGS => $cflags,
> + CCFLAGS => $Config{ccflags},
> INC => join(' ',$apr_cflags, $apu_cflags,
> " -I$swig_srcdir/perl/libsvn_swig_perl",
> " -I$svnlib_srcdir/include",
>
The problem appears to be that Subversion's Perl extension and Perl
itself are compiled using incompatible compiler flags, and this causes a
problem at runtime. Let's see if we can confirm that first. What are
the values of $cflags and $Config{ccflags)? Add something like:
print "subversion: $cflags \n";
print "perl: $Config{ccflags} \n";
to Makefile.PL and run 'make swig-pl'.
Your solution is to compile the extension using Perl's compiler flags
rather than Subversion's flags. That will fix any incompatibility
between Perl and the extension. What worries me is that it may just
move the problem to boundary with Subversion itself. The C code in
subversion/bindings/swig/perl/native will be compiled with the Perl
compiler flags and so any incompatibility is still present in the calls
into the Subversion libraries.
It might be better to rebuild Subversion using flags that are compatible
with Perl.
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2011-07-05 10:25:10 CEST