You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Thomas F. O'Connell" <tf...@netcentral.com> on 2003/09/25 23:48:25 UTC

Xalan C++ 1.6 and XML::Xalan 0.44

A while ago on this list, it was suggested (by David Bertoni) that,
because of the effort to maintain compile-time and binary stability
between successive versions of Xalan C++, it should theoretically be
possible to build the old XML::Xalan Perl wrapper -- originally designed
for Xalan C++ 1.3 -- against Xalan C++ 1.6.

Unfortunately, this turns out not to be the case. I was able to build
ICU 2.6, Xerces C++ 2.3.0, Xerces Perl 2.3.0-0, and Xalan C++ 1.6 all
successfully. Now, trying to build XML::Xalan against Xalan C++ 1.6, I'm
running into compilation issues that are definitely based on changes to
the Xalan C++ source tree. I've looked into the problem a little bit,
but the strange part is that the first error I get in a long chain of
errors is a parser error.

For this to make any sense, you'd have to see the source code for
XML::Xalan. If anyone has the time to take a look, here's the error I'm
currently getting (more comments follow error):

c++ -c  -I/usr/local/src/xml-xalan-1.6/c/src
-I/usr/local/src/xerces-c-src_2_3_0/include/xercesc 
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  
-DVERSION=\"0.44\" -DXS_VERSION=\"0.44\" -fPIC
"-I/usr/lib/perl5/5.8.0/i386-linux/CORE"  -DLINUX -D_REENTRANT -DNDEBUG
-D_EXPERIMENTAL XSv.cpp
In file included from XSv.cpp:7:
XSv.hpp:23: error: parse error before `{' token
XSv.hpp:39: error: parse error before `*' token
XSv.hpp:40: error: parse error before `const'
XSv.hpp:43: error: destructors must be member functions
XSv.hpp:43: error: virtual outside class declaration
XSv.hpp:50: error: syntax error before `*' token
XSv.hpp:55: error: syntax error before `(' token
XSv.hpp:58: error: virtual outside class declaration
XSv.hpp:58: error: non-member function `SV* getSV()' cannot have `const'
method
   qualifier
XSv.hpp:60: error: syntax error before `&' token
XSv.hpp:65: error: `FormatterListener' was not declared in this scope
XSv.hpp:65: error: `formatterListener' was not declared in this scope
XSv.hpp:66: error: `MemberFunctionPtr' was not declared in this scope
XSv.hpp:66: error: parse error before `)' token
XSv.hpp:66: error: virtual outside class declaration
XSv.hpp:66: error: non-member function `void str(...)' cannot have
`const'
   method qualifier
XSv.hpp:69: error: `XObjectTypeCallback' was not declared in this scope
XSv.hpp:69: error: `theCallbackObject' was not declared in this scope
XSv.hpp:69: error: virtual outside class declaration
XSv.hpp:69: error: variable or field `ProcessXObjectTypeCallback'
declared void
XSv.hpp:72: error: `XObjectTypeCallback' was not declared in this scope
XSv.hpp:72: error: `theCallbackObject' was not declared in this scope
XSv.hpp:72: error: virtual outside class declaration
XSv.hpp:72: error: variable or field `ProcessXObjectTypeCallback'
declared void
XSv.hpp:72: error: redefinition of `int ProcessXObjectTypeCallback'
XSv.hpp:69: error: `int ProcessXObjectTypeCallback' previously defined
here
XSv.hpp:74: error: parse error before `private'
XSv.hpp:77: error: syntax error before `;' token
XSv.cpp:17: error: syntax error before `::' token
XSv.cpp:19: error: invalid use of undefined type `class XSv'
XSv.hpp:22: error: forward declaration of `class XSv'
XSv.cpp: In constructor `XSv::XSv(SV*)':
XSv.cpp:20: error: class `XSv' does not have any field named `XObject'
XSv.cpp:20: error: `eTypeUserDefined' undeclared (first use this
function)
XSv.cpp:20: error: (Each undeclared identifier is reported only once for
each
   function it appears in.)
XSv.cpp:22: error: `m_value' undeclared (first use this function)
XSv.cpp:23: error: `s_dummyString' undeclared (first use this function)
XSv.cpp: At global scope:
XSv.cpp:26: error: parse error before `&' token
XSv.cpp:26: error: invalid use of undefined type `class XSv'
XSv.hpp:22: error: forward declaration of `class XSv'
XSv.cpp: In constructor `XSv::XSv(...)':
XSv.cpp:27: error: class `XSv' does not have any field named `XObject'
XSv.cpp:27: error: `source' undeclared (first use this function)
XSv.cpp: At global scope:
XSv.cpp:33: error: invalid use of undefined type `class XSv'
XSv.hpp:22: error: forward declaration of `class XSv'
XSv.cpp:41: error: syntax error before `*' token
XSv.cpp:49: error: syntax error before `::' token
XSv.cpp:56: error: invalid use of undefined type `class XSv'
XSv.hpp:22: error: forward declaration of `class XSv'
XSv.cpp:60: error: syntax error before `&' token
XSv.cpp:69: error: `FormatterListener' was not declared in this scope
XSv.cpp:69: error: `formatterListener' was not declared in this scope
XSv.cpp:70: error: `MemberFunctionPtr' was not declared in this scope
XSv.cpp:70: error: parse error before `)' token
XSv.cpp:71: error: invalid use of undefined type `class XSv'
XSv.hpp:22: error: forward declaration of `class XSv'
XSv.cpp: In member function `void XSv::str(...) const':
XSv.cpp:72: error: `formatterListener' undeclared (first use this
function)
XSv.cpp:72: error: `function' undeclared (first use this function)
XSv.cpp:72: error: `c_wstr' undeclared (first use this function)
XSv.cpp:72: error: `length' undeclared (first use this function)
XSv.cpp: At global scope:
XSv.cpp:76: error: `XObjectTypeCallback' was not declared in this scope
XSv.cpp:76: error: `theCallbackObject' was not declared in this scope
XSv.cpp:77: error: invalid use of undefined type `class XSv'
XSv.hpp:22: error: forward declaration of `class XSv'
XSv.cpp:77: error: invalid declarator
XSv.cpp:77: error: syntax error before `{' token
XSv.cpp:82: error: `XObjectTypeCallback' was not declared in this scope
XSv.cpp:82: error: `theCallbackObject' was not declared in this scope
XSv.cpp:83: error: invalid use of undefined type `class XSv'
XSv.hpp:22: error: forward declaration of `class XSv'
XSv.cpp:83: error: invalid declarator
XSv.cpp:83: error: syntax error before `{' token
XSv.cpp:89: error: invalid use of undefined type `class XSv'
XSv.hpp:22: error: forward declaration of `class XSv'
XSv.cpp:95: error: invalid use of undefined type `class XSv'
XSv.hpp:22: error: forward declaration of `class XSv'
XSv.cpp: In member function `void XSv::terminate()':
XSv.cpp:96: error: `releaseMemory' undeclared (first use this function)
gmake: *** [XSv.o] Error 1

Interestingly, if I comment out the namespace directive in
$XALANCROOT/src/xalanc/XPath, the set of errors changes dramatically.

I've tried unsuccessfully to contact Edwin Pratomo, the original
maintainer of XML::Xalan, several times over the past several months.
There's been talk of +1ing XML::Xalan as an official Apache XML Project.
I'd be happy to help with this effort (I'm already trying to help Jason
Stewart with at least the documentation of Xerces Perl).

I figured I'd (cross-)post here to see if anyone more familiar with
Xalan C++ 1.6 internals (or Xalan or C++ in general) might know what's
causing the parser error and other problems.

I've got a detailed build document for the entire Xerces/Xalan suite
(+ICU) for Linux that works for Xerces 2.0/Xalan 1.4 (including
XML::Xalan). I'd be happy to post the version of this that works for
Xerces 2.3/Xalan 1.6 (not including XML::Xalan, unless someone replies
to this post ... :).

Thanks!

-tfo


Re: Xalan C++ 1.6 and XML::Xalan 0.44

Posted by da...@us.ibm.com.



Hi Thomas,

This is certainly something we can take up on the development list, but
it's certainly not appropriate for the user list (by the way, please don't
cross post).  The first thing to do would be to send me privately a tar.gz
with the source code for XML::Xalan and any appropriate build information,
so I can try to reproduce this and see what's going on.  I suspect it will
be related to namespaces.  In particular, forward declaration of Xalan
classes becomes more difficult with namespaces.

Thanks!

Dave



                                                                                                                                                  
                      "Thomas F.                                                                                                                  
                      O'Connell"               To:      xalan-dev@xml.apache.org                                                                  
                      <tfo@netcentral.         cc:      xalan-c-users@xml.apache.org                                                              
                      com>                     Subject: Xalan C++ 1.6 and XML::Xalan 0.44                                                         
                                                                                                                                                  
                      09/25/2003 02:48                                                                                                            
                      PM                                                                                                                          
                      Please respond                                                                                                              
                      to xalan-dev                                                                                                                
                                                                                                                                                  



A while ago on this list, it was suggested (by David Bertoni) that,
because of the effort to maintain compile-time and binary stability
between successive versions of Xalan C++, it should theoretically be
possible to build the old XML::Xalan Perl wrapper -- originally designed
for Xalan C++ 1.3 -- against Xalan C++ 1.6.

Unfortunately, this turns out not to be the case. I was able to build
ICU 2.6, Xerces C++ 2.3.0, Xerces Perl 2.3.0-0, and Xalan C++ 1.6 all
successfully. Now, trying to build XML::Xalan against Xalan C++ 1.6, I'm
running into compilation issues that are definitely based on changes to
the Xalan C++ source tree. I've looked into the problem a little bit,
but the strange part is that the first error I get in a long chain of
errors is a parser error.

For this to make any sense, you'd have to see the source code for
XML::Xalan. If anyone has the time to take a look, here's the error I'm
currently getting (more comments follow error):

...

Interestingly, if I comment out the namespace directive in
$XALANCROOT/src/xalanc/XPath, the set of errors changes dramatically.

I've tried unsuccessfully to contact Edwin Pratomo, the original
maintainer of XML::Xalan, several times over the past several months.
There's been talk of +1ing XML::Xalan as an official Apache XML Project.
I'd be happy to help with this effort (I'm already trying to help Jason
Stewart with at least the documentation of Xerces Perl).

I figured I'd (cross-)post here to see if anyone more familiar with
Xalan C++ 1.6 internals (or Xalan or C++ in general) might know what's
causing the parser error and other problems.

I've got a detailed build document for the entire Xerces/Xalan suite
(+ICU) for Linux that works for Xerces 2.0/Xalan 1.4 (including
XML::Xalan). I'd be happy to post the version of this that works for
Xerces 2.3/Xalan 1.6 (not including XML::Xalan, unless someone replies
to this post ... :).

Thanks!

-tfo