Title: Problem building Xerces 2.1 on Solaris 8

Hi,

I had a problem building Xerces 2.1 on Solaris 8. The exact OS and compiler versions are indicated below:

smte420s041:~<1> uname -a
SunOS smte420s041 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-80

smte420s041:~<2> CC -V
CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111685-03 2001/10/19

I ran the runConfigure command as:

runConfigure -psolaris -ccc -xCC -minmem -nsocket -ticu –rpthread –b64

ICU 2.2 + latest patch was built without any problem and ICUROOT set to the appropriate location etc.

The make for Xerces itself ran without failure. I then built Xalan 1.4 against it and make for the Xalan lib was successful as well. However, linking the Xalan test executables (testXPath, Xalan etc) gave a number of undefined symbols from the Xerces library. On doing nm on the Xerces library, it turned out that for all functions involving templates, only the calls to these functions were present in library. The implementations for these functions were completely missing. I'm giving some examples of the undefined symbols below. The actual list contains too many to include here, the only thing in common being they're template instantiations.

bool RefHashTableOfEnumerator<Grammar>::hasMoreElements()const
bool RefHashTableOfEnumerator<DTDAttDef>::hasMoreElements()const
bool RefHashTableOfEnumerator<KeyRefPair<void,DOMUserDataHandler> >::hasMoreElements()const
bool RefHashTableOfEnumerator<ValueStore>::hasMoreElements()const
bool RefHashTableOfEnumerator<XMLRefInfo>::hasMoreElements()const
bool RefHashTableOfEnumerator<KVStringPair>::hasMoreElements()const
bool RefHashTableOfEnumerator<ComplexTypeInfo>::hasMoreElements()const
bool RefHashTableOfEnumerator<XercesGroupInfo>::hasMoreElements()const

Suspecting something bad related to templates, I did some research and found the macro XERCES_TMPLINC defined in Makefile.incl only for HP-UX. I did a make clean for Xerces and re-ran runConfigure for Xerces as:

runConfigure -psolaris -ccc -xCC -minmem -nsocket -ticu –rpthread –b64 -z-DXERCES_TMPLINC

and did a complete Xerces and Xalan build.

    (As an aside, for some reason when doing such a Xerces build, it failed for DOMDocumentImpl.cpp.

    "DOMDeepNodeListPool.c", line 66: Error: Could not open include file <xercesc/dom/impl/DOMDeepNodeListPool.hpp>

    I had to fix it by running the following commands:

    cp $XERCESCROOT/src/xercesc/dom/impl/DOMDeepNodeListImpl.hpp $XERCESCROOT/include/xercesc/dom/impl
    cp $XERCESCROOT/src/xercesc/dom/impl/DOMDeepNodeListPool.hpp $XERCESCROOT/include/xercesc/dom/impl

    I have no idea why these headers didn't get put in the include directory properly.)

This time the Xalan samples built perfectly fine with no undefined symbols. Doing nm on the Xerces lib showed that all the previously missing functions were now present. Having to do all these non-default hacks has me concerned. Why did the template code not build with the default options? Could something be wrong with my compiler setup? Why isn't XERCES_TMPL not defined for Solaris, and if I force it to be defined, do I really know that the library I built is good?

Thanks,
- Chandu

Reply via email to