- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- xerces build using gnu g++ error -- forward declar...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2009 02:13 AM
тАО05-13-2009 02:13 AM
xerces build using gnu g++ error -- forward declaration error.
I am trying to build xerces 2.5.0 using g++ version 4.2.3. I have added this to my makefile.incl
http://marc.info/?l=xerces-c-dev&m=113163501028049&w=2
Here are my commands afterwards,
# export XERCESCROOT=/data1/rui/xerces-c-src_2_5_0
and then I execute these commands sitting in the $XERCESCROOT/src/xercesc directory
# runConfigure -php-11 -cgcc -xg++ -z"-fPIC" -minmem -nsocket -tnative -rpthread
# gmake
it compiles for a long time with most of the directories built, but ultimately gives this error, can anybody point me to what could be the problem -- any sort of code modification related to xerces code can be done as i just want to compile and get the lib ready.
mkdir -p /data1/rui/xerces-c-src_2_5_0/include/xercesc/framework/psvi
cp -fp PSVIAttribute.hpp PSVIAttributeList.hpp PSVIElement.hpp PSVIHandler.hpp PSVIItem.hpp XSAnnotation.hpp XSAttributeDeclaration.hpp XSAttributeGroupDefinition.hpp XSAttributeUse.hpp XSComplexTypeDefinition.hpp XSConstants.hpp XSElementDeclaration.hpp XSFacet.hpp XSIDCDefinition.hpp XSModel.hpp XSModelGroup.hpp XSModelGroupDefinition.hpp XSMultiValueFacet.hpp XSNamedMap.hpp XSNamespaceItem.hpp XSNotationDeclaration.hpp XSObject.hpp XSParticle.hpp XSSimpleTypeDefinition.hpp XSTypeDefinition.hpp XSWildcard.hpp XSNamedMap.c /data1/rui/xerces-c-src_2_5_0/include/xercesc/framework/psvi
g++ -fPIC -D_HP_UX -DXERCES_TMPLSINC -DHPUX11 -D_REENTRANT -c -I/data1/rui/xerces-c-src_2_5_0/include -w -O -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS -DPROJ_SAX4C -DPROJ_SAX2 -DPROJ_DOM -DPROJ_VALIDATORS -DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET -o /data1/rui/xerces-c-src_2_5_0/obj/HPUX/XSAttributeGroupDefinition.o XSAttributeGroupDefinition.cpp
XSAttributeGroupDefinition.cpp: In member function 'virtual const XMLCh* xercesc_2_5::XSAttributeGroupDefinition::getName()':
XSAttributeGroupDefinition.cpp:122: error: invalid use of incomplete type 'struct xercesc_2_5::XMLStringPool'
/data1/rui/xerces-c-src_2_5_0/include/xercesc/framework/psvi/XSNamedMap.hpp:80: error: forward declaration of 'struct xercesc_2_5::XMLStringPool'
XSAttributeGroupDefinition.cpp: In member function 'virtual const XMLCh* xercesc_2_5::XSAttributeGroupDefinition::getNamespace()':
XSAttributeGroupDefinition.cpp:127: error: invalid use of incomplete type 'struct xercesc_2_5::XMLStringPool'
/data1/rui/xerces-c-src_2_5_0/include/xercesc/framework/psvi/XSNamedMap.hpp:80: error: forward declaration of 'struct xercesc_2_5::XMLStringPool'
gmake[2]: *** [XSAttributeGroupDefinition.o] Error 1
gmake[2]: Leaving directory `/data1/rui/xerces-c-src_2_5_0/src/xercesc/framework/psvi'
gmake[1]: *** [psvi] Error 2
gmake[1]: Leaving directory `/data1/rui/xerces-c-src_2_5_0/src/xercesc/framework'
Regards,
rui
- Tags:
- g++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-13-2009 06:23 PM
тАО05-13-2009 06:23 PM
Re: xerces build using gnu g++ error -- forward declaration error.
Has xercesc_2_5::XMLStringPool been defined before line 122? Is this used in a template?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 07:50 PM
тАО05-14-2009 07:50 PM
Re: xerces build using gnu g++ error -- forward declaration error.
When I built Xerces-2.5 with HP ANSI C and aCC compiler on 11.23
around August 2004, I didn't encounter this error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-14-2009 09:24 PM
тАО05-14-2009 09:24 PM
Re: xerces build using gnu g++ error -- forward declaration error.
You might be able to get the same error with aCC6's +strict option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2009 12:41 AM
тАО05-15-2009 12:41 AM
Re: xerces build using gnu g++ error -- forward declaration error.
% aCC +strict -D_HP_UX -DHPaCC -DHPUX11 +Z -c \
-I/home/shinji/oss/xerces-c-src_2_5_0/include \
-AA -w -O -DPROJ_XMLPARSER -DPROJ_XMLUTIL -DPROJ_PARSERS \
-DPROJ_SAX4C -DPROJ_SAX2 -DPROJ_DOM -DPROJ_VALIDATORS \
-DXML_USE_NATIVE_TRANSCODER -DXML_USE_INMEM_MESSAGELOADER \
-DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET
-o /home/shinji/oss/xerces-c-src_2_5_0/obj/HPUX/XSAttributeGroupDefinition.o \
XSAttributeGroupDefinition.o-test XSAttributeGroupDefinition.cpp
"/home/shinji/oss/xerces-c-src_2_5_0/include/xercesc/util/NameIdPool.c", line 416: error #2137:
expression must be a modifiable lvalue
fMemoryManager = toAssign.fMemoryManager;
Without +strict option, Xerces-C 2.5.0 build on 11.23 works
successfully with our HP compiler A.06.22 as when I used A.05.57
5 years ago.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-15-2009 01:08 PM
тАО05-15-2009 01:08 PM
Re: xerces build using gnu g++ error -- forward declaration error.
error #2137: expression must be a modifiable lvalue
Where is the caret pointing? To the LHS or which of the tokens on the RHS? What are the types of each?
Basically it says the source is illegal and may be related to the incomplete class that g++ gave. The source has to be reordered and xercesc_2_5::XMLStringPool must be defined before it is used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2009 06:27 PM
тАО05-16-2009 06:27 PM
Re: xerces build using gnu g++ error -- forward declaration error.
MemoryManager* const fMemoryManager;
After removing "const" from this line, aCC6 +strict doesn't cause
the #2137 error in XSAttributeGroupDefinition.cpp.
I needed one more changes in util/RefArrayOf.hpp to build successfully
whole of Xerces-C 2.5 source code using aCC6 +strict to prevent
the error #2393 "pointer to incomplete class type is not allowed":
% diff util/RefArrayOf.hpp.orig util/RefArrayOf.hpp
104c104
<
---
> #include
%
NOTE: I was able to build successfully Xerces-C 2.8 and 3.0 using
gcc 4.0.0 and aCC6 +strict respectively without any source code
changes.
Rui, can't you use the newer Xerces-C version, either Xerces-C
2.8 or 3.0 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-16-2009 07:48 PM
тАО05-16-2009 07:48 PM
Re: xerces build using gnu g++ error -- forward declaration error.
>After removing "const" from this line
Hmm, that seems like a useless definition unless it is mutable, initialized in a constructor init list or a cast hammer is used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-19-2009 09:25 PM
тАО05-19-2009 09:25 PM
Re: xerces build using gnu g++ error -- forward declaration error.
To build Xerces-C 2.5 using gcc and g++, you have to change some files:
1. Add #include
- framework/psvi/XSAttributeGroupDefinition.cpp
- framework/psvi/XSModelGroupDefinition.cpp
- framework/psvi/XSNotationDeclaration.cpp
2. Add #include
- framework/psvi/XSNamespaceItem.hpp
3. Change Makefile.incl you referenced as follows:
< EXTRA_LINK_OPTIONS = -b -Wl,+s -Wl,+b,.
--
> EXTRA_LINK_OPTIONS =
I'm using gcc/gcc 4.0 on 11.23. So I hope the same changes work
for your environment, too !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-20-2009 07:05 AM
тАО05-20-2009 07:05 AM
Re: xerces build using gnu g++ error -- forward declaration error.
Thanks for all the support on this thread, i tried the last option and it works great -- it seems you have to add certain changes into source.
Now afterwards i am generating an archive file using
ar r xerceslib.a *.o
but the thing is when I link to xerces using
g++ -o ../cr_api_test.hp -lstdc++ -lX11 -L. -L../ -Wall -Wno-deprecated -lpthread -lm -lsec -lnsl -lrt -L/usr/X11R6/lib ../crxrdlin/crreadline01.a ../unittest/crunittest001.a ../dwmonitor/crdwmonitor001.a ../dwmonitor/systemmonitor/crsysmon001.a ../common/crcommon01.a ../xerceslib.a
I get lot of messages, a few are given below, all have to do with "unsatisfied symbol". Am I missing some linker flag, also xerces code was compiled using -fPIC flag as the same code would be used for shared library, does it make any difference -- if not where lies the problem???
ld: Unsatisfied symbol "xercesc_2_5::RefStackOf<:domnode>::empty()" in file ../xerceslib.a[DOMDocumentImpl.o]
ld: Unsatisfied symbol "xercesc_2_5::ValueStackOf
ld: Unsatisfied symbol "xercesc_2_5::ArrayJanitor
ld: Unsatisfied symbol "xercesc_2_5::Janitor<:schemaattdef>::reset(xercesc_2_5::SchemaAttDef*)" in file ../xerceslib.a[TraverseSchema.o]
ld: Unsatisfied symbol "xercesc_2_5::ValueHashTableOfEnumerator
ld: Unsatisfied symbol "xercesc_2_5::ValueStackOf<:complextypeinfo>::pop()" in file ../xerceslib.a[SchemaValidator.o]
ld: Unsatisfied symbol "xercesc_2_5::NameIdPoolEnumerator<:dtdelementdecl>::nextElement()" in file ../xerceslib.a[XTemplateSerializer.o]
ld: Unsatisfied symbol "xercesc_2_5::ValueVectorOf<:schemagrammar>::removeAllElements()" in file ../xerceslib.a[GrammarResolver.o]
ld: Unsatisfied symbol "xercesc_2_5::ArrayJanitor
ld: Unsatisfied symbol "xercesc_2_5::ArrayJanitor
ld: Unsatisfied symbol "xercesc_2_5::ArrayJanitor
ld: Unsatisfied symbol "xercesc_2_5::ArrayJanitor
ld: Unsatisfied symbol "xercesc_2_5::ArrayJanitor
Regards,
RUI