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

Failed to build 4.3 on GCC 4.9.3 due to -DQT_RESTRICTED_CAST_FROM_ASCII

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.3.0-rc1
    • Fix Version/s: Qt Creator 4.3.0-rc1
    • Labels:
      None
    • Environment:
      qtbase 534c1ce76d499c680b1b5163346064e8b2bc4617 (yes, pretty old)
      qt-creator f0d14da7b9a4ec7ffd2c5fa484311992ee4e97e3 (tip of the 4.3 branch)
      GCC "gcc (Gentoo Hardened 4.9.3 p1.5, pie-0.6.4) 4.9.3"
    • Commits:
      10c285db86e78a773eb5aa98932500839e820179

      Description

      Commit 11c87bd9182368e6597554a9719b329a6f480635 breaks the build for GCC 4.9.3:

      qt-creator/src/plugins/cmakeprojectmanager[4.3] $ g++ -c -pipe -O2 -std=gnu++1y -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DCMAKEPROJECTMANAGER_LIBRARY -D'RELATIVE_PLUGIN_PATH="../lib/qtcreator/plugins"' -D'RELATIVE_LIBEXEC_PATH="../libexec/qtcreator"' -D'RELATIVE_DATA_PATH="../share/qtcreator"' -D'RELATIVE_DOC_PATH="../share/doc/qtcreator"' -DIDE_LIBRARY_BASENAME=\"lib\" -DQT_CREATOR -DQT_NO_CAST_TO_ASCII -DQT_RESTRICTED_CAST_FROM_ASCII -DQT_DISABLE_DEPRECATED_BEFORE=0x050600 -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_FAST_CONCATENATION -DQMAKE_AS_LIBRARY -DPROPARSER_THREAD_SAFE -DPROEVALUATOR_THREAD_SAFE -DPROEVALUATOR_CUMULATIVE -DPROEVALUATOR_DUAL_VFS -DPROEVALUATOR_SETENV -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CONCURRENT_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../../../src -I../../../src -I../../libs -I/home/jkt/work/prog/qt-creator/tools -I../../plugins -I../../shared -I../../libs/3rdparty -I. -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -I.moc/release-shared -I/usr/lib64/qt5/mkspecs/linux-g++ -o /dev/null cmakebuildstep.cpp
      cmakebuildstep.cpp: In static member function ‘static QString CMakeProjectManager::Internal::CMakeBuildStep::cleanTarget()’:
      cmakebuildstep.cpp:394:12: error: could not convert ‘(const char*)"clean"’ from ‘const char*’ to ‘QString’
           return "clean";
                  ^
      cmakebuildstep.cpp: In static member function ‘static QString CMakeProjectManager::Internal::CMakeBuildStep::allTarget()’:
      cmakebuildstep.cpp:399:12: error: could not convert ‘(const char*)"all"’ from ‘const char*’ to ‘QString’
           return "all";
                  ^
      cmakebuildstep.cpp: In static member function ‘static QString CMakeProjectManager::Internal::CMakeBuildStep::installTarget()’:
      cmakebuildstep.cpp:404:12: error: could not convert ‘(const char*)"install"’ from ‘const char*’ to ‘QString’
           return "install";
                  ^
      cmakebuildstep.cpp: In static member function ‘static QString CMakeProjectManager::Internal::CMakeBuildStep::cleanTarget()’:
      cmakebuildstep.cpp:395:1: warning: control reaches end of non-void function [-Wreturn-type]
       }
       ^
      cmakebuildstep.cpp: In static member function ‘static QString CMakeProjectManager::Internal::CMakeBuildStep::allTarget()’:
      cmakebuildstep.cpp:400:1: warning: control reaches end of non-void function [-Wreturn-type]
       }
       ^
      cmakebuildstep.cpp: In static member function ‘static QString CMakeProjectManager::Internal::CMakeBuildStep::installTarget()’:
      cmakebuildstep.cpp:405:1: warning: control reaches end of non-void function [-Wreturn-type]
       }
       ^
      

      It builds fine with clang 3.9. Removing the -DQT_RESTRICTED_CAST_FROM_ASCII lets the build continue as well. Unless my older qtbase breaks something, this is probably a bug in my compiler, so I'll let you evaluate whether this is something that you want to address or not.

        Attachments

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

          Activity

            People

            Assignee:
            hunger Tobias Hunger
            Reporter:
            jkt Jan Kundrát
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes