RE: Build problems for XML::Xerces on FreeBSD

"Patrick Kuijvenhoven" <[email protected]>
Newsgroups gmane.text.xml.xerces-p.devel
Message-ID <4905BC209B569E44BB1D73141D0A372708B7AF@horta.office.kabelfoon.intern>
Hi,

I hope i do not annoy this list, but here is some more compiling output:

su-2.05b# gmake (I am using gmake here because the 'make -C Handler static' fails ('make: illegal option -- C')).
cp Xerces.pm blib/lib/XML/Xerces.pm
gmake -C Handler static
gmake[1]: Entering directory `/usr/local/src/XML-Xerces-2.3.0-3/Handler'
c++ -c  -I. -IHandler -I/usr/local/include/ -pipe -DNONEXPORTABLE_CRYPT -w -DXML_USE_LIBICONV -I/usr/local/include -DXML_USE_INMEM_MESSAGELOADER -D_THREAD_SAFE -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET -D_REENTRANT -O   -DVERSION=\"\" -DXS_VERSION=\"\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.1/mach/CORE"   PerlCallbackHandler.cpp
c++ -c  -I. -IHandler -I/usr/local/include/ -pipe -DNONEXPORTABLE_CRYPT -w -DXML_USE_LIBICONV -I/usr/local/include -DXML_USE_INMEM_MESSAGELOADER -D_THREAD_SAFE -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET -D_REENTRANT -O   -DVERSION=\"\" -DXS_VERSION=\"\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.1/mach/CORE"   PerlContentCallbackHandler.cpp
In file included from PerlContentCallbackHandler.cpp:2:
PerlContentCallbackHandler.hpp:10: syntax error before `:'
gmake[1]: *** [PerlContentCallbackHandler.o] Error 1
gmake[1]: Leaving directory `/usr/local/src/XML-Xerces-2.3.0-3/Handler'
gmake: *** [blib/arch/auto/Handler/Handler.a] Error 2

Unfortunatly, with adding -DXML_GCC (manually) the same error occurs.

Both Xerces-c as Xerces-p are compiled with the same version. Xerces-c uses 'cc', Xerces-p uses 'c++'.

I commented out the macro (as you told me to), but still the same error occurs. g++33 seems to be more verbose (and seems to parse the c++ even further though an error occured).

In file included from PerlDocumentCallbackHandler.cpp:2:
PerlDocumentCallbackHandler.hpp:10: error: syntax error before `:' token
PerlDocumentCallbackHandler.hpp:20: error: ISO C++ forbids declaration of `
   PerlDocumentCallbackHandler' with no type
PerlDocumentCallbackHandler.hpp:21: error: destructors must be member functions
PerlDocumentCallbackHandler.hpp:40: error: parse error before `}' token
PerlDocumentCallbackHandler.cpp:4: error: syntax error before `::' token
<snip>

I hope this can help in solving this problem.

Kind regards,

Patrick Kuijvenhoven, 
R&D Team Kabelfoon 
E: [email protected] 

-----Oorspronkelijk bericht-----
Van: Jason E. Stewart [mailto:[email protected]]
Verzonden: maandag 3 november 2003 17:04
Aan: [email protected]
Onderwerp: Re: Build problems for XML::Xerces on FreeBSD


"Patrick Kuijvenhoven" <[email protected]> writes:

> i need some help with compiling XML::Xerces on FreeBSD 4.7. Relevant
> information is shown below:

It's been quite some time since someone reported on BSD, and we've
automated the build system a lot since then, so it doesn't surprise me
if there's some glitches.

We'll probably need to get the right Xerces flags for OS and compiler.

> Found CXX      = c++

This is probably an issue. Right now I look for g++ to set the
-DXML_GCC flag. Perhaps I should actually run 'c++ --version' and
check the output.

> # c++ -v
> Using builtin specs.
> gcc version 2.95.4 20020320 [FreeBSD]

Is your Xerces-C compiled with 2.95 as well?

> In file included from PerlContentCallbackHandler.cpp:2:
> PerlContentCallbackHandler.hpp:10: syntax error before `:'
> gmake[1]: *** [PerlContentCallbackHandler.o] Error 1
> gmake[1]: Leaving directory `/usr/local/src/XML-Xerces-2.3.0-2/Handler'
> gmake: *** [blib/arch/auto/Handler/Handler.a] Error 2

I'm just guessing, but its probably not understanding the namespace
macro:

  #include "PerlCallbackHandler.hpp"
  #include "xercesc/sax2/ContentHandler.hpp"
  #include "xercesc/util/XMLString.hpp"
  
  XERCES_CPP_NAMESPACE_USE
  
  class PerlContentCallbackHandler  : public ContentHandler
  //				 , public PerlCallbackHandler 
  {

XERCES_CPP_NAMESPACE_USE is defined in the OS/compiler specific bits
of Xerces. Try commenting this out just to see if the compile gets any
further.

> I allready tried to compile the source with g++33 (gcc version 3.3.1
> 20030707 (prerelease) [FreeBSD]), but it still doesn't compile.

Where the errors different?

Cheers,
jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.