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 "Matthew D. Langston" <la...@SLAC.Stanford.EDU> on 2001/03/05 19:56:36 UTC

xerces-p for linux

Hello,

I read your email exchanges from last December about the linux port of
xerces-p (see
http://archive.covalent.net/xml/xerces-p-dev/2000/12/).  I just did a cvs
checkout of the xerces-p source tree, but it doesn't appear that the linux
modifications have been folded in yet.

May I ask you for your Linux diffs that add linux support to xerces-p
please?  Thank you :-)

Regards, Matt

--
Matthew D. Langston
SLD, Stanford Linear Accelerator Center
langston@SLAC.Stanford.EDU


Re: xerces-p for linux

Posted by "Harmon S. Nine" <hn...@netarx.com>.
Yes.  We've had this same problem in perl5.5.  The debugger seems to get 
"out-of-sync"
with the source code.

-- Harmon

Jason E. Stewart wrote:

> "Harmon S. Nine" <hn...@netarx.com> writes:
> 
> 
>> Actually, we're using xerces-perl as it is in the tarball with
>> perl5.6 and swig 1.1p5.  The "postSource.pl" script mungs the
>> XERCES_wrap.C code to change "na" to "PL_na", etc.  With this, there
>> seems to be no problem using perl5.6 with swig 1.1p5.
> 
> There is the issue that you can't run any scripts in the debugger, but
> I'm not sure that that's a 5.6 issue.
> 
> 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: xerces-p for linux

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Harmon S. Nine" <hn...@netarx.com> writes:

> Actually, we're using xerces-perl as it is in the tarball with
> perl5.6 and swig 1.1p5.  The "postSource.pl" script mungs the
> XERCES_wrap.C code to change "na" to "PL_na", etc.  With this, there
> seems to be no problem using perl5.6 with swig 1.1p5.

There is the issue that you can't run any scripts in the debugger, but
I'm not sure that that's a 5.6 issue.

jas.

Re: xerces-p for linux

Posted by "Harmon S. Nine" <hn...@netarx.com>.
Actually, we're using xerces-perl as it is in the tarball with perl5.6 
and swig 1.1p5.
The "postSource.pl" script mungs the XERCES_wrap.C code to change "na" 
to "PL_na",
etc.  With this, there seems to be no problem using perl5.6 with swig 1.1p5.

Cheers.
-- Harmon


Jason E. Stewart wrote:

> yes, swig1.1p5 supports perl 5.005. Unfortunately, it doesn't really
> support 5.6, so swig 1.3 is needed for that.
> 



Re: xerces-p for linux

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Matthew D. Langston" <la...@SLAC.Stanford.EDU> writes:

> If you are interested, I have an Autoconf macro that tests for the location
> of the xerces-c library and header files that I could send to you if you
> think it would be helpful.  Your solution of setting XERCES_INCLUDE  and
> XERCES_LIB, with the sensible defaults of -I$XERCESCROOT/include
> and -L$XERCESCROOT/lib, is a much simpler solution though.

Problem is that ExtUtils::MakeMaker kind of does it's own thing, that
paradigm doesn't really fit in with the autoconf/m4 way of doing
things... 

And thanks for the offer!

jas.

Re: xerces-p for linux

Posted by "Matthew D. Langston" <la...@SLAC.Stanford.EDU>.
Hi Jason,

Adding the XERCES_INCLUDE  and XERCES_LIB environment variables sounds like
a good idea.

If you are interested, I have an Autoconf macro that tests for the location
of the xerces-c library and header files that I could send to you if you
think it would be helpful.  Your solution of setting XERCES_INCLUDE  and
XERCES_LIB, with the sensible defaults of -I$XERCESCROOT/include
and -L$XERCESCROOT/lib, is a much simpler solution though.

Regards, Matt

----- Original Message -----
From: "Jason E. Stewart" <ja...@openinformatics.com>
To: <xe...@xml.apache.org>
Sent: Monday, March 05, 2001 12:37 PM
Subject: Re: xerces-p for linux


> "Matthew D. Langston" <la...@SLAC.Stanford.EDU> writes:
>
> > Great!
> >
> > FYI, I just built Harmon's tarball on my Linux box, and all tests from
"make
> > test" passed.  My configuration is:
> >
> > RedHat 6.1 Intel
> > gcc 2.95.2
> > xerces-c 1.3.0
> > perl 5.00503
> > swig 1.1p5
>
> yes, swig1.1p5 supports perl 5.005. Unfortunately, it doesn't really
> support 5.6, so swig 1.3 is needed for that.
>
> > I had to add "-I/usr/include/xerces" to the INC key in Makefile.PL, but
that
>
> Yes. I found that. I had added -I$XERCESCROOT/include and
> -L$XERCESCROOT/lib assuming that people would have local installations
> for now, but it seems this is not good enough. How about if I add:
>
> -I$XERCES_INCLUDE
>
> and
>
> -L$XERCES_LIB
>
> and require people to set those two environment variables? These could
> default to $XERCESCROOT/include and $XERCESCROOT/lib.
>
> 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: Jason Stewart: xerces-perl mods

Posted by "Harmon S. Nine" <hn...@netarx.com>.
Jason --

Though it would be good to make this public, so I posted it to 
xerces-p-dev :-)

How is it you're make the formerly XERCES modules into XML::Xerces via SWIG?
Swig doesn't like a "%module XML::Xerces" in the Xerces.i file.  You can 
use the
"-package XML::Xerces" command-line option, but that doesn't really do 
the trick,
since you still say "use Xerces" in a perl-script, and the module still 
wants to autoload
auto/XERCES/XERCES.so instead of auto/XML/XERCES/Xerces.so

As for the diff-file change:

-    result = new DOM_Node const (arg0->getCommonAncestorContainer()); 
   ST(argvi) = sv_newmortal();
+    result = new DOM_Node (arg0->getCommonAncestorContainer());    
ST(argvi) = sv_newmortal();

I'm trying to figure out where that "const" came from that the diff is 
removing.  I think its
from the dom/DOM_Range.hpp header file, i.e. "const" at the end of the 
following
declaration:

const DOM_Node getCommonAncestorContainer() const;

Try commenting this out:

const DOM_Node getCommonAncestorContainer() /*const*/;

to see if this makes it so you don't need the diff.  By the way, there's 
*lots* of
declarations like this.  If they're a problem with SWIG 1.3, they all 
need to be
commented out.  I'm working on this and the rest as I write this, since 
it can't
do any harm anyway...

-- Harmon


Jason E. Stewart wrote:

> "Harmon S. Nine" <hn...@netarx.com> writes:
> 
> 
>> So there's no actual change to XERCES.i, just to XERCES_wrap.C, in 
>> particular, the
>> elimination of the "const".  Is this right?
> 
> The only other changes I made were in Makefile.PL to generalize the
> finding of the include files and the xerces.so lib, and to change the
> namespace to XML::Xerces, which seemed to be what the apache people
> thought was best.
> 
> And I renamed the files to be consistent with the namespace:
> XERCES.i => Xerces.i
> XERCES_wrap.C => Xerces.C
> XERCES.pm => Xerces.pm
> 
> Other than that I left things alone. 
> 
> jas.
> 
> 




Re: xerces-perl mods

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Harmon S. Nine" <hn...@netarx.com> writes:

> In your diff of XERCES.i, it had a '-' sign next to the line with 
> "SWIG_ConvertPtr"
> and a '+' next to the line with "SWIG_GetPtr", meaning diff the former 
> to the latter.
> Just making sure, but this is the opposite of what is desired, right?  
> That is, for swig 1.3
> SWIG_GetPtr should be changed to SWIG_ConvertPtr?

Oops, Sounds like I bungled the diff :-(

Here is the current diff for swig1.3a5

jas.


Re: xerces-p for linux

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Matthew D. Langston" <la...@SLAC.Stanford.EDU> writes:

> Great!
> 
> FYI, I just built Harmon's tarball on my Linux box, and all tests from "make
> test" passed.  My configuration is:
> 
> RedHat 6.1 Intel
> gcc 2.95.2
> xerces-c 1.3.0
> perl 5.00503
> swig 1.1p5

yes, swig1.1p5 supports perl 5.005. Unfortunately, it doesn't really
support 5.6, so swig 1.3 is needed for that.

> I had to add "-I/usr/include/xerces" to the INC key in Makefile.PL, but that

Yes. I found that. I had added -I$XERCESCROOT/include and
-L$XERCESCROOT/lib assuming that people would have local installations
for now, but it seems this is not good enough. How about if I add:

-I$XERCES_INCLUDE 

and

-L$XERCES_LIB

and require people to set those two environment variables? These could
default to $XERCESCROOT/include and $XERCESCROOT/lib.

jas.

Re: xerces-p for linux

Posted by "Matthew D. Langston" <la...@SLAC.Stanford.EDU>.
Great!

FYI, I just built Harmon's tarball on my Linux box, and all tests from "make
test" passed.  My configuration is:

RedHat 6.1 Intel
gcc 2.95.2
xerces-c 1.3.0
perl 5.00503
swig 1.1p5

I had to add "-I/usr/include/xerces" to the INC key in Makefile.PL, but that
was the only change I had to make.  Other Linux/Unix users will have to do
the same thing depending on their installation of xerces-c.  To my
knowledge, perl's ExtUtils::MakeMaker doesn't support "build-time dynamic
discovery" of external dependencies (like the xerces-c libraries and
headers) like GNU Autoconf does.  Perhaps a note in a README file in
xerces-p to this affect would be helpful.

Please let me know when you've done your "cvs ci" and I'll try the same test
again.  Thanks!

Regards, Matt

----- Original Message -----
From: "Jason E. Stewart" <ja...@openinformatics.com>
To: <xe...@xml.apache.org>
Sent: Monday, March 05, 2001 12:14 PM
Subject: Re: xerces-p for linux


> "Matthew D. Langston" <la...@SLAC.Stanford.EDU> writes:
>
> > Hello,
> >
> > I read your email exchanges from last December about the linux port of
> > xerces-p (see
> > http://archive.covalent.net/xml/xerces-p-dev/2000/12/).  I just did a
cvs
> > checkout of the xerces-p source tree, but it doesn't appear that the
linux
> > modifications have been folded in yet.
> >
> > May I ask you for your Linux diffs that add linux support to xerces-p
> > please?  Thank you :-)
>
> Even better, I'm in the process of checking in the 1.3 code into CVS
> as I type. I have to work out some permissions problem first, and then
> I'll alert the list on success.
>
> 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: xerces-p for linux

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Matthew D. Langston" <la...@SLAC.Stanford.EDU> writes:

> Hello,
> 
> I read your email exchanges from last December about the linux port of
> xerces-p (see
> http://archive.covalent.net/xml/xerces-p-dev/2000/12/).  I just did a cvs
> checkout of the xerces-p source tree, but it doesn't appear that the linux
> modifications have been folded in yet.
> 
> May I ask you for your Linux diffs that add linux support to xerces-p
> please?  Thank you :-)

Even better, I'm in the process of checking in the 1.3 code into CVS
as I type. I have to work out some permissions problem first, and then
I'll alert the list on success.

jas.