Le 5 juillet 2011 04:24:11, Philip Martin a écrit :
> 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.i
> > n subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in
> > ---
> > subversion-1.6.17.ori/subversion/bindings/swig/perl/native/Makefile.PL.i
> > n 2010-11-24 20:42:16.000000000 +0000 +++
> > subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in 20
> > 11-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.
Compilation is not failing. The bindings fail at runtime on i686, but works on
x86_64.
Here are the perl and subversion cflags on i686 :
subversion: -march=i686 -mtune=generic -O2 -pipe -pthread -
D_LARGEFILE64_SOURCE -DNE_LFS
perl: -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
I think the problem may be caused by the absence of -D_FILE_OFFSET_BITS=64 in
the subversion cflags. I do not get the failure in the "make test" if I do
export CFLAGS+=" -D_FILE_OFFSET_BITS=64"
before building subversion.
Regards,
Stéphane
Received on 2011-07-05 21:28:23 CEST