Subject: | B::OPCheck build on perl 5.8.8 on linux fails |
Unable to build on Linux using perl 5.8.8.
Running make for F/FL/FLORA/B-OPCheck-0.29.tar.gz
Prepending
/home/portfolio/.cpan/build/ExtUtils-Depends-0.302-QU60ku/blib/arch
/home/portfolio/.cpan/build/ExtUtils-Depends-0.302-QU60ku/blib/lib to
PERL5LIB for 'get'
Prepending
/home/portfolio/.cpan/build/ExtUtils-Depends-0.302-QU60ku/blib/arch
/home/portfolio/.cpan/build/ExtUtils-Depends-0.302-QU60ku/blib/lib to
PERL5LIB for 'make'
CPAN.pm: Going to build F/FL/FLORA/B-OPCheck-0.29.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for B::OPCheck
cp lib/B/OPCheck.pm blib/lib/B/OPCheck.pm
/usr/bin/perl "-Iinc" /home/portfolio/perl5/lib/perl5/ExtUtils/xsubpp
-typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap
/home/portfolio/perl5/lib/perl5/i486-linux-gnu-thread-multi/B/Utils/Install/typemap
OPCheck.xs > OPCheck.xsc && mv OPCheck.xsc OPCheck.c
cc -c
-I/home/portfolio/perl5/lib/perl5/i486-linux-gnu-thread-multi/B/Utils/Install
-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.29\" -DXS_VERSION=\"0.29\"
-fPIC "-I/usr/lib/perl/5.8/CORE" OPCheck.c
OPCheck.xs:16: error: redefinition of typedef ‘Perl_check_t’
ppport.h:3976: error: previous declaration of ‘Perl_check_t’ was here
make: *** [OPCheck.o] Error 1
I changed the check for the typedef in OPCheck.xs from this:
#if PERL_VERSION < 9
typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
#endif
to this:
#if PERL_VERSION < 8
typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
#endif
Then it installed and the tests worked.
I asked on #devel-declare for a solution and vincent suggested that
maybe that piece of code (the #if/#endif) should be removed because
you're code is now importing ppport.h (which contains the OP* typedef).
I'm not sure if this is the solution, but removing the definition made
everything work (tests pass etc.).