Skip Menu |

This queue is for tickets about the XML-Xerces CPAN distribution.

Report information
The Basics
Id: 40956
Status: open
Priority: 0/
Queue: XML-Xerces

People
Owner: jasons [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.7.0-0
Fixed in: (no value)



Subject: Does not build with perl5.8.9RC1 (problem with XS macro?)
XML-Xerces does not build anymore with recent perls, e.g. perl 5.8.9. The error output when doing make looks like this: cc -c -I. -IHandler -I/usr/local/include -D_REENTRANT -O -DVERSION=\"2.7.0-0\" -DXS_VERSION=\"2.7.0-0\" -DPIC -fPIC "-I/usr/perl5.8.9@RC1/lib/5.8.9/i386-freebsd/CORE" Xerces.cpp Xerces.cpp:1219: error: expected unqualified-id before string constant Xerces.cpp:1219: error: expected `,' or `;' before string constant Xerces.cpp:1220: error: expected init-declarator before '*' token Xerces.cpp:1220: error: expected `,' or `;' before '*' token Xerces.cpp:1225: error: `SwigPerlWrapperPtr' does not name a type It is very probable that the following change in Perl is causing this failure, and it is also proposing a solution: [ 31697] SWIG uses XS() like this (in the perlrun.swg template): typedef XS(SwigPerlWrapper); typedef SwigPerlWrapper *SwigPerlWrapperPtr; This breaks if XS() includes the 'extern "C"' decoration under C++. The appended patch provides an XSPROTO() macro that could be used by SWIG instead. (Patch from Jan Dubois to fix breakage caused by #28734.) Regards, Slaven
On Sat Nov 15 05:46:29 2008, SREZIC wrote: Show quoted text
> XML-Xerces does not build anymore with recent perls, e.g. perl 5.8.9. > The error output when doing make looks like this: > > cc -c -I. -IHandler -I/usr/local/include -D_REENTRANT -O > -DVERSION=\"2.7.0-0\" -DXS_VERSION=\"2.7.0-0\" -DPIC -fPIC > "-I/usr/perl5.8.9@RC1/lib/5.8.9/i386-freebsd/CORE" Xerces.cpp > Xerces.cpp:1219: error: expected unqualified-id before string constant > Xerces.cpp:1219: error: expected `,' or `;' before string constant > Xerces.cpp:1220: error: expected init-declarator before '*' token > Xerces.cpp:1220: error: expected `,' or `;' before '*' token > Xerces.cpp:1225: error: `SwigPerlWrapperPtr' does not name a type > > It is very probable that the following change in Perl is causing this > failure, and it is also proposing a solution: > > [ 31697] > SWIG uses XS() like this (in the perlrun.swg template): > > typedef XS(SwigPerlWrapper); > typedef SwigPerlWrapper *SwigPerlWrapperPtr; > > This breaks if XS() includes the 'extern "C"' decoration under C++. > The appended patch provides an XSPROTO() macro that could be used > by SWIG instead. > > (Patch from Jan Dubois to fix breakage caused by #28734.) >
This problem was also already discussed at perl5-porters: http://groups.google.com/group/perl.perl5.porters/browse_thread/thread/21616e82d46f7999# Regards, Slaven
This is a problem with SWIG. Currently the patch by Jan Dubois will only work for people who regenerate the C++ files using swig. If I have perl 5.8.4 on my computer swig generates C++ files that use XS() and *not* XSPROTO(). The short work-around is to install swig 1.3.36 and regenerate the C++ files for XML-Xerces. I'm waiting for a better patch from the SWIG team.