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 "Steven N. Hirsch" <hi...@btv.ibm.com> on 2001/11/28 19:08:17 UTC

Small patch to fix AIX compile

Jason,

This is necessary to avoid compilation errors using xlC on AIX.  Note that 
I'm not sure how to convince swig to generate this in the first place!  
I've used swig in the past, but always found it more painful than direct 
XS coding so I'm not up on the nitpicky details anymore.


*** Xerces.C.orig	Fri Nov  2 23:42:04 2001
--- Xerces.C	Thu Nov 15 11:15:55 2001
***************
*** 54384,54390 ****
  
  XS(_wrap_new_MemBufInputSource) {
      XMLByte *arg1 ;
!     unsigned int arg2 ;
      char *arg3 ;
      bool arg4 = false ;
      int argvi = 0;
--- 54384,54390 ----
  
  XS(_wrap_new_MemBufInputSource) {
      XMLByte *arg1 ;
!     STRLEN arg2 ;
      char *arg3 ;
      bool arg4 = false ;
      int argvi = 0;

I never did make any progress in getting an AIX build to pass all the 
tests.  So far I've tried xlC 3.6.6, VAC++ latest and the so-called "linux 
affinity" g++ for AIX 4.3.3.  The xlC build comes the closest to working, 
but exception propagation is quite broken for some of the tests.  VAC++ 
just gives the same result.  g++ is hopeless (module segfaults immediately 
on load) and would probably require a Perl built with gcc (mine are all 
built with xlc), as the standard AIX build uses loadAndInit() to perform 
static initialization of C++ constructs - failing miserably against g++ 
object output.

As soon as I figure out how to use the new idebug debugger, I'll try again 
to trace the problem.  xldb seems to have serious problems following the 
threading...


Steve

Obligatory Disclaimer:

"Not officially speaking for IBM Corporation"


-- 
----------------------------------------------------------------
Steven N. Hirsch       tie-line: 446-6557     ext: 802-769-6557

Staff Engineer                     Methodology Integration Team
ASIC Product Development           IBM Microelectronics
----------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Re: Small patch to fix AIX compile

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Steven N. Hirsch" <hi...@btv.ibm.com> writes:

> This is necessary to avoid compilation errors using xlC on AIX.  Note that 
> I'm not sure how to convince swig to generate this in the first place!  
> I've used swig in the past, but always found it more painful than direct 
> XS coding so I'm not up on the nitpicky details anymore.

In this case it should be as hard as:

* downloading SWIG-1.3.10 from www.swig.org
* installing it somewhere in your path
* export XERCES_DEVEL=1
* re-run 'perl Makefile.PL' and you should see a 'Welcome Xerces
  Developer!' output line
* modify Xerces.i, postModule.pl, or postSource.pl
* make

I've done all the nasty work in 
* Xerces.i: all the SWIG mappings
* postModule.pl: perl script to modify Xerces.pm after SWIG is done
* postSource.pl: perl script to modify Xerces.C after SWIG is done

In this case, you'd have to add something to postSource.pl.

> *** Xerces.C.orig	Fri Nov  2 23:42:04 2001
> --- Xerces.C	Thu Nov 15 11:15:55 2001
> ***************
> *** 54384,54390 ****
>   
>   XS(_wrap_new_MemBufInputSource) {
>       XMLByte *arg1 ;
> !     unsigned int arg2 ;
>       char *arg3 ;
>       bool arg4 = false ;
>       int argvi = 0;
> --- 54384,54390 ----
>   
>   XS(_wrap_new_MemBufInputSource) {
>       XMLByte *arg1 ;
> !     STRLEN arg2 ;
>       char *arg3 ;
>       bool arg4 = false ;
>       int argvi = 0;

Hmm... That's irritating that it can't cast this automatically. I'd
like to get a Xerces.C file that works on all architectures, so I
wonder if Linux will handle the STRLEN, if so I'll change it.

> I never did make any progress in getting an AIX build to pass all the 
> tests.  So far I've tried xlC 3.6.6, VAC++ latest and the so-called "linux 
> affinity" g++ for AIX 4.3.3.  The xlC build comes the closest to working, 
> but exception propagation is quite broken for some of the tests.  VAC++ 
> just gives the same result.  g++ is hopeless (module segfaults immediately 
> on load) and would probably require a Perl built with gcc (mine are all 
> built with xlc), as the standard AIX build uses loadAndInit() to perform 
> static initialization of C++ constructs - failing miserably against g++ 
> object output.
> 
> As soon as I figure out how to use the new idebug debugger, I'll try again 
> to trace the problem.  xldb seems to have serious problems following the 
> threading...

Wow. Thanks for the dedication! I'm not going to have much Xerces time
in the next couple of weeks, but please keep posting your results, and
I'll do what I can to help.

jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org