Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-11431

QtCreator does not compile on CentOS 6 due to -Werror in a .pro file.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 3.1.0-beta
    • Qt Creator 3.0.0
    • Building Qt Creator
    • None
    • CentOS 6.5 with Qt 5.2.0 built from tarball source.
    • 8a8092912b23aef54b9d6c9f02075a4057335f19

    Description

      Building QtCreator from the tarball source fails due to the following error:

      make[3]: Entering directory `/install/build/qt-creator-3.0.0_CentOS_6.5/src/shared/qbs/src/lib'
      g++ -c -pipe -Werror -O2 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_CREATOR -DQML_BUILD_STATIC_LIB -DQBS_LIBRARY -DSRCDIR=\"/install/src/qt-creator-opensource-src-3.0.0/src/shared/qbs/src/lib\" -DQBS_VERSION=\"1.1.1\" -DQT_NO_DEBUG -DQT_XML_LIB -DQT_SCRIPT_LIB -DQT_CORE_LIB -I/usr/local/Qt-5.2.0/mkspecs/linux-g++ -I/install/src/qt-creator-opensource-src-3.0.0/src/shared/qbs/src/lib -I/install/src/qt-creator-opensource-src-3.0.0/src/shared/qbs/src/lib -I/install/src/qt-creator-opensource-src-3.0.0/src/shared/qbs/src -I/usr/local/Qt-5.2.0/include -I/usr/local/Qt-5.2.0/include/QtXml -I/usr/local/Qt-5.2.0/include/QtScript -I/usr/local/Qt-5.2.0/include/QtCore -I. -I. -o project.o /install/src/qt-creator-opensource-src-3.0.0/src/shared/qbs/src/lib/api/project.cpp
      cc1plus: warnings being treated as errors
      In file included from /usr/local/Qt-5.2.0/include/QtCore/qobject.h:56,
                       from /usr/local/Qt-5.2.0/include/QtCore/qsharedpointer_impl.h:65,
                       from /usr/local/Qt-5.2.0/include/QtCore/qsharedpointer.h:50,
                       from /usr/local/Qt-5.2.0/include/QtCore/QSharedPointer:1,
                       from /install/src/qt-creator-opensource-src-3.0.0/src/shared/qbs/src/lib/api/../language/forward_decls.h:32,
                       from /install/src/qt-creator-opensource-src-3.0.0/src/shared/qbs/src/lib/api/project.h:32,
                       from /install/src/qt-creator-opensource-src-3.0.0/src/shared/qbs/src/lib/api/project.cpp:29:
      /usr/local/Qt-5.2.0/include/QtCore/qbytearray.h: In function ‘int qRegisterNormalizedMetaType(const QByteArray&, T*, typename QtPrivate::MetaTypeDefinedHelper<T, (QMetaTypeId2::Defined && (! QMetaTypeId2::IsBuiltIn))>::DefinedType) [with T = qbs::Internal::InternalJob*]’:
      /usr/local/Qt-5.2.0/include/QtCore/qbytearray.h:446: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
      /usr/local/Qt-5.2.0/include/QtCore/qbytearray.h:451: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
      /usr/local/Qt-5.2.0/include/QtCore/qarraydata.h:104: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
      /usr/local/Qt-5.2.0/include/QtCore/qgenericatomic.h:96: error: dereferencing pointer ‘<anonymous>’ does break strict-aliasing rules
      /usr/local/Qt-5.2.0/include/QtCore/qbytearray.h:408: note: initialized from here
      make[3]: *** [project.o] Error 1
      make[3]: Leaving directory `/install/build/qt-creator-3.0.0_CentOS_6.5/src/shared/qbs/src/lib'
      

      The error seems to be caused by the -Werror flag. This flag is set in the file src/shared/qbs/src/lib/lib.pro in line 26. When the flag is commented out in this file, the compilation is successful.

      For me it is unclear why the flag is set there. Interestingly the directory src/shared/qbs does not exist in the code on qt.gitorious.org.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            sebastian42 Sebastian Ihle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes