From Code Synthesis Wiki

Revision as of 21:21, 3 April 2009; view current revision
←Older revision | Newer revision→
Jump to: navigation, search

Version(s) of XercesC++ for the sample to run under Cygwin?

I am trying to build it under Cygwin, and I'm not sure which version of XercesC++ needs to be installed. You mention that 3.0.x behaves differently than previous versions, but it's not clear which one I need to have to make the sample files work. Can you clarify?

Fuhrmanator, 29 March 2009 (EDT)

With the proposed fix to the schema, both Xerces-C++ 2.8.0 and 3.0.x should work.

Boris 16:04, 31 March 2009 (EDT)

Ok - Cygwin compilation (using Xerces-2.8.x) gave us two problems, the first of which we found a work-around. However, the latter is tougher.

  • The generated code (DocumentIntelligenceCategoryCodeSimpleType.[ch]xx) has an enumeration that takes a value of SIGINT, which I think is a collision with the standard Unix-like signals. The error the compiler gives is something about an invalid constant defined in an enumeration. So, we just renamed that enum value in the generated code and that problem went away. Is there a better way to fix this in an XSD config file?
  • The ld (linker) command finally crashes with an "internal error" asking us to report it to the developers.

For the time being, we've decided to run Linux under VMWare so we can make some progress with this. We'll skin the Cygwin cat later...

Fuhrmanator 19:08, 1 April 2009 (EDT)

For the first problem there is the --reserved-name option which allows you to tell the XSD compiler that some names cannot be used in the generated code. I am not sure about the second problem. If you are not using a fairly recent version of Cygwin, you can try to upgrade. One thing that is "unusual" about the linking process is the number of object files. You may want to try to create a static library (e.g., 'ar rc libitl.a out/*.o') and then link that to the executable.

Boris 02:08, 2 April 2009 (EDT)

The static library approach with 'ar' as described above is unsuccessful, as there is not enough memory for 'ar' to finish (it gives an accurate error message about memory being exhausted). So, Cygwin is proving problematic with ANSI/NIST ITL object files because of memory constraints. Increasing memory space for Cygwin applications doesn't seem to be obvious, as documented in this discussion. Any suggestions?
Fuhrmanator 16:48, 3 April 2009 (EDT)
I will try it on Cygwin and see if I can figure a way to link things together. Will let you know how it goes.
Boris 17:21, 3 April 2009 (EDT)

Thanks again for the pointers. We tried compiling under Ubuntu 8.10 and got an "collect2: ld terminated with signal 9 [Killed]" error -- Googling that error gets us info that implies we are running out of heap during the link. So, we're upping the memory allocation on the VMWare and trying again. Just keeping this info here in the event it will help others.

Fuhrmanator 12:02, 2 April 2009 (EDT)

Thanks, this can definitely be helpful to others. FYI, my machine has 3GB of RAM and everything compiles and links without a problem.

Boris 12:11, 2 April 2009 (EDT)

The SIGINT enum value seems to be a non-issue when compiling the code in Linux. I successfully generated the code and compiled it without adding the --reserved-name option.

Zhutzell 12:52, 2 April 2009 (EDT)

Personal tools