Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1867

Linking error about DOMLSSerializerImpl::canSetParameter()/setParameter()/getParameter()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.0.2, 3.1.0
    • Build
    • None
    • Solaris SPARCv9, Sun CC

    Description

      The building passed on Solaris SPARCv9 Sun CC, but following linking issues occurs:
      Undefined first referenced
      symbol in file
      bool xercesc_3_0::DOMLSSerializerImpl::canSetParameter(const unsigned short*,bool)const .libs/XPath2NodeSerializer.o
      bool xercesc_3_0::DOMLSSerializerImpl::canSetParameter(const unsigned short*,const void*)const .libs/XPath2NodeSerializer.o
      void xercesc_3_0::DOMLSSerializerImpl::setParameter(const unsigned short*,bool) .libs/XPath2NodeSerializer.o
      void xercesc_3_0::DOMLSSerializerImpl::setParameter(const unsigned short*,const void*) .libs/XPath2NodeSerializer.o
      const void*xercesc_3_0::DOMLSSerializerImpl::getParameter(const unsigned short*)const .libs/XPath2NodeSerializer.o
      ld: fatal: Symbol referencing errors. No output written to .libs/libxqilla.so.5.0.1

          • Error code 1
            make: Fatal error: Command failed for target `libxqilla.la'
            Current working directory /export/home/db/rucong/dbxml-2.5.6/xqilla/build
          • Error code 1

      George Feinberg had figure out the cause and gave the fix. The cause is type mismatching between DOMLSSerializerImpl.hpp and DOMLSSerializerImpl.cpp:

      In the .hpp file(xercesc/dom/impl/DOMLSSerializerImpl.hpp):
      virtual void setParameter(const XMLCh* name, const void* value);
      From the .cpp file:
      bool DOMLSSerializerImpl::canSetParameter(const XMLCh* const featName
      , const void* /value/) const
      Note that the .cpp uses "const XMLCh * const featName" where the .hpp file
      uses "const XMLCh *name"

      The fix is removing the extra "const" from the .cpp file:
      edit xercesc/dom/impl/DOMLSSerializerImpl.cpp

      • bool DOMLSSerializerImpl::canSetParameter(const XMLCh* const featName
        + bool DOMLSSerializerImpl::canSetParameter(const XMLCh* featName
      • bool DOMLSSerializerImpl::canSetParameter(const XMLCh* const featName
        + bool DOMLSSerializerImpl::canSetParameter(const XMLCh* featName
      • void DOMLSSerializerImpl::setParameter(const XMLCh* const featName
        + void DOMLSSerializerImpl::setParameter(const XMLCh* featName
      • void DOMLSSerializerImpl::setParameter(const XMLCh* const featName
        + void DOMLSSerializerImpl::setParameter(const XMLCh* featName
      • const void* DOMLSSerializerImpl::getParameter(const XMLCh* const featName) const
        + const void* DOMLSSerializerImpl::getParameter(const XMLCh* featName) const

      Attachments

        Activity

          People

            amassari Alberto Massari
            rucong.zhao rucong zhao
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: