You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by Martin Raspe <ra...@uni-trier.de> on 2003/06/11 13:16:20 UTC
Beta release of XML::Xerces-2.3.0-0 compiles on Windows
Jason E. Stewart wrote:
> Hey All,
>
> I've finally solved the namespace compilation issues that crept up in
> Xerces-C-2.2 - just in time to make a release for Xerces-C-2.3!
Thank you so much! Finally it compiles (quasi out of the box, without
running SWIG). This is Win2000, Perl 5.6.1 and VC 6.0.
A few issues concern "makefile.pl":
"config.status" is not included in the xerces-c Windows binaries.
my $LIBXERCES = "-lxerces-c_2";
# this is the library name on Windows
my $CFLAGS = '-D_REENTRANT -DWIN32 -TP -GX -DHAS_BOOL';
# with config.status missing $CFLAGS are undefined
\$(MAKE) -C Handler static
# this syntax doesn't work on Windows, replace with:
cd Handler && \${MAKE} static
For some reason, Xerces.C isn't compiled by the makefile. I had to
compile it by hand.
Testing: All tests fail unless the system path is set to include the
location of Xerces-c_2_3_0.dll. Some of the tests fail because of unix
syntax in the test files (like "2>/dev/null"). Exception handling seems
particularly weak (tests fail mainly on exceptions). The message is
always "Handling Unknown exception".
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t\AttributeList.t 3 768 8 3 37.50% 5-7
t\Attributes.t 4 1024 14 4 28.57% 8 10-11 14
t\DOMCount.t 1 256 2 1 50.00% 2
t\DOMCreate.t 1 256 2 1 50.00% 2
t\DOMDocument.t 2 512 35125 2 0.01% 3-4
t\DOMException.t 6 1536 7 6 85.71% 2-7
t\DOMPrint.t 1 256 2 1 50.00% 2
t\SAX2Count.t 4 1024 5 4 80.00% 2-5
t\SAXCount.t 4 1024 5 4 80.00% 2-5
t\SAXException.t 255 65280 6 5 83.33% 2-6
t\Schema.t 255 65280 3 1 33.33% 3
t\URLInputSource.t 2 512 8 2 25.00% 6 8
t\XMLException.t 1 256 1 1 100.00% 2
12 subtests skipped.
Failed 13/35 test scripts, 62.86% okay. 34/35353 subtests failed, 99.90%
okay.
Hope this helps - currently I don't have time to investigate further.
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: Beta release of XML::Xerces-2.3.0-0 compiles on Windows
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Gerrit P. Haase" <ge...@familiehaase.de> writes:
> >> my $CFLAGS = '-D_REENTRANT -DWIN32 -TP -GX -DHAS_BOOL';
> >> # with config.status missing $CFLAGS are undefined
>
> > OK.
>
> Ah, you're talking about the Windows version and ActiveStates Perl?
> I'll try to figure out if the module fits also on Cygwin now.
Yes, please do try it with cygwin, and let us know.
> >> Some of the tests fail because of unix syntax in the test files
> >> (like "2>/dev/null").
>
> > Yeah, this is I/O redirection on Unix - I'll test, I may not need this.
>
> There is possibly a way to do this on windows too.
Please let me know the windows syntax for this in case I need it.
Thanks!
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: Beta release of XML::Xerces-2.3.0-0 compiles on Windows
Posted by "Gerrit P. Haase" <ge...@familiehaase.de>.
Jason schrieb:
> "Martin Raspe" <ra...@uni-trier.de> writes:
>> Thank you so much! Finally it compiles (quasi out of the box,
>> without running SWIG). This is Win2000, Perl 5.6.1 and VC 6.0.
> Whoa! No way! You're the first person to report success on
> Windows. That's cool!
Great News.
[...]
>> my $CFLAGS = '-D_REENTRANT -DWIN32 -TP -GX -DHAS_BOOL';
>> # with config.status missing $CFLAGS are undefined
> OK.
Ah, you're talking about the Windows version and ActiveStates Perl?
I'll try to figure out if the module fits also on Cygwin now.
[...]
>> Testing: All tests fail unless the system path is set to include the
>> location of Xerces-c_2_3_0.dll.
> There's probably a linker flag that tells it where the library is
> located at runtime - if you find that out, I'll include it in the
> windows help file.
You must set the PATH to include this directory, since you will never
know where the user installs the binaries..., does Xerces for Windows
uses the Windows registry?
>> Some of the tests fail because of unix syntax in the test files
>> (like "2>/dev/null").
> Yeah, this is I/O redirection on Unix - I'll test, I may not need this.
There is possibly a way to do this on windows too.
Gerrit
--
=^..^=
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
XML::Xerces-2.3.0-0 on Windows
Posted by Martin Raspe <ra...@uni-trier.de>.
Jason E. Stewart wrote:
> Does renaming it to Xerces.cpp make any difference?
Yes it does! MANIFEST hast to be updated, too. -
Another issue are the compiler flags. Currently they are not taken from
"Config.pm", it seems. So I copied the following from there:
-DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX
Apparently only "-DWIN32" is really needed. Then I added the following:
-D_REENTRANT -TP -GX -DHAS_BOOL
Without "-DHAS_BOOL" a lot of "unresolved external ..." linker errors
are produced. -TP forces C++ compilation (not needed if the file is
named *.cpp), -GX is asked for by the compiler.
>>Now I see the message is *not* always "Handling Unknown exception".
> Ok, that's better.
Here is another test case (copied from SAXException.t and modified):
my $parser = XML::Xerces::XMLReaderFactory::createXMLReader();
eval {
$parser->setFeature("http://xml.org/sax/features/foospaces", 0);
};
my $ex = $@;
print $ex;
print $ex->getMessage();
prints:
"Handling Unknown exception at
D:\Scripts\perl\testXML-Xerces-Exceptions.pl line 9.
XML::Xerces::SAXNotRecognizedException=HASH(0x1a754bc)"
The proper exception type is generated, but the "getMessage" method (an
alias for XML::Xercesc::SAXException_getMessage) fails and dies saying
"Handling Unknown exception". -
Xerces.pm: $VERSION = q[1.7.0-1]; should be updated.
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: Beta release of XML::Xerces-2.3.0-0 compiles on Windows
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Martin Raspe" <ra...@uni-trier.de> writes:
> > I'll add a hints file for Windows - could you tell me what the output
> > of $^O (the operating system variable) is?
>
>
> It just says 'MSWin32'.
Good, I can add some windows conditionals for this in Makefile.PL
> >> For some reason, Xerces.C isn't compiled by the makefile. I had to
> >> compile it by hand.
>
> > This one I don't understand.
>
> Nor do I. I seem to recall that it used to work. Perhaps it's due to
> problems with the uppercase C in "Xerces.C" I had before. Anyway, make
> just silently skips making "Xerces.C" and tries to link "Xerces.obj"
> which it can't find.
Does renaming it to Xerces.cpp make any difference?
>
> > There's probably a linker flag that tells it where the library is
> > located at runtime - if you find that out, I'll include it in the
> > windows help file.
>
> I'd just say: put "Xerces-c_2_3_0.dll" somewhere in your system
> path.
Hmmm. OK. I really want to find a good way of checking whether the
library is in the system path. There *is* a method in MakeMaker.pm,
but it has way too many side effects, so I commented it out for 2.3.
> >> Exception handling seems particularly weak (tests fail mainly on
> >> exceptions). The message is always "Handling Unknown exception".
>
> > Hmmm... Not sure about this one - that message comes from my exception
> > handler getting some exception that it can't deal with and killing
> > Xerces. It seems that almost all the methods are failing - I'd be
> > surprised if you could write an application that works.
>
> Yes I can! As far as I see, at least XercesDOMParser and SAXParser
> work as they should. Parsing errors are reported correctly. Even
> schema validation works (to a certain extent - constraints are
> ignored, but maybe I haven't set the correct parameters).
>
>
> Now I see the message is *not* always "Handling Unknown exception".
Ok, that's better.
> It's the exception objects that don't behave. I seems they are mostly
> created and returned OK, but the {code} and {msg} hash values contain
> just garbage (it seems they somehow don't get initialized, but reflect
> some random memory location). That's why most of the tests fail.
Hmmm. Sounds bad.
> $e = XML::Xerces::DOMException->new(42,'test');
> print "$e : $e->{code} : $e->{msg}";
>
> prints
>
> "XML::Xerces::DOMException=HASH(0x1b90e2c) : 42 : "
> - is that OK?
I'll have to think about this one a bit more.
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: Beta release of XML::Xerces-2.3.0-0 compiles on Windows
Posted by Martin Raspe <ra...@uni-trier.de>.
Jason E. Stewart wrote:
> I'd really recommend upgrading your Perl to 5.8.x, Xerces relies
> heavily on Perl's Unicode support and it was pretty buggy in 5.6.
I know. I hesitate because I have a solid working installation with many
modules.
> I'll add a hints file for Windows - could you tell me what the output
> of $^O (the operating system variable) is?
It just says 'MSWin32'.
>> For some reason, Xerces.C isn't compiled by the makefile. I had to
>> compile it by hand.
> This one I don't understand.
Nor do I. I seem to recall that it used to work. Perhaps it's due to
problems with the uppercase C in "Xerces.C" I had before. Anyway, make
just silently skips making "Xerces.C" and tries to link "Xerces.obj"
which it can't find.
> There's probably a linker flag that tells it where the library is
> located at runtime - if you find that out, I'll include it in the
> windows help file.
I'd just say: put "Xerces-c_2_3_0.dll" somewhere in your system path.
>> Exception handling seems particularly weak (tests fail mainly on
>> exceptions). The message is always "Handling Unknown exception".
> Hmmm... Not sure about this one - that message comes from my exception
> handler getting some exception that it can't deal with and killing
> Xerces. It seems that almost all the methods are failing - I'd be
> surprised if you could write an application that works.
Yes I can! As far as I see, at least XercesDOMParser and SAXParser work
as they should. Parsing errors are reported correctly. Even schema
validation works (to a certain extent - constraints are ignored, but
maybe I haven't set the correct parameters).
Now I see the message is *not* always "Handling Unknown exception".
It's the exception objects that don't behave. I seems they are mostly
created and returned OK, but the {code} and {msg} hash values contain
just garbage (it seems they somehow don't get initialized, but reflect
some random memory location). That's why most of the tests fail.
$e = XML::Xerces::DOMException->new(42,'test');
print "$e : $e->{code} : $e->{msg}";
prints
"XML::Xerces::DOMException=HASH(0x1b90e2c) : 42 : "
- is that OK?
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: Beta release of XML::Xerces-2.3.0-0 compiles on Windows
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Martin Raspe" <ra...@uni-trier.de> writes:
> Thank you so much! Finally it compiles (quasi out of the box,
> without running SWIG). This is Win2000, Perl 5.6.1 and VC 6.0.
Whoa! No way! You're the first person to report success on
Windows. That's cool!
I'd really recommend upgrading your Perl to 5.8.x, Xerces relies
heavily on Perl's Unicode support and it was pretty buggy in 5.6.
> A few issues concern "makefile.pl":
> "config.status" is not included in the xerces-c Windows binaries.
Hmmm. I'll talk to the Xerces-C people about this.
I'll add a hints file for Windows - could you tell me what the output
of $^O (the operating system variable) is?
> my $LIBXERCES = "-lxerces-c_2";
> # this is the library name on Windows
OK.
> my $CFLAGS = '-D_REENTRANT -DWIN32 -TP -GX -DHAS_BOOL';
> # with config.status missing $CFLAGS are undefined
OK.
> \$(MAKE) -C Handler static
> # this syntax doesn't work on Windows, replace with:
> cd Handler && \${MAKE} static
Yes, this is gnu make syntax, I'll add an exception for windows.
> For some reason, Xerces.C isn't compiled by the makefile. I had to
> compile it by hand.
This one I don't understand.
> Testing: All tests fail unless the system path is set to include the
> location of Xerces-c_2_3_0.dll.
There's probably a linker flag that tells it where the library is
located at runtime - if you find that out, I'll include it in the
windows help file.
> Some of the tests fail because of unix syntax in the test files
> (like "2>/dev/null").
Yeah, this is I/O redirection on Unix - I'll test, I may not need this.
> Exception handling seems particularly weak (tests fail mainly on
> exceptions). The message is always "Handling Unknown exception".
Hmmm... Not sure about this one - that message comes from my exception
handler getting some exception that it can't deal with and killing
Xerces. It seems that almost all the methods are failing - I'd be
surprised if you could write an application that works.
Looks like there's some more debugging needed.
Thanks for the report!
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org