Operating System - HP-UX
1753903 Members
10244 Online
108810 Solutions
New Discussion юеВ

Re: xerces build using gnu g++ error -- forward declaration error.

 
Shinji Teragaito_1
Respected Contributor

Re: xerces build using gnu g++ error -- forward declaration error.

It looks like even libxerces-c.sl generated by gcc/g++ has the
same problem. On the other hand, libxerces-c.sl generated by
cc/aCC doesn't have the problem.

Double-checking the changes may be needed for gcc/g++.
Dennis Handly
Acclaimed Contributor

Re: xerces build using gnu g++ error -- forward declaration error.

>Shinji: On the other hand, libxerces-c.sl generated by cc/aCC doesn't have the problem.

This may help. Are those references in those object files also in the aC++ version? If so, does the aC++ version also have definitions elsewhere?

Linking with -Wl,-ymangled-symbol-name would show both.

Or you can use nm to find them:
nm -pxAN lib*.a *.o | grep ValueVectorOf | grep removeAllElements
uiqbal
Advisor

Re: xerces build using gnu g++ error -- forward declaration error.

Thanks Shinji and Dennins for all your help.

I have just played a little bit more with it and now my "link line" is changed to have xerceslib.a as first archive to link with, given below -- and i think it feels a lot better now, before there were 100s of error even referring to xercelib itself like "one of the errors before" given below

Now the problem is that i get definite link errors, which amount to 78, called "new link error" given below and all the linking errors are with my source code which is better then before where there was linking error from with xerces itself.

The out of nm command for "new unsatisfied symbols" is given below at the end in order and it shows that the AbstractDOMParser::parse is available in the xerceslib.a but my link line can't link to it in two places given right below from the 78 errors
../xml/crxml001.a[xmlmatchlistm4dwdrxml.o]
../ddl/crddl001.a[ddli_docimplm4dwddl.o]

Regards,
RUI


link line:
-----------
g++ -o ../cr_api_test.hp -lstdc++ -lX11 -L. -L../ -Wall -Wno-deprecated -lpthread -lm -lsec -lnsl -lrt -L/usr/X11R6/lib ../xerceslib.a ../crxrdlin/crreadline01.a ../unittest/crunittest001.a ../dwmonitor/crdwmonitor001.a ../dwmonitor/systemmonitor/crsysmon001.a ../common/crcommon01.a




one of the errors before:
------------------------
ld: Unsatisfied symbol "xercesc_2_5::RefStackOf<:domnode>::empty()" in file ../xerceslib.a[DOMDocumentImpl.o]




new link error:
--------------
ld: Unsatisfied symbol "xercesc_2_5::XMLPlatformUtils::Terminate()" in file ../ddl/crddl001.a[ddli_interfacem4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLUni::fgDOMWRTFormatPrettyPrint" in file ../ddl/crddl001.a[ddli_docimplm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::DOMImplementation::loadDOMExceptionMsg(xercesc_2_5::DOMException::ExceptionCode, unsigned short*, unsigned int)" in file ../comms/crcomms01.a[xmlapireqrep.o]
ld: Unsatisfied symbol "xercesc_2_5::DTDEntityDecl::getProtoType() const" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "typeinfo for xercesc_2_5::XMLException" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::lowerCase(unsigned short*)" in file ../ddl/crddl001.a[unicode_stringm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::Match::Match(xercesc_2_5::MemoryManager*)" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMemory::operator delete(void*)" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "typeinfo for xercesc_2_5::BinInputStream" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::SAXParseException::SAXParseException(xercesc_2_5::SAXParseException const&)" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLUni::fgArrayIndexOutOfBoundsException_Name" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::Match::~Match()" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLPlatformUtils::fgMemoryManager" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "typeinfo for xercesc_2_5::XMLEntityDecl" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::DTDEntityDecl::isSerializable() const" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::LocalFileInputSource::LocalFileInputSource(unsigned short const*, xercesc_2_5::MemoryManager*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::StdOutFormatTarget::StdOutFormatTarget()" in file ../ddl/crddl001.a[ddli_docimplm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLException::loadExceptText(xercesc_2_5::XMLExcepts::Codes)" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::AbstractDOMParser::setDoNamespaces(bool)" in file ../xml/crxml001.a[xmlmatchlistm4dwdrxml.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLFormatter::~XMLFormatter()" in file ../ddl/crddl001.a[event_driven_xml_writerm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLException::XMLException(char const*, unsigned int, xercesc_2_5::MemoryManager*)" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLRefInfo::getProtoType() const" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XercesDOMParser::setErrorHandler(xercesc_2_5::ErrorHandler*)" in file ../xml/crxml001.a[xmlmatchlistm4dwdrxml.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLRefInfo::isSerializable() const" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::transcode(char const*, unsigned short*, unsigned int, xercesc_2_5::MemoryManager*)" in file ../ddl/crddl001.a[ddli_docimplm4dwddl.o]
ld: Unsatisfied symbol "typeinfo for xercesc_2_5::DOMException" in file ../ddl/crddl001.a[ddli_docimplm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLAttDefList::getProtoType() const" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::InputSource::setEncoding(unsigned short const*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::InputSource::InputSource(unsigned short const*, xercesc_2_5::MemoryManager*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::AbstractDOMParser::adoptDocument()" in file ../comms/crcomms01.a[xmlapireqrep.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLRefInfo::serialize(xercesc_2_5::XSerializeEngine&)" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::InputSource::~InputSource()" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLFormatter::formatBuf(unsigned short const*, unsigned int, xercesc_2_5::XMLFormatter::EscapeFlags, xercesc_2_5::XMLFormatter::UnRepFlags)" in file ../ddl/crddl001.a[event_driven_xml_writerm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::InputSource::setPublicId(unsigned short const*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLException::~XMLException()" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLUni::fgXercescDefaultLocale" in file ../xml/crxml001.a[ddl2_ctrlm4dwdrxml.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLAttDefList::serialize(xercesc_2_5::XSerializeEngine&)" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::MemBufInputSource::MemBufInputSource(unsigned char const*, unsigned int, unsigned short const*, bool, xercesc_2_5::MemoryManager*)" in file ../xml/crxml001.a[xmlmatchlistm4dwdrxml.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::upperCase(unsigned short*)" in file ../ddl/crddl001.a[unicode_stringm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::RegularExpression::~RegularExpression()" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLAttDefList::isSerializable() const" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLChar1_0::isValidName(unsigned short const*, unsigned int)" in file ../ddl/crddl001.a[event_driven_xml_writerm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::SAXParseException::getSystemId() const" in file ../ddl/crddl001.a[ddli_errorreportm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::release(char**)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::SAXParseException::getColumnNumber() const" in file ../ddl/crddl001.a[ddli_errorreportm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::trim(unsigned short*)" in file ../ddl/crddl001.a[unicode_stringm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::MemBufInputSource::MemBufInputSource(unsigned char const*, unsigned int, char const*, bool, xercesc_2_5::MemoryManager*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::InputSource::setSystemId(unsigned short const*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLUni::fgRuntimeException_Name" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::SAXParseException::getLineNumber() const" in file ../ddl/crddl001.a[ddli_errorreportm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XercesDOMParser::XercesDOMParser(xercesc_2_5::XMLValidator*, xercesc_2_5::MemoryManager*, xercesc_2_5::XMLGrammarPool*)" in file ../xml/crxml001.a[xmlmatchlistm4dwdrxml.o]
ld: Unsatisfied symbol "xercesc_2_5::XMemory::operator new(unsigned long)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::DOMImplementationRegistry::getDOMImplementation(unsigned short const*)" in file ../ddl/crddl001.a[ddli_docimplm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::RegularExpression::RegularExpression(char const*, char const*, xercesc_2_5::MemoryManager*)" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::compareString(unsigned short const*, unsigned short const*)" in file ../ddl/crddl001.a[unicode_stringm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::AbstractDOMParser::setCalculateSrcOfs(bool)" in file ../xml/crxml001.a[xmlmatchlistm4dwdrxml.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::compareIString(unsigned short const*, unsigned short const*)" in file ../ddl/crddl001.a[unicode_stringm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::SAXParseException::~SAXParseException()" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::regionIMatches(unsigned short const*, int, unsigned short const*, int, unsigned int)" in file ../ddl/crddl001.a[unicode_stringm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMemory::operator delete(void*, xercesc_2_5::MemoryManager*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMemory::operator new(unsigned long, xercesc_2_5::MemoryManager*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::AbstractDOMParser::getDocument()" in file ../xml/crxml001.a[xmlmatchlistm4dwdrxml.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLFormatter::XMLFormatter(char const*, char const*, xercesc_2_5::XMLFormatTarget*, xercesc_2_5::XMLFormatter::EscapeFlags, xercesc_2_5::XMLFormatter::UnRepFlags, xercesc_2_5::MemoryManager*)" in file ../ddl/crddl001.a[event_driven_xml_writerm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::BinInputStream::~BinInputStream()" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "typeinfo for xercesc_2_5::InputSource" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "typeinfo for xercesc_2_5::SAXParseException" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::BinInputStream::BinInputStream()" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::DTDEntityDecl::serialize(xercesc_2_5::XSerializeEngine&)" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::transcode(unsigned short const*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::transcode(char const*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::SAX2XMLReaderImpl::SAX2XMLReaderImpl(xercesc_2_5::MemoryManager*, xercesc_2_5::XMLGrammarPool*)" in file ../csm/crcsm01.a[crxmlm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::AbstractDOMParser::parse(xercesc_2_5::InputSource const&)" in file ../xml/crxml001.a[xmlmatchlistm4dwdrxml.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLString::isAllWhiteSpace(unsigned short const*)" in file ../ddl/crddl001.a[ddli_pretty_printm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLEntityDecl::~XMLEntityDecl()" in file ../csm/crcsm01.a[ccsmm4smcsm.o]
ld: Unsatisfied symbol "xercesc_2_5::RegularExpression::matches(char const*, xercesc_2_5::Match*, xercesc_2_5::MemoryManager*)" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::AbstractDOMParser::parse(char const*)" in file ../ddl/crddl001.a[ddli_docimplm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLException::XMLException(xercesc_2_5::XMLException const&)" in file ../ddl/crddl001.a[ddl_regularexpressionm4dwddl.o]
ld: Unsatisfied symbol "xercesc_2_5::XMLPlatformUtils::Initialize(char const*, char const*, xercesc_2_5::PanicHandler*, xercesc_2_5::MemoryManager*)" in file ../xml/crxml001.a[ddl2_ctrlm4dwdrxml.o]
78 errors.
collect2: ld returned 1 exit status




new unsatisfied symbol:
-----------------------

bash-3.2$ nm -pxAN xerceslib.a | grep AbstractDOMParser | grep parse
0x00000620 T xerceslib.a[AbstractDOMParser.o]:_ZN11xercesc_2_517AbstractDOMParser9parseNextERNS_13XMLPScanTokenE
0x00001770 T xerceslib.a[AbstractDOMParser.o]:_ZN11xercesc_2_517AbstractDOMParser5parseEPKt
0x000021f0 T xerceslib.a[AbstractDOMParser.o]:_ZN11xercesc_2_517AbstractDOMParser10parseResetERNS_13XMLPScanTokenE
0x00004d40 T xerceslib.a[AbstractDOMParser.o]:_ZN11xercesc_2_517AbstractDOMParser10parseFirstERKNS_11InputSourceERNS_13XMLPScanTokenE
0x00005160 T xerceslib.a[AbstractDOMParser.o]:_ZN11xercesc_2_517AbstractDOMParser5parseERKNS_11InputSourceE
0x00005630 T xerceslib.a[AbstractDOMParser.o]:_ZN11xercesc_2_517AbstractDOMParser10parseFirstEPKcRNS_13XMLPScanTokenE
0x000057c0 T xerceslib.a[AbstractDOMParser.o]:_ZN11xercesc_2_517AbstractDOMParser10parseFirstEPKtRNS_13XMLPScanTokenE
0x00005950 T xerceslib.a[AbstractDOMParser.o]:_ZN11xercesc_2_517AbstractDOMParser5parseEPKc
0x00000000 U xerceslib.a[DOMBuilderImpl.o]:_ZN11xercesc_2_517AbstractDOMParser5parseEPKc
0x00000000 U xerceslib.a[DOMBuilderImpl.o]:_ZN11xercesc_2_517AbstractDOMParser5parseEPKt
0x00000000 U xerceslib.a[DOMBuilderImpl.o]:_ZN11xercesc_2_517AbstractDOMParser5parseERKNS_11InputSourceE
0x00000000 U xerceslib.a[IGXMLScanner2.o]:_ZN11xercesc_2_517AbstractDOMParser5parseERKNS_11InputSourceE
0x00000000 U xerceslib.a[SGXMLScanner.o]:_ZN11xercesc_2_517AbstractDOMParser5parseERKNS_11InputSourceE
0x00000000 U xerceslib.a[TraverseSchema.o]:_ZN11xercesc_2_517AbstractDOMParser5parseERKNS_11InputSourceE
0x00000000 U xerceslib.a[XSAnnotation.o]:_ZN11xercesc_2_517AbstractDOMParser5parseERKNS_11InputSourceE


Dennis Handly
Acclaimed Contributor

Re: xerces build using gnu g++ error -- forward declaration error.

>now my link line is changed to have xerceslib.a as first archive to link with
>it shows that the AbstractDOMParser::parse is available in the xerceslib.a

Yes. You may want to give up on ordering and just let ld figure it out with -Wl,+n.
Shinji Teragaito_1
Respected Contributor

Re: xerces build using gnu g++ error -- forward declaration error.

Rui, remove -DXERCES_TMPLSINC from Makefile.incl. I'm not sure if
the unsat problem goes away perfectly. But I think you can have
much more improvements.

As you already know, -fPIC is not required when generating *.o
for the archive library.
uiqbal
Advisor

Re: xerces build using gnu g++ error -- forward declaration error.

Hi,

Thank you both for keeping up with me and helping me out.

Tried both the things, adding +Wl,+n doesn't work and the errors increase.

Also if I remove -DXERCES_TMPLSINC, then its even more problematic with xercesc compilation even failing after adding your mentioned changes.

I have seen that there are some linker patches available at, should I upgrade to them.

http://www13.itrc.hp.com/service/patch/patchDetail.do?patchid=PHSS_34860&sel={hpux:11.23,0}&BC=main|sbs|systemDesc{0}|

http://www13.itrc.hp.com/service/patch/patchDetail.do?BC=main|sbs|systemDesc{0}|patchDetail{PHSS_34860,{hpux:11.23,0}}|&patchid=PHSS_39093&sel={hpux:11.23,0}

Is it problem with the linker, my ld is this:
ld_msgs.cat: $Revision: 1.85 $
92453-07 linker ld HP Itanium(R) B.12.42 IPF/IPF
REL Fri Dec 1 11:36:57 2006 PST
HP aC++ for Integrity Servers B3910B A.06.10 [Mar 22 2006] Classic Iostream Library
HP aC++ for Integrity Servers B3910B A.06.10 [Mar 22 2006] Language Support Library


Or should i try the linker with gcc which doesn't seem to be present.
Regards,
rui
Dennis Handly
Acclaimed Contributor

Re: xerces build using gnu g++ error -- forward declaration error.

>Is it problem with the linker, my ld is this: B.12.42

Possibly, it's pretty old.
But typically this is due to a missing lib or incorrect path.
Basically you need to know where a symbol is being used and have some idea where it should be defined.

>Or should I try the linker with gcc which doesn't seem to be present.

Using a foreign devil ld would be taking 10 steps backwards.
uiqbal
Advisor

Re: xerces build using gnu g++ error -- forward declaration error.

I have patched the linker as well now but to no avail. Still I get lot of errors -- and the symbol exist as is pretty evident that i get any problem with xerceslib itself but in different libs now.

Any help regarding problem compiling xerces 2.5.0 on hp itanium using gcc would be greatly appreciated.

rui
Dennis Handly
Acclaimed Contributor

Re: xerces build using gnu g++ error -- forward declaration error.

>the symbol exist as is pretty evident that I get any problem with xerceslib itself but in different libs now.

You've solved your above unsat problems? And the symbols are now different?
Shinji Teragaito_1
Respected Contributor

Re: xerces build using gnu g++ error -- forward declaration error.

It seems to me some more changes are required in xerces-c 2.5
Makefile.incl. If you want to have static library, you don't
have to specify -fPIC and -shared. Actually both MAKE_SHARED and
MAKE_SHARED_C are not required.

Anyway, I'd like to recommend to use Xerces-c 2.8 once again
rather than still sticking to out-of-date 2.5 version. As I
mentioned in my past message, you don't have to any changes to
the source code for gcc/g++. Also I just noticed runConfigure is
providing the "-s" option support for static building.

% ./runConfigure -p hp-11 -c gcc -x g++ -s -r pthread

With "-s", you can have both libxerces-a.a and libxerces-depdom.a
in the lib directory. Without "-s", those shared libraries are
built in the directory.