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 John Utz <ut...@singingfish.com> on 2002/02/22 03:46:44 UTC
Partial Success, further problems, need a preSwig.pl! Re: porting
SEnumVal.cpp to XML::Xerces 1.6
Ok,
so using the new stuff that is in CVS and that got me to my next bug, of
course!
here is the updated version:
#!/usr/bin/perl -w
use strict;
use XML::Xerces;
use Getopt::Long;
use vars qw($opt_v $opt_n);
my $USAGE = <<EOU;
USAGE: $0 xmlfilename
EOU
my $VERSION = q[$Id: SEnumVal.pl,v 1.1 2002/02/16 12:12:12 johnu Exp $ ];
die $USAGE unless scalar @ARGV;
my $xmlfile = $ARGV[0];
-f $xmlfile or die "File '$xmlfile' doesnt exist!\n";
my $saxParser = XML::Xerces::SAXParser->new();
my $handler = XML::Xerces::PerlErrorHandler->new();
$saxParser->setValidationScheme($XML::Xerces::SAXParser::Val_Always);
$saxParser->setDoSchema(1);
$saxParser->setDoNamespaces(1);
$saxParser->setErrorHandler($handler);
$saxParser->parse(XML::Xerces::LocalFileInputSource->new($xmlfile));
die "Errors Occurred\n" if($saxParser->getErrorCount());
die "Non schema Doc, no output available\n"
if(!$saxParser->getValidator()->handlesSchema());
die "Non schema grammar, no output available\n"
if( $saxParser->getValidator()->getGrammar()->getGrammarType() !=
$XML::Xerces::Grammar::SchemaGrammarType );
my $grammar = $saxParser->getValidator()->getGrammar();
print "GRAMMAR: $grammar\n";
my $elemEnum = $grammar->getElemEnumerator();
here is the error:
bash-2.04$ ./SEnumval.pl
../../Compile/XML-Xerces-1.6.0_0/samples/personal-schema.xml
GRAMMAR: XML::Xerces::Grammar=HASH(0x8103790)
Can't locate auto/XML/Xerces/Grammar/getElemEnum.al in @INC (@INC
contains: /usr/local/lib/perl5/5.6.1/i686-linux /usr/local/lib/perl5/5.6.1
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at
./SEnumval.pl line 43
so, i went to work flexing my SWIG muscles. I grepped for the
implementation of getElemEnumerator and found 2 of them, one for Schema
and one for DTD's. So i included them both at the top and the bottom:
#include "validators/DTD/DTDGrammar.hpp"
#include "validators/schema/SchemaGrammar.hpp"
<....>
// support schema content model parsing
%include "validators/DTD/DTDGrammar.hpp"
%include "validators/schema/SchemaGrammar.hpp"
and then i installed the latest version of swig via perl -e -MCPAN
and i set XERCES_DEVEL in my environment;
but i can build anything because it now wants preSwig.pl
bash-2.04$ make
preSwig.pl --directory ./Xerces_headers
/usr/local/include/xerces/framework/StdInInputSource.hpp
make: preSwig.pl: Command not found
make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 127
so, whither preSwig.pl?
On 21 Feb 2002, (Jason E. Stewart) wrote:
> "John Utz" <ut...@singingfish.com> writes:
>
> > i think that the deal is that the first one will be hard and you'll
> > need to talk me thru it, but after that it should make sense.
> >
> > i noted with interest the speed in which you fixed the issue when i raised
> > it yesterday....
>
> I'll be happy to do that. Plus if we have the conversation on the
> list, it's archived and other folks can do it as well...
>
> > ps: now, what's *really* gonna suck is getting this ported to win32.
> >
> > that is where i have to ultimately run this thing. i am pretty concerned
> > about that because i cant get any answer from the guy that was allegedly
> > porting xerces-c to cygwin.
>
> Ilya Sterin has been working on a straight win32 port using VC++. He's
> the one to bug.
>
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:
> i used 1.3.9. and i hacked in the mysteriously nonexistent char
> *file = (char *) __FILE__;
That's very suspicious. I've never had to do that with SWIG. It seems
like something in postSource.pl has gone wrong. You should just run
the swig command by hand and compare the output of that file with the
Xerces.C file you got after postSource.pl operated.
> now i get this, which is something that i recognize, so maybe it means
> that i need to add some more headers:
>
> Xerces.C:68799: no matching function for call to
yes, it seems so.
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: this is the part of preSwig.pl that is broken Re: more swig
stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting
SEnumVal.cpp to XML::Xerces 1.6
Posted by John Utz <ut...@singingfish.com>.
On 22 Feb 2002, (Jason E. Stewart) wrote:
> "John Utz" <ut...@singingfish.com> writes:
>
> > On 22 Feb 2002, (Jason E. Stewart) wrote:
> >
> > > "John Utz" <ut...@singingfish.com> writes:
> > >
> > > > was i supposed to get about 80-bajillion warnings?
> > >
> > > Yeah, that's swig, sorry.
> > >
> > > > it might be good to have you try this with the 1.3.11 version at
> > > > this point and then i'll just recreate my work from there.
> > >
> > > I warn you, I'm pretty sure anything later than 1.3.9 will give you
> > > trouble - your call
> >
> > ohh, you mean i want to get an *older* version, not a newer version. i
> > misunderstood.
> >
> > > > oh shit. the build just died:
> > > >
> > > > /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:
> > > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> > > > (const
> > > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> > > > Xerces.C: In function `void boot_XML__Xerces (CV *)':
> > > > Xerces.C:72926: `file' undeclared (first use this function)
> > >
> > > Hmmm... You should have something that looks like:
> > >
> > > XS(SWIG_init) {
> > > dXSARGS;
> > > int i;
> > > char *file = (char *) __FILE__;
> > >
> > > What do you have?
> >
> > where should this be? i cant find it in Xerces.C
>
> At the line of the error, 72926. You probably want to grab 1.3.9
i used 1.3.9.
and i hacked in the mysteriously nonexistent char *file = (char *) __FILE__;
now i get this, which is something that i recognize, so maybe it means
that i need to add some more headers:
Xerces.C:68799: no matching function for call to
`NameIdPoolEnumerator<DTDElementDecl>::NameIdPoolEnumerator ()'
/usr/local/include/xerces/util/NameIdPool.c:342: candidates are:
NameIdPoolEnumerator<TElem>::NameIdPoolEnumerator (NameIdPool<TElem>
*) [with TE
lem = DTDElementDecl]
/usr/local/include/xerces/util/NameIdPool.c:358:
NameIdPoolEnumerator<TElem>::NameIdPoolEnumerator (const
NameIdPoolEnumerator<TE
lem> &) [with TElem =
DTDElementDecl]
Xerces.C: In function `void _wrap_DTDGrammar_getNotationEnumerator (CV
*)':
Xerces.C:68847: no matching function for call to
`NameIdPoolEnumerator<XMLNotationDecl>::NameIdPoolEnumerator ()'
/usr/local/include/xerces/util/NameIdPool.c:342: candidates are:
NameIdPoolEnumerator<TElem>::NameIdPoolEnumerator (NameIdPool<TElem>
*) [with TE
lem = XMLNotationDecl]
/usr/local/include/xerces/util/NameIdPool.c:358:
NameIdPoolEnumerator<TElem>::NameIdPoolEnumerator (const
NameIdPoolEnumerator<TE
lem> &) [with TElem =
XMLNotationDecl]
Xerces.C: In function `void _wrap_SchemaGrammar_getElemEnumerator (CV
*)':
Xerces.C:70049: no matching function for call to
`RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
()'
/usr/local/include/xerces/util/RefHash3KeysIdPool.c:393: candidates are:
RefHash3KeysIdPoolEnumerator<TVal>::RefHash3KeysIdPoolEnumerator
(RefHash3KeysId
Pool<TVal> *, bool =
false) [with TVal = SchemaElementDecl]
/usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:
RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
(c
onst
RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
Xerces.C: In function `void boot_XML__Xerces (CV *)':
Xerces.C:72896: warning: unused variable `I32 items'
/usr/local/include/xerces/util/RefHash3KeysIdPool.c: At top level:
Xerces.C:137: warning: `swig_type_info *SWIG_TypeQuery (const char *)'
defined but not used
Xerces.C:664: warning: `int swig_magic_readonly (SV *, MAGIC *)'
defined but not used
make: *** [Xerces.o] Error 1
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: this is the part of preSwig.pl that is broken Re: more swig
stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting
SEnumVal.cpp to XML::Xerces 1.6
Posted by John Utz <ut...@singingfish.com>.
On 22 Feb 2002, (Jason E. Stewart) wrote:
> "John Utz" <ut...@singingfish.com> writes:
>
> > On 22 Feb 2002, (Jason E. Stewart) wrote:
> >
> > > "John Utz" <ut...@singingfish.com> writes:
> > >
> > > > was i supposed to get about 80-bajillion warnings?
> > >
> > > Yeah, that's swig, sorry.
> > >
> > > > it might be good to have you try this with the 1.3.11 version at
> > > > this point and then i'll just recreate my work from there.
> > >
> > > I warn you, I'm pretty sure anything later than 1.3.9 will give you
> > > trouble - your call
> >
> > ohh, you mean i want to get an *older* version, not a newer version. i
> > misunderstood.
> >
> > > > oh shit. the build just died:
> > > >
> > > > /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:
> > > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> > > > (const
> > > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> > > > Xerces.C: In function `void boot_XML__Xerces (CV *)':
> > > > Xerces.C:72926: `file' undeclared (first use this function)
> > >
> > > Hmmm... You should have something that looks like:
> > >
> > > XS(SWIG_init) {
> > > dXSARGS;
> > > int i;
> > > char *file = (char *) __FILE__;
> > >
> > > What do you have?
> >
> > where should this be? i cant find it in Xerces.C
>
> At the line of the error, 72926. You probably want to grab 1.3.9
i already did, and i get the same error.
i just found the spot where it's missing. i am hacking it in now
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:
> On 22 Feb 2002, (Jason E. Stewart) wrote:
>
> > "John Utz" <ut...@singingfish.com> writes:
> >
> > > was i supposed to get about 80-bajillion warnings?
> >
> > Yeah, that's swig, sorry.
> >
> > > it might be good to have you try this with the 1.3.11 version at
> > > this point and then i'll just recreate my work from there.
> >
> > I warn you, I'm pretty sure anything later than 1.3.9 will give you
> > trouble - your call
>
> ohh, you mean i want to get an *older* version, not a newer version. i
> misunderstood.
>
> > > oh shit. the build just died:
> > >
> > > /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:
> > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> > > (const
> > > RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> > > Xerces.C: In function `void boot_XML__Xerces (CV *)':
> > > Xerces.C:72926: `file' undeclared (first use this function)
> >
> > Hmmm... You should have something that looks like:
> >
> > XS(SWIG_init) {
> > dXSARGS;
> > int i;
> > char *file = (char *) __FILE__;
> >
> > What do you have?
>
> where should this be? i cant find it in Xerces.C
At the line of the error, 72926. You probably want to grab 1.3.9
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: this is the part of preSwig.pl that is broken Re: more swig
stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting
SEnumVal.cpp to XML::Xerces 1.6
Posted by John Utz <ut...@singingfish.com>.
On 22 Feb 2002, (Jason E. Stewart) wrote:
> "John Utz" <ut...@singingfish.com> writes:
>
> > was i supposed to get about 80-bajillion warnings?
>
> Yeah, that's swig, sorry.
>
> > it might be good to have you try this with the 1.3.11 version at
> > this point and then i'll just recreate my work from there.
>
> I warn you, I'm pretty sure anything later than 1.3.9 will give you
> trouble - your call
ohh, you mean i want to get an *older* version, not a newer version. i
misunderstood.
> > oh shit. the build just died:
> >
> > /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:
> > RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> > (const
> > RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> > Xerces.C: In function `void boot_XML__Xerces (CV *)':
> > Xerces.C:72926: `file' undeclared (first use this function)
>
> Hmmm... You should have something that looks like:
>
> XS(SWIG_init) {
> dXSARGS;
> int i;
> char *file = (char *) __FILE__;
>
> What do you have?
where should this be? i cant find it in Xerces.C
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:
> was i supposed to get about 80-bajillion warnings?
Yeah, that's swig, sorry.
> it might be good to have you try this with the 1.3.11 version at
> this point and then i'll just recreate my work from there.
I warn you, I'm pretty sure anything later than 1.3.9 will give you
trouble - your call
> oh shit. the build just died:
>
> /usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:
> RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
> (const
> RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
> Xerces.C: In function `void boot_XML__Xerces (CV *)':
> Xerces.C:72926: `file' undeclared (first use this function)
Hmmm... You should have something that looks like:
XS(SWIG_init) {
dXSARGS;
int i;
char *file = (char *) __FILE__;
What do you have?
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: this is the part of preSwig.pl that is broken Re: more swig
stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting
SEnumVal.cpp to XML::Xerces 1.6
Posted by John Utz <ut...@singingfish.com>.
was i supposed to get about 80-bajillion warnings?
it might be good to have you try this with the 1.3.11 version at this
point and then i'll just recreate my work from there.
oh shit. the build just died:
/usr/local/include/xerces/validators/schema/SchemaGrammar.hpp:338:
RefHash3KeysIdPoolEnumerator<SchemaElementDecl>::RefHash3KeysIdPoolEnumerator
(const
RefHash3KeysIdPoolEnumerator<SchemaElementDecl> &)
Xerces.C: In function `void boot_XML__Xerces (CV *)':
Xerces.C:72926: `file' undeclared (first use this function)
Xerces.C:72926: (Each undeclared identifier is reported only once for
each function it appears in.)
Xerces.C:72896: warning: unused variable `I32 items'
/usr/local/include/xerces/util/RefHash3KeysIdPool.c: At top level:
Xerces.C:137: warning: `swig_type_info *SWIG_TypeQuery (const char *)'
defined but not used
Xerces.C:664: warning: `int swig_magic_readonly (SV *, MAGIC *)'
defined but not used
make: *** [Xerces.o] Error 1
bash-2.04$
On 22 Feb 2002, (Jason E. Stewart) wrote:
> "John Utz" <ut...@singingfish.com> writes:
>
> > > You're inadvertantly using Xerces-C from CVS which has the new
> > > directory structure, i.e there is now a xerces/ directory before
> > > the src/ directory. That is for Xerces-C-1.7 which I haven't
> > > *even* begun to look at yet. You'll have to use the 1.6 source
> > > tarball for now unless you want to patch preSWIG.pl up to use the
> > > new directory hierarchy on your own.
> >
> > thats what i am doing. but i am not using the cvs xerces-c, it's just that
> > i put the xerces includes in /usr/include/xerces by hand.
>
> Ah, Ok.
>
> > now i have a new error that i think relates to your confusion about me
> > being able to get a swig from CPAN.
>
> I looked and the version in CPAN is 1.1p5 which is three years
> old. You definately want a newer one. Try 1.3.10, and if that gives
> you trouble let me know, and I'll upgrade the Xerces.i file to the
> latest version.
>
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: this is the part of preSwig.pl that is broken Re: more swig
stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting
SEnumVal.cpp to XML::Xerces 1.6
Posted by John Utz <ut...@singingfish.com>.
On 22 Feb 2002, (Jason E. Stewart) wrote:
> "John Utz" <ut...@singingfish.com> writes:
>
> > > You're inadvertantly using Xerces-C from CVS which has the new
> > > directory structure, i.e there is now a xerces/ directory before
> > > the src/ directory. That is for Xerces-C-1.7 which I haven't
> > > *even* begun to look at yet. You'll have to use the 1.6 source
> > > tarball for now unless you want to patch preSWIG.pl up to use the
> > > new directory hierarchy on your own.
> >
> > thats what i am doing. but i am not using the cvs xerces-c, it's just that
> > i put the xerces includes in /usr/include/xerces by hand.
>
> Ah, Ok.
>
> > now i have a new error that i think relates to your confusion about me
> > being able to get a swig from CPAN.
>
> I looked and the version in CPAN is 1.1p5 which is three years
> old. You definately want a newer one. Try 1.3.10, and if that gives
> you trouble let me know, and I'll upgrade the Xerces.i file to the
> latest version.
they just released a 1.3.11 so i am trying that now....
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:
> > You're inadvertantly using Xerces-C from CVS which has the new
> > directory structure, i.e there is now a xerces/ directory before
> > the src/ directory. That is for Xerces-C-1.7 which I haven't
> > *even* begun to look at yet. You'll have to use the 1.6 source
> > tarball for now unless you want to patch preSWIG.pl up to use the
> > new directory hierarchy on your own.
>
> thats what i am doing. but i am not using the cvs xerces-c, it's just that
> i put the xerces includes in /usr/include/xerces by hand.
Ah, Ok.
> now i have a new error that i think relates to your confusion about me
> being able to get a swig from CPAN.
I looked and the version in CPAN is 1.1p5 which is three years
old. You definately want a newer one. Try 1.3.10, and if that gives
you trouble let me know, and I'll upgrade the Xerces.i file to the
latest version.
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: this is the part of preSwig.pl that is broken Re: more swig
stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting
SEnumVal.cpp to XML::Xerces 1.6
Posted by John Utz <ut...@singingfish.com>.
On 22 Feb 2002, (Jason E. Stewart) wrote:
> "John Utz" <ut...@singingfish.com> writes:
>
> > i added the prints for debugging because i am too lame to use the
> > debugger:
> >
> > my $path;
> > ($file,$path) = fileparse($file);
> >
> > print "PATH:$path\n";
> >
> > $path =~ s|^.*/include/||;
> >
> > print "PATH:$path\n";
> >
> >
> > bash-2.04$ make
> > ./preSwig.pl --directory ./Xerces_headers
> > /usr/local/include/xerces/framework/StdInInputSource.hpp
> > PATH:/usr/local/include/xerces/framework/
> > PATH:xerces/framework/
> > Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
> > writing at ./preSwig.pl line 44.
> >
> >
> > needs another s// step to get rid of the last slash methinks...
>
> Actually the // isn't the problem. The problem is the 'xerces' in the
> path.
:-)
yah, as soon as i did the prints i figured that out.
> You're inadvertantly using Xerces-C from CVS which has the new
> directory structure, i.e there is now a xerces/ directory before the
> src/ directory. That is for Xerces-C-1.7 which I haven't *even* begun
> to look at yet. You'll have to use the 1.6 source tarball for now
> unless you want to patch preSWIG.pl up to use the new directory
> hierarchy on your own.
thats what i am doing. but i am not using the cvs xerces-c, it's just that
i put the xerces includes in /usr/include/xerces by hand.
now i have a new error that i think relates to your confusion about me
being able to get a swig from CPAN.
bash-2.04$ make
swig -DVERSION="1.6.0_0" -I. -IHandler -I/usr/local/include/xerces
-package XML::Xerces -perl5 -c++ -shadow -o Xerces.C Xerces.i
/bin/sh: swig: command not found
make: *** [Xerces.C] Error 127
so, now i am gonna go get the 'right' swig dist and take a peek and figure
out what happens.
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: this is the part of preSwig.pl that is broken Re: more swig stuffRe: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:
> i added the prints for debugging because i am too lame to use the
> debugger:
>
> my $path;
> ($file,$path) = fileparse($file);
>
> print "PATH:$path\n";
>
> $path =~ s|^.*/include/||;
>
> print "PATH:$path\n";
>
>
> bash-2.04$ make
> ./preSwig.pl --directory ./Xerces_headers
> /usr/local/include/xerces/framework/StdInInputSource.hpp
> PATH:/usr/local/include/xerces/framework/
> PATH:xerces/framework/
> Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
> writing at ./preSwig.pl line 44.
>
>
> needs another s// step to get rid of the last slash methinks...
Actually the // isn't the problem. The problem is the 'xerces' in the
path. You're inadvertantly using Xerces-C from CVS which has the new
directory structure, i.e there is now a xerces/ directory before the
src/ directory. That is for Xerces-C-1.7 which I haven't *even* begun
to look at yet. You'll have to use the 1.6 source tarball for now
unless you want to patch preSWIG.pl up to use the new directory
hierarchy on your own.
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
this is the part of preSwig.pl that is broken Re: more swig stuffRe:
Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp
to XML::Xerces 1.6
Posted by John Utz <ut...@singingfish.com>.
i added the prints for debugging because i am too lame to use the
debugger:
my $path;
($file,$path) = fileparse($file);
print "PATH:$path\n";
$path =~ s|^.*/include/||;
print "PATH:$path\n";
bash-2.04$ make
./preSwig.pl --directory ./Xerces_headers
/usr/local/include/xerces/framework/StdInInputSource.hpp
PATH:/usr/local/include/xerces/framework/
PATH:xerces/framework/
Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
writing at ./preSwig.pl line 44.
needs another s// step to get rid of the last slash methinks...
On Fri, 22 Feb 2002, John Utz wrote:
> Hi all;
>
> On 22 Feb 2002, (Jason E. Stewart) wrote:
>
> > "John Utz" <ut...@singingfish.com> writes:
> >
> > > so, i went to work flexing my SWIG muscles. I grepped for the
> > > implementation of getElemEnumerator and found 2 of them, one for
> > > Schema and one for DTD's. So i included them both at the top and the
> > > bottom:
> > >
> > > #include "validators/DTD/DTDGrammar.hpp"
> > > #include "validators/schema/SchemaGrammar.hpp"
> > >
> > > <....>
> > >
> > > // support schema content model parsing
> > > %include "validators/DTD/DTDGrammar.hpp"
> > > %include "validators/schema/SchemaGrammar.hpp"
> >
> > That looks good.
> >
> > > and then i installed the latest version of swig via perl -e -MCPAN
> >
> > ???
> >
> > SWIG is not available via CPAN to my knowledge. You'll have to get it
> > at www.swig.org, or install a package from redhat or debian (if you're
> > using either of those linux distro's).
>
> nope. 'tis. it's listed as swig, not SWIG. i didnt find it until i tried
> it that way.
>
> > WORD OF WARNING: There was someone who posted to the list a bit
> > earlier that my Xerces.i interface file isn't working with the latest
> > version of SWIG. I'm using a version checked out from CVS that claims
> > to be 1.3.10
> >
> > > and i set XERCES_DEVEL in my environment;
> > >
> > > but i can build anything because it now wants preSwig.pl
> > >
> > > bash-2.04$ make
> > > preSwig.pl --directory ./Xerces_headers
> > > /usr/local/include/xerces/framework/StdInInputSource.hpp
> > > make: preSwig.pl: Command not found
> > > make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 127
> > >
> > > so, whither preSwig.pl?
> >
> > right where you think it is, along side Xerces.pm, Xerces.C and
> > Xerces.pm. The problem is, I've hard coded /usr/local/bin/perl, and
> > you probably want to change that to be /usr/bin/perl or somesuch.
>
> doh! why didnt i look? what a git.
>
> but, the error still occured until i went into the generated makefile and
>
> fixed the call to be ./preSwig.pl instead of preswig.pl
>
> so, now preSwig.pl is barfing because it's magically managed to add an
> extra PATHSEP '/' to the file invocation.
>
> bash-2.04$ make
> ./preSwig.pl --directory ./Xerces_headers
> /usr/local/include/xerces/framework/StdInInputSource.hpp
> Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
> writing at ./preSwig.pl line 39.
> make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 2
> bash-2.04$
>
>
> this is so weird, because this *usually* occurs because somebody did
> something like this
>
> export FOO=/bar/baz/
>
> export FULLPATH=$FOO/path
>
> which would evaluate to
>
> /bar/baz//path.
>
> but i cant seem to find an instance of this occuring....
>
> > jas.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
more swig stuffRe: Partial Success, further problems, need a
preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6
Posted by John Utz <ut...@singingfish.com>.
Hi all;
On 22 Feb 2002, (Jason E. Stewart) wrote:
> "John Utz" <ut...@singingfish.com> writes:
>
> > so, i went to work flexing my SWIG muscles. I grepped for the
> > implementation of getElemEnumerator and found 2 of them, one for
> > Schema and one for DTD's. So i included them both at the top and the
> > bottom:
> >
> > #include "validators/DTD/DTDGrammar.hpp"
> > #include "validators/schema/SchemaGrammar.hpp"
> >
> > <....>
> >
> > // support schema content model parsing
> > %include "validators/DTD/DTDGrammar.hpp"
> > %include "validators/schema/SchemaGrammar.hpp"
>
> That looks good.
>
> > and then i installed the latest version of swig via perl -e -MCPAN
>
> ???
>
> SWIG is not available via CPAN to my knowledge. You'll have to get it
> at www.swig.org, or install a package from redhat or debian (if you're
> using either of those linux distro's).
nope. 'tis. it's listed as swig, not SWIG. i didnt find it until i tried
it that way.
> WORD OF WARNING: There was someone who posted to the list a bit
> earlier that my Xerces.i interface file isn't working with the latest
> version of SWIG. I'm using a version checked out from CVS that claims
> to be 1.3.10
>
> > and i set XERCES_DEVEL in my environment;
> >
> > but i can build anything because it now wants preSwig.pl
> >
> > bash-2.04$ make
> > preSwig.pl --directory ./Xerces_headers
> > /usr/local/include/xerces/framework/StdInInputSource.hpp
> > make: preSwig.pl: Command not found
> > make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 127
> >
> > so, whither preSwig.pl?
>
> right where you think it is, along side Xerces.pm, Xerces.C and
> Xerces.pm. The problem is, I've hard coded /usr/local/bin/perl, and
> you probably want to change that to be /usr/bin/perl or somesuch.
doh! why didnt i look? what a git.
but, the error still occured until i went into the generated makefile and
fixed the call to be ./preSwig.pl instead of preswig.pl
so, now preSwig.pl is barfing because it's magically managed to add an
extra PATHSEP '/' to the file invocation.
bash-2.04$ make
./preSwig.pl --directory ./Xerces_headers
/usr/local/include/xerces/framework/StdInInputSource.hpp
Couldn't open ./Xerces_headers/xerces/framework//StdInInputSource.hpp for
writing at ./preSwig.pl line 39.
make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 2
bash-2.04$
this is so weird, because this *usually* occurs because somebody did
something like this
export FOO=/bar/baz/
export FULLPATH=$FOO/path
which would evaluate to
/bar/baz//path.
but i cant seem to find an instance of this occuring....
> jas.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
Re: Partial Success, further problems, need a preSwig.pl! Re: porting SEnumVal.cpp to XML::Xerces 1.6
Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"John Utz" <ut...@singingfish.com> writes:
> so, i went to work flexing my SWIG muscles. I grepped for the
> implementation of getElemEnumerator and found 2 of them, one for
> Schema and one for DTD's. So i included them both at the top and the
> bottom:
>
> #include "validators/DTD/DTDGrammar.hpp"
> #include "validators/schema/SchemaGrammar.hpp"
>
> <....>
>
> // support schema content model parsing
> %include "validators/DTD/DTDGrammar.hpp"
> %include "validators/schema/SchemaGrammar.hpp"
That looks good.
> and then i installed the latest version of swig via perl -e -MCPAN
???
SWIG is not available via CPAN to my knowledge. You'll have to get it
at www.swig.org, or install a package from redhat or debian (if you're
using either of those linux distro's).
WORD OF WARNING: There was someone who posted to the list a bit
earlier that my Xerces.i interface file isn't working with the latest
version of SWIG. I'm using a version checked out from CVS that claims
to be 1.3.10
> and i set XERCES_DEVEL in my environment;
>
> but i can build anything because it now wants preSwig.pl
>
> bash-2.04$ make
> preSwig.pl --directory ./Xerces_headers
> /usr/local/include/xerces/framework/StdInInputSource.hpp
> make: preSwig.pl: Command not found
> make: *** [Xerces_headers/framework/StdInInputSource.hpp] Error 127
>
> so, whither preSwig.pl?
right where you think it is, along side Xerces.pm, Xerces.C and
Xerces.pm. The problem is, I've hard coded /usr/local/bin/perl, and
you probably want to change that to be /usr/bin/perl or somesuch.
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org