Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-51541

Qt 5.6.0 RC fails to build with -c++std c++98 on CentOS 7.2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.6.1
    • 5.6.0 RC
    • Location
    • None
    • CentOS 7.2, gcc 4.8.5

    Description

      When compiling the 5.6.0 release candidate in c++98 mode, the build fails.

      Configured with:

      ./configure -commercial -confirm-license -c++std c++98 -skip qtquickcontrols2 -skip qt3d -skip qtwayland -skip qtserialbus -qt-xcb
      

      Compiler output:

      gmake[4]: Entering directory `/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtlocation/src/imports/location'                                                                                                    
      g++ -c -pipe -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_LOCATION_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I. -I../../location -I../../location/maps -I../../positioning -I../positioning -I. -Ideclarativeplaces -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQuick/5.6.0 -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQuick/5.6.0/QtQuick -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtGui/5.6.0 -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtGui/5.6.0/QtGui -I../../../include/QtLocation/5.6.0 -I../../../include/QtLocation/5.6.0/QtLocation -I../../../include -I../../../include/QtLocation -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQuick -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtGui -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQml/5.6.0 -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQml/5.6.0/QtQml -I../../../include/QtPositioning/5.6.0 -I../../../include/QtPositioning/5.6.0/QtPositioning -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtCore/5.6.0 -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtCore/5.6.0/QtCore -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtdeclarative/include/QtQml -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtNetwork -I../../../include/QtPositioning -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/include/QtCore -I.moc -isystem /usr/include/libdrm -I/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtbase/mkspecs/linux-g++ -o .obj/qquickgeomapgesturearea.o qquickgeomapgesturearea.cpp                                                                                                    
      qquickgeomapgesturearea.cpp: In member function ‘void QQuickGeoMapGestureArea::setAcceptedGestures(QQuickGeoMapGestureArea::AcceptedGestures)’:
      qquickgeomapgesturearea.cpp:396:38: error: ‘GeoMapGesture’ is not a class or namespace
           setPanEnabled(acceptedGestures & GeoMapGesture::PanGesture);                     
                                            ^
      qquickgeomapgesturearea.cpp:397:40: error: ‘GeoMapGesture’ is not a class or namespace
           setFlickEnabled(acceptedGestures & GeoMapGesture::FlickGesture);                 
                                              ^
      qquickgeomapgesturearea.cpp:398:40: error: ‘GeoMapGesture’ is not a class or namespace
           setPinchEnabled(acceptedGestures & GeoMapGesture::PinchGesture);                 
                                              ^
      qquickgeomapgesturearea.cpp: In member function ‘void QQuickGeoMapGestureArea::setEnabled(bool)’:
      qquickgeomapgesturearea.cpp:437:44: error: ‘GeoMapGesture’ is not a class or namespace
               setPanEnabled(m_acceptedGestures & GeoMapGesture::PanGesture);               
                                                  ^
      qquickgeomapgesturearea.cpp:438:46: error: ‘GeoMapGesture’ is not a class or namespace
               setFlickEnabled(m_acceptedGestures & GeoMapGesture::FlickGesture);           
                                                    ^
      qquickgeomapgesturearea.cpp:439:46: error: ‘GeoMapGesture’ is not a class or namespace
               setPinchEnabled(m_acceptedGestures & GeoMapGesture::PinchGesture);           
                                                    ^
      gmake[4]: *** [.obj/qquickgeomapgesturearea.o] Error 1
      gmake[4]: Target `first' not remade because of errors.
      gmake[4]: Leaving directory `/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtlocation/src/imports/location'
      gmake[3]: *** [sub-location-make_first] Error 2                                                                                         
      gmake[3]: Target `first' not remade because of errors.                                                                                  
      gmake[3]: Leaving directory `/usr1/user/btx/packages/qt-5.6rc-gcc/qt-everywhere-enterprise-src-5.6.0-rc/qtlocation/src/imports'         
      gmake[2]: *** [sub-imports-make_first] Error 2     
      

      Apparently, GeoMapGesture enum values are referenced using the enum name, which is allowed in C+11 but not in C+98.

      Fix is attached.

      Attachments

        For Gerrit Dashboard: QTBUG-51541
        # Subject Branch Project Status CR V

        Activity

          People

            paangele Paolo Angelelli
            xburgerhout Xander
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes