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 "Jason E. Stewart" <ja...@openinformatics.com> on 2001/10/27 03:48:35 UTC

["Sterin, Ilya" ] RE: XML::Xerces port to windows

Jason, thanks for the prompt response.  I wonder if either your or my email
system stripped the attachment due to it's .PL ending.  I will change it to
.txt and resend.  I am attaching two Makefiles, one for the 1.3 version and
the other for the 1.5.3 version.

Let me briefly explain the changes that were needed, before you dive into
the code.

The Makefile uses find.exe to genereate a list of files, that is great, but
I don't think everyone has the cygwin port of find.exe and if they do,
cygwin does not by default put in in the PATH, so find .... will not work, I
had to replace with my full path to find.  I don't think we should find a
universal way of getting these files, since a PPM is all that is needed for
windows, unless someone for some apparent reason wants to compile
themselves, there can be an instruction list to instruct the changes needed
for this to happen, like the find.exe, etc...  
Another change was to link to the Xerces libs, which are not found with the 
my $LIBXERCES = "-lxerces-c$XERCES_LIB_VERSION".

Since when Xerces-C is compiled, the .lib file is called just
xerces-c_1D.lib, so I hardcoded this, although it says that it is not
harmfull even if not found.  It was never found when I compiled the 1.3
version and it worked fine, so I imaging it's irrelevant, but still couln't
hurt.

There was another thing, about installing the xerces-c .dll files in the
directory in the PATH, I thing perl's bin directory is the best place for 
them.  I modified the Makefile to allow it to be copied from the
$XERCESCROOT/bin into the perl's bin directory, since there are only two
.dll files, it's preatty simple to just copy all *.dll.

I also added -DWIN32 -DHAS_BOOL to the CCFLAGS, it will not mess things up
if you have both -DDEBIAN and -DWIN32, but rather now work either way.
-DHAS_BOOL solved one problem, though I don't recall the exact message.

Come to think of it, I can probably easily install the .dll files through
the PPM package, so for the 1.5 version, we can do automatically.

Another question I had, was would it be better to just compile statically so
it won't depend on the .dlls, that might be a good choice for windows and
the packaging, since we won't have to deal with the .dll "hell".

Come to think of it, I am at work and don't currently have the Makefile.PL
for the 1.3 version that I modified, but I do have the 1.5.3 version I've
been working on, since that's all I've been trying to do all day.

There were a few other minor changes that I made, but can't recall off the
top of my had, I'll probably need to go through all the .bak files I have
and run diff to find out, if we will really need that.

Here is the complete output of Makefile.PL and nmake...  
I am running win2k and ActiveState Perl 5.6.1 build with Multithread
support.

******************************

C:\Documents and
Settings\isterin\Desktop\xerces\Xerces-5\XML-Xerces-1.5.3>perl
Makefile.PL
Using XERCES_LIB = C:/usr/xerces_new/lib
Using XERCES_INCLUDE = C:/usr/xerces_new/include
Checking to see if libxerces is in your library path...Success!!
Using Xerces-C version: 1.5
Writing Makefile for XML::Xerces::DOMParse
Writing Makefile for Handler
Writing Makefile for XML::Xerces

C:\Documents and
Settings\isterin\Desktop\xerces\Xerces-5\XML-Xerces-1.5.3>nmake


Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        cl -c -I. -I./Handler -IC:/usr/xerces_new/include -nologo -O1 -MD
-DNDEB
UG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT
-DPE
RL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG    -DVERSION=\"0.10\"
-D
XS_VERSION=\"0.10\"  -IC:\Perl\lib\CORE  PerlContentCallbackHandler.cpp
PerlContentCallbackHandler.cpp
        cl -c -I. -I./Handler -IC:/usr/xerces_new/include -nologo -O1 -MD
-DNDEB
UG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT
-DPE
RL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG    -DVERSION=\"0.10\"
-D
XS_VERSION=\"0.10\"  -IC:\Perl\lib\CORE  PerlDocumentCallbackHandler.cpp
PerlDocumentCallbackHandler.cpp
        cl -c -I. -I./Handler -IC:/usr/xerces_new/include -nologo -O1 -MD
-DNDEB
UG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT
-DPE
RL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG    -DVERSION=\"0.10\"
-D
XS_VERSION=\"0.10\"  -IC:\Perl\lib\CORE  PerlErrorCallbackHandler.cpp
PerlErrorCallbackHandler.cpp
        cl -c -I. -I./Handler -IC:/usr/xerces_new/include -nologo -O1 -MD
-DNDEB
UG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT
-DPE
RL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 -MD -DNDEBUG    -DVERSION=\"0.10\"
-D
XS_VERSION=\"0.10\"  -IC:\Perl\lib\CORE  PerlExceptionHandler.cpp
PerlExceptionHandler.cpp
"Running Mkbootstrap for Handler ()"
        C:\Perl\bin\Perl.exe -IC:\Perl\lib -IC:\Perl\lib -MExtUtils::Command
-e
chmod 644 Handler.bs
        link -out:..\blib\arch\auto\Handler\Handler.dll -dll -nologo
-nodefaultl
ib -release  -libpath:"C:\Perl\lib\CORE"  -machine:x86
PerlContentCallbackHandle
r.obj  PerlDocumentCallbackHandler.obj  PerlErrorCallbackHandler.obj
PerlExcept
ionHandler.obj   C:\Perl\lib\CORE\perl56.lib oldnames.lib kernel32.lib
user32.li
b gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut
32.lib  netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib
odbc32.
lib odbccp32.lib msvcrt.lib -def:Handler.def
Handler.def : error LNK2001: unresolved external symbol boot_Handler
Handler.def : error LNK2001: unresolved external symbol boot_Handler
..\blib\arch\auto\Handler\Handler.lib : fatal error LNK1120: 2 unresolved
extern
als
LINK : fatal error LNK1141: failure during build of exports file
NMAKE : fatal error U1077: 'link' : return code '0x475'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.


******************************


Let me know what you think.

Ilya

-----Original Message-----
From: jason@openinformatics.com
To: Sterin, Ilya
Cc: xerces-p-dev@xml.apache.org
Sent: 07/18/2001 11:27 AM
Subject: Re: XML::Xerces port to windows

Hi Ilya,

"Sterin, Ilya" <Is...@ciber.com> writes:

> Hello, Jason.  I am currently porting XML::Xerces 1.5.3 to Windows.
I've
> ported the 1.3 version and made it available through PPM repository on
> www.xmlproj.com/PPM

This is really excellent news! I'm glad that we can say there is
something available for windows. I'd really appreciate knowing what
you needed to change in Makefile.PL to make it work for you (there was
no attachment in your previous message).

> But I am havinga problem with the 1.5.3 version.  It's seems like it
> is related to the new Handler libs, croaking with an unresolved
> symbol error.  I searched the files for that sub, and couldn't find
> it.  Is it because I am using the compiled version of Xerces-C for
> Windows.  Should I recompile with support for something else?  Here
> is the error message...
> 
> Handler.def : error LNK2001: unresolved external symbol boot_Handler
> 
> LINK : fatal error LNK1141: failure during build of exports file
> NMAKE : fatal error U1077: 'link' : return code '0x475'
> Stop.
> NMAKE : fatal error U1077: 'cd' : return code '0x2'
> Stop.

Usually boot_* symbols are for Perl's DynaLoader, but the Handler
object files are not a stand-alone perl module, and thus shouldn't
have any boot code. I'll have to see your makefile to know what's
going on, plus some more of the compile line before the error msg.

Thanks for this work! I really want to see windows support for
XML::Xerces, so I'll help in whatever way I can.

jas.