compilation problem

Help
jsmith00
2005-08-16
2013-04-25
  • jsmith00
    jsmith00
    2005-08-16

    I'm compiling mxflib-beta-0.5.1.zip on solaris 9.
    after executing:

    # ./bootstrap.sh
    #./configure

    I'm getting this error:

    # make
    make  all-recursive
    make[1]: Entering directory `/home/john/mxflib051'
    Making all in mxflib
    make[2]: Entering directory `/home/john/mxflib051/mxflib'
    if g++ -DHAVE_CONFIG_H  -I..    -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEFAULT_DICT_PATH=\"/usr/local/share/mxflib\" -g -Wall -MT crypto.o -MD -MP -MF ".deps/crypto.Tpo" -c -o crypto.o crypto.cpp; \ then mv -f ".deps/crypto.Tpo" ".deps/crypto.Po"; else rm -f ".deps/crypto.Tpo"; exit 1; fi
    In file included from ../mxflib/mxflib.h:82,
                     from crypto.cpp:31:
    ../mxflib/smartptr.h: In member function `virtual void mxflib::ParentPtr<T>::__Assign(mxflib::IRefCount<T>*)':
    ../mxflib/smartptr.h:522: error: `__m_refcount' undeclared (first use this function)
    ../mxflib/smartptr.h:522: error: (Each undeclared identifier is reported only once for each function it appears in.)
    ../mxflib/smartptr.h: In constructor `mxflib::ParentPtr<T>::ParentPtr()':
    ../mxflib/smartptr.h:535: error: `__m_refcount' undeclared (first use this function)
    ../mxflib/smartptr.h: In constructor `mxflib::ParentPtr<T>::ParentPtr(mxflib::SmartPtr<T>)':
    ../mxflib/smartptr.h:541: error: `__m_refcount' undeclared (first use this function)
    ../mxflib/smartptr.h: In constructor `mxflib::ParentPtr<T>::ParentPtr(mxflib::IRefCount<T>*)':
    ../mxflib/smartptr.h:548: error: `__m_refcount' undeclared (first use this function)
    ../mxflib/smartptr.h: In copy constructor `mxflib::ParentPtr<T>::ParentPtr(mxflib::ParentPtr<T>&)':
    ../mxflib/smartptr.h:555: error: `__m_refcount' undeclared (first use this function)
    ../mxflib/smartptr.h: In destructor `mxflib::ParentPtr<T>::~ParentPtr()':
    ../mxflib/smartptr.h:563: error: `__m_refcount' undeclared (first use this function)
    ../mxflib/smartptr.h: In member function `void mxflib::ParentPtr<T>::Clear()':
    ../mxflib/smartptr.h:581: error: `__m_refcount' undeclared (first use this function)
    ../mxflib/smartptr.h: In member function `void mxflib::ParentPtr<T>::ClearFromParent()':
    ../mxflib/smartptr.h:588: error: `__m_refcount' undeclared (first use this function)
    In file included from ../mxflib/mxflib.h:104,
                     from crypto.cpp:31:
    ../mxflib/metadata.h: In member function `void mxflib::Component::SetParent(mxflib::IRefCount<mxflib::Track>*)':
    ../mxflib/metadata.h:150: error: no matching function for call to `mxflib::TrackParent::TrackParent(mxflib::TrackParent)'
    ../mxflib/metadata.h:144: note: candidates are: mxflib::TrackParent::TrackParent(mxflib::TrackParent&)
    ../mxflib/metadata.h:114: note:                 mxflib::TrackParent::TrackParent(mxflib::IRefCount<mxflib::Track>*)
    ../mxflib/metadata.h: In member function `void mxflib::Track::SetParent(mxflib::PackagePtr&)':
    ../mxflib/metadata.h:349: error: no matching function for call to `mxflib::PackageParent::PackageParent(mxflib::PackageParent)'
    ../mxflib/metadata.h:346: note: candidates are: mxflib::PackageParent::PackageParent(mxflib::PackageParent&)
    ../mxflib/metadata.h:81: note:                 mxflib::PackageParent::PackageParent(mxflib::IRefCount<mxflib::Package>*)
    ../mxflib/metadata.h: In member function `void mxflib::Track::SetParent(mxflib::IRefCount<mxflib::Package>*)':
    ../mxflib/metadata.h:352: error: no matching function for call to `mxflib::PackageParent::PackageParent(mxflib::PackageParent)'
    ../mxflib/metadata.h:346: note: candidates are: mxflib::PackageParent::PackageParent(mxflib::PackageParent&)
    ../mxflib/metadata.h:81: note:                 mxflib::PackageParent::PackageParent(mxflib::IRefCount<mxflib::Package>*)
    make[2]: *** [crypto.o] Error 1
    make[2]: Leaving directory `/home/john/mxflib051/mxflib'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/john/mxflib051'
    make: *** [all] Error 2
    #

    Any help would be appreciated.
    Thanks.
    John.

     
    • Matt Beard
      Matt Beard
      2005-08-16

      What compiler are you using?

      I'm assuming it is gcc, if so what version?

       
    • jsmith00
      jsmith00
      2005-08-16

      # g++ -v
      Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/specs
      Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls --disable-libgcj --enable-languages=c,c+ : (reconfigured) ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls --disable-libgcj --enable-languages=c,c++
      Thread model: posix
      gcc version 3.4.2

       
      • Matt Beard
        Matt Beard
        2005-08-16

        OK...

        There was a change made in gcc 3.4.x which tightens up the way that references to superclass member properties are handled. As per the strict C++ specification you need to reference template superclass members as "this->property" rather than just "property".

        A have checked the fix in to the CVS.

         
    • jsmith00
      jsmith00
      2005-08-16

      Matt,
      is the fix downloadble?
      I've just checked out mxflib files from cvs and tried to compile - looks like i'm getting the same errors.

       
      • Matt Beard
        Matt Beard
        2005-08-17

        The modified code can be found at:

        http://cvs.sourceforge.net/viewcvs.py/\*checkout*/mxflib/mxflib/mxflib/smartptr.h?rev=1.4

        Is this the file you are using?

         
    • Sascha
      Sascha
      2006-10-05

      I failed to compile on SuSE 10.1
      somthing is wron with crypto... any suggestions to solve?!

      Newslink-sascha:/home/videolink/MXF/mxflib # gcc --version
      gcc (GCC) 4.1.0 (SUSE Linux)
      Copyright (C) 2006 Free Software Foundation, Inc.

      the Make Command:

      sascha:/home/videolink/MXF/mxflib # make
      make  all-recursive
      make[1]: Entering directory `/home/videolink/MXF/mxflib'
      Making all in mxflib
      make[2]: Entering directory `/home/videolink/MXF/mxflib/mxflib'
      if g++ -DHAVE_CONFIG_H  -I..   -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEFAULT_DICT_PATH=\&quot;/usr/local/share/mxflib\&quot; -Wall -g -O2 -MT crypto.o -MD -MP -MF ".deps/crypto.Tpo" -c -o crypto.o crypto.cpp; \ then mv -f ".deps/crypto.Tpo" ".deps/crypto.Po"; else rm -f ".deps/crypto.Tpo"; exit 1; fi
      ../mxflib/mxffile.h:207: error: extra qualification ‘mxflib::MXFFile::’ on member ‘ReWritePartition’
      ../mxflib/mxffile.h:216: error: extra qualification ‘mxflib::MXFFile::’ on member ‘ReWritePartitionWithIndex’
      ../mxflib/klvobject.h: In member function ‘virtual size_t mxflib::KLVObject::WriteDataFromTo(mxflib::Position, mxflib::Position, size_t)’:
      ../mxflib/klvobject.h:376: warning: comparison between signed and unsigned integer expressions
      ../mxflib/crypto.h: In member function ‘virtual size_t mxflib::KLVEObject::WriteDataFromTo(mxflib::Position, mxflib::Position, size_t)’:
      ../mxflib/crypto.h:494: warning: comparison between signed and unsigned integer expressions
      crypto.cpp: In member function ‘virtual size_t mxflib::KLVEObject::ReadDataFrom(mxflib::Position, size_t)’:
      crypto.cpp:484: warning: comparison between signed and unsigned integer expressions
      crypto.cpp: In member function ‘size_t mxflib::KLVEObject::ReadCryptoDataFrom(mxflib::Position, size_t)’:
      crypto.cpp:586: warning: comparison between signed and unsigned integer expressions
      crypto.cpp:598: warning: comparison between signed and unsigned integer expressions
      crypto.cpp:659: warning: comparison between signed and unsigned integer expressions
      crypto.cpp: In member function ‘virtual size_t mxflib::KLVEObject::WriteDataTo(const mxflib::UInt8*, mxflib::Position, size_t)’:
      crypto.cpp:846: warning: comparison between signed and unsigned integer expressions
      make[2]: *** [crypto.o] Error 1
      make[2]: Leaving directory `/home/videolink/MXF/mxflib/mxflib'
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory `/home/videolink/MXF/mxflib'
      make: *** [all] Error 2

       
      • Matt Beard
        Matt Beard
        2006-10-05

        Two things confuse me about this:

        1) gcc 4.0.0 (which is used to test build during the release procedure) does not flag any of these problems.

        2) The extra qualifications are treated as an error, not a warning.

        As a short-term fix you could try running configure as:
          ./configure CXX=g++-4.0

        This will run the compiler in 4.0 compatibility mode.

         
    • Sascha
      Sascha
      2006-10-05

      I tried it on a 64Bit System with Suse 10.1, I get no error CentOS  i586. But the GCC version is different.

      Your fix doesnt work.
      :/home/videolink/MXF/mxflib # ./configure CXX=gcc-4.0
      checking for a BSD-compatible install... /usr/bin/install -c
      checking whether build environment is sane... yes
      checking for gawk... gawk
      checking whether make sets $(MAKE)... yes
      checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
      See `config.log' for more details.

       
      • Matt Beard
        Matt Beard
        2006-10-05

        OK, it looks like you will have to remove the stray "MXFFile::" prefixes on the quoted lines.

        I will ensure that these fixes are also made for the full 1.0.0 release.

         
        • Sascha
          Sascha
          2006-10-05

          ok after removing, it works with a lot of warnings :-) Thanks