Xerces-C++
  1. Xerces-C++
  2. XERCESC-1235

Xerces-C++ does not build with gcc 3.4.0

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: None
    • Component/s: Build
    • Labels:
      None
    • Environment:
      Gcc 3.4.0
      Slackware GNU/Linux 10.0

      Description

      When trying to build xerces-c with gcc 3.4.0 I get error :

      make -C impl
      make[2]: Entering directory `/home/cartman/WS/xerces-c-src_2_5_0/src/xercesc/dom/impl'
      mkdir -p /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/dom/impl
      cp -fp DOMDeepNodeListPool.c /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/dom/impl
      g++ -fPIC -DLINUX -D_REENTRANT -c -I/home/cartman/WS/xerces-c-src_2_5_0/include -g -O2 -o /home/cartman/WS/xerces-c-src_2_5_0/obj/LINUX/DOMAttrImpl.o DOMAttrImpl.cpp
      In file included from /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.hpp:221,
      from DOMDocumentImpl.hpp:73,
      from DOMAttrImpl.hpp:77,
      from DOMAttrImpl.cpp:64:
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c: In constructor `xercesc_2_5::RefArrayOf<TElem>::RefArrayOf(unsigned int, xercesc_2_5::MemoryManager*)':
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c:111: error: invalid use of undefined type `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/XMemory.hpp:70: error: forward declaration of `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c: In constructor `xercesc_2_5::RefArrayOf<TElem>::RefArrayOf(TElem*, unsigned int, xercesc_2_5::MemoryManager)':
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c:125: error: invalid use of undefined type `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/XMemory.hpp:70: error: forward declaration of `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c: In copy constructor `xercesc_2_5::RefArrayOf<TElem>::RefArrayOf(const xercesc_2_5::RefArrayOf<TElem>&)':
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c:137: error: invalid use of undefined type `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/XMemory.hpp:70: error: forward declaration of `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c: In destructor `xercesc_2_5::RefArrayOf<TElem>::~RefArrayOf()':
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c:144: error: invalid use of undefined type `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/XMemory.hpp:70: error: forward declaration of `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c: In member function `xercesc_2_5::RefArrayOf<TElem>& xercesc_2_5::RefArrayOf<TElem>::operator=(const xercesc_2_5::RefArrayOf<TElem>&)':
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c:176: error: invalid use of undefined type `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/XMemory.hpp:70: error: forward declaration of `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c:178: error: invalid use of undefined type `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/XMemory.hpp:70: error: forward declaration of `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c: In member function `void xercesc_2_5::RefArrayOf<TElem>::resize(unsigned int)':
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c:276: error: invalid use of undefined type `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/XMemory.hpp:70: error: forward declaration of `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/RefArrayOf.c:290: error: invalid use of undefined type `struct xercesc_2_5::MemoryManager'
      /home/cartman/WS/xerces-c-src_2_5_0/include/xercesc/util/XMemory.hpp:70: error: forward declaration of `struct xercesc_2_5::MemoryManager'
      In file included from DOMAttrImpl.cpp:67:
      DOMCasts.hpp: In function `xercesc_2_5::DOMNode* xercesc_2_5::castToNode(const xercesc_2_5::DOMParentNode*)':
      DOMCasts.hpp:148: warning: invalid access to non-static data member `xercesc_2_5::DOMElementImpl::fParent' of NULL object
      DOMCasts.hpp:148: warning: (perhaps the `offsetof' macro was used incorrectly)
      DOMCasts.hpp: In function `xercesc_2_5::DOMNode* xercesc_2_5::castToNode(const xercesc_2_5::DOMNodeImpl*)':
      DOMCasts.hpp:154: warning: invalid access to non-static data member `xercesc_2_5::DOMElementImpl::fNode' of NULL object
      DOMCasts.hpp:154: warning: (perhaps the `offsetof' macro was used incorrectly)
      DOMCasts.hpp: In function `xercesc_2_5::DOMNodeImpl* xercesc_2_5::castToNodeImpl(const xercesc_2_5::DOMParentNode*)':
      DOMCasts.hpp:162: warning: invalid access to non-static data member `xercesc_2_5::DOMElementImpl::fNode' of NULL object
      DOMCasts.hpp:162: warning: (perhaps the `offsetof' macro was used incorrectly)
      DOMCasts.hpp:163: warning: invalid access to non-static data member `xercesc_2_5::DOMElementImpl::fParent' of NULL object
      DOMCasts.hpp:163: warning: (perhaps the `offsetof' macro was used incorrectly)
      make[2]: *** [DOMAttrImpl.o] Error 1
      make[2]: Leaving directory `/home/cartman/WS/xerces-c-src_2_5_0/src/xercesc/dom/impl'
      make[1]: *** [impl] Error 2
      make[1]: Leaving directory `/home/cartman/WS/xerces-c-src_2_5_0/src/xercesc/dom'
      make: *** [Dom] Error 2
      cartman@southpark:~/WS/xerces-c-src_2_5_0/src/xercesc$

        Activity

        Hide
        Neil Graham added a comment -

        This should have been fixed in CVS a couple of weeks ago.

        Show
        Neil Graham added a comment - This should have been fixed in CVS a couple of weeks ago.
        Hide
        PraveenSam added a comment -

        Hi ,

        Have any one has solution for the above mentioned issue, i have facing same issue

        I am using redhat 6.4
        "Linux stadt 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux"

        gcc: gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC)

        Please mail me , if any one has -> praveensams@aol.in

        Show
        PraveenSam added a comment - Hi , Have any one has solution for the above mentioned issue, i have facing same issue I am using redhat 6.4 "Linux stadt 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux" gcc: gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) Please mail me , if any one has -> praveensams@aol.in
        Hide
        Alberto Massari added a comment -

        What version are you trying to compile? 2.5? Can you paste the output of your compiler?

        Show
        Alberto Massari added a comment - What version are you trying to compile? 2.5? Can you paste the output of your compiler?
        Hide
        PraveenSam added a comment -

        Hi Alberto,

        The above mentioned error was fixed by doing the below patch ,
        http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/RefArrayOf.hpp?r1=175709&r2=175929&diff_format=h

        Now i am facing error in xalanc

        ~/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c ] c++ -O2 -DNDEBUG -DXML_BITSTOBUILD_64 -fno-elide-constructors -Wall -fPIC -DLINUX -D_REENTRANT -DXALAN_INMEM_MSG_LOADER -DXALAN_USE_ICU -c -I/home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src -I/home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/include -I../../nls/include -I/mpde/rhel64_x86.x/xerces/gcc_4.4.6/xerces_c2_5_0/src/ -I/mpde/rhel64_x86.x/xerces/gcc_4.4.6/xerces_c2_5_0/include/xercesc -I/mpde/rhel64_x86.x/xerces/gcc_4.4.6/xerces_c2_5_0/include/ -I/mpde/rhel64_x86.x/icu/gcc_4.4.6/icu2.6.2/include -o ../../obj/XalanDOMString.o /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp
        /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp: In member function 'xalanc_1_8::XalanDOMString& xalanc_1_8::XalanDOMString::assign(const xalanc_1_8::XalanDOMString&, xalanc_1_8::XalanDOMString::size_type, xalanc_1_8::XalanDOMString::size_type)':
        /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:234: error: 'memmove' was not declared in this scope
        /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp: In static member function 'static xalanc_1_8::XalanDOMString::size_type xalanc_1_8::XalanDOMString::length(const char*)':
        /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:771: error: 'strlen' was not declared in this scope
        /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp: In function 'bool xalanc_1_8::doTranscodeFromLocalCodePage(const char*, xalanc_1_8::XalanDOMString::size_type, bool, xalanc_1_8::XalanDOMCharVectorType&, bool)':
        /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1094: error: 'strncpy' was not declared in this scope

        Compiler gcc 4.4.6
        Platform : redhat 6.4
        Kernel version: "Linux ramstadt 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux"

        Show
        PraveenSam added a comment - Hi Alberto, The above mentioned error was fixed by doing the below patch , http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/RefArrayOf.hpp?r1=175709&r2=175929&diff_format=h Now i am facing error in xalanc ~/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c ] c++ -O2 -DNDEBUG -DXML_BITSTOBUILD_64 -fno-elide-constructors -Wall -fPIC -DLINUX -D_REENTRANT -DXALAN_INMEM_MSG_LOADER -DXALAN_USE_ICU -c -I/home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src -I/home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/include -I../../nls/include -I/mpde/rhel64_x86.x/xerces/gcc_4.4.6/xerces_c2_5_0/src/ -I/mpde/rhel64_x86.x/xerces/gcc_4.4.6/xerces_c2_5_0/include/xercesc -I/mpde/rhel64_x86.x/xerces/gcc_4.4.6/xerces_c2_5_0/include/ -I/mpde/rhel64_x86.x/icu/gcc_4.4.6/icu2.6.2/include -o ../../obj/XalanDOMString.o /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp: In member function 'xalanc_1_8::XalanDOMString& xalanc_1_8::XalanDOMString::assign(const xalanc_1_8::XalanDOMString&, xalanc_1_8::XalanDOMString::size_type, xalanc_1_8::XalanDOMString::size_type)': /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:234: error: 'memmove' was not declared in this scope /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp: In static member function 'static xalanc_1_8::XalanDOMString::size_type xalanc_1_8::XalanDOMString::length(const char*)': /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:771: error: 'strlen' was not declared in this scope /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp: In function 'bool xalanc_1_8::doTranscodeFromLocalCodePage(const char*, xalanc_1_8::XalanDOMString::size_type, bool, xalanc_1_8::XalanDOMCharVectorType&, bool)': /home/mpde/tools/MPDE_Builds/rhel64_x86.x/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp:1094: error: 'strncpy' was not declared in this scope Compiler gcc 4.4.6 Platform : redhat 6.4 Kernel version: "Linux ramstadt 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux"
        Hide
        Alberto Massari added a comment -

        This looks like a missing #include <string.h>, but you should ask the Xalan team...

        Show
        Alberto Massari added a comment - This looks like a missing #include <string.h>, but you should ask the Xalan team...

          People

          • Assignee:
            Unassigned
            Reporter:
            ismail dönmez
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development