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

Custom build fails with PCH

    XMLWordPrintable

Details

    • Linux/X11
    • 604ace0095 (qt/qtbase/dev) 02a4e83ad9 (qt/qtbase/6.3) 02a4e83ad9 (qt/tqtc-qtbase/6.3) 604ace0095 (qt/tqtc-qtbase/dev) 3e5aa0e15a (qt/qtbase/6.2) 3e5aa0e15a (qt/tqtc-qtbase/6.2)

    Description

      When trying to remove some unrequired features/modules , the build fails with precompiled headers enabled. How, when using the configuration flag -no-pch the build compiles just fine.

      Below are the two configure calls that  were used:

      ../qt6/configure -no-feature-undogroup -no-feature-undocommand -no-feature-undoview -no-feature-undogroup -no-feature-designer -no-feature-linguist -skip qtquick3d
      

      Error:

      [2367/7248] Building CXX object qtbase/src/openglwidgets/CMakeFiles/OpenGLWidgets.dir/cmake_pch.hxx.gch
      FAILED: qtbase/src/openglwidgets/CMakeFiles/OpenGLWidgets.dir/cmake_pch.hxx.gch 
      ccache /usr/bin/c++ -DOpenGLWidgets_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_OPENGLWIDGETS_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_GUI_LIB -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_USING_NAMESPACE -DQT_OPENGL_LIB -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/home/jmo/git/qt6-build/qtbase/src/openglwidgets/OpenGLWidgets_autogen/include -I/home/jmo/git/qt6-build/qtbase/include -I/home/jmo/git/qt6-build/qtbase/include/QtOpenGLWidgets -I/home/jmo/git/qt6/qtbase/src/openglwidgets -I/home/jmo/git/qt6-build/qtbase/src/openglwidgets -I/home/jmo/git/qt6-build/qtbase/include/QtOpenGL -I/home/jmo/git/qt6-build/qtbase/include/QtCore -I/home/jmo/git/qt6/qtbase/mkspecs/linux-g++ -I/home/jmo/git/qt6-build/qtbase/include/QtGui -I/home/jmo/git/qt6-build/qtbase/include/QtWidgets -I/home/jmo/git/qt6-build/qtbase/src/opengl -I/home/jmo/git/qt6-build/qtbase/include/QtOpenGL/6.2.2 -I/home/jmo/git/qt6-build/qtbase/include/QtOpenGL/6.2.2/QtOpenGL -I/home/jmo/git/qt6-build/qtbase/src/corelib -I/home/jmo/git/qt6-build/qtbase/include/QtCore/6.2.2 -I/home/jmo/git/qt6-build/qtbase/include/QtCore/6.2.2/QtCore -I/home/jmo/git/qt6-build/qtbase/src/gui -I/home/jmo/git/qt6-build/qtbase/include/QtGui/6.2.2 -I/home/jmo/git/qt6-build/qtbase/include/QtGui/6.2.2/QtGui -I/home/jmo/git/qt6-build/qtbase/src/widgets -I/home/jmo/git/qt6-build/qtbase/include/QtWidgets/6.2.2 -I/home/jmo/git/qt6-build/qtbase/include/QtWidgets/6.2.2/QtWidgets -DNDEBUG -O2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -fPIC -Wsuggest-override -Winvalid-pch -x c++-header -include /home/jmo/git/qt6-build/qtbase/src/openglwidgets/CMakeFiles/OpenGLWidgets.dir/cmake_pch.hxx -MD -MT qtbase/src/openglwidgets/CMakeFiles/OpenGLWidgets.dir/cmake_pch.hxx.gch -MF qtbase/src/openglwidgets/CMakeFiles/OpenGLWidgets.dir/cmake_pch.hxx.gch.d -o qtbase/src/openglwidgets/CMakeFiles/OpenGLWidgets.dir/cmake_pch.hxx.gch -c /home/jmo/git/qt6-build/qtbase/src/openglwidgets/CMakeFiles/OpenGLWidgets.dir/cmake_pch.hxx.cxx
      In file included from /home/jmo/git/qt6-build/qtbase/include/QtCore/qglobal.h:1,
                       from /home/jmo/git/qt6-build/qtbase/include/QtCore/QtCore:4,
                       from /home/jmo/git/qt6-build/qtbase/include/QtOpenGL/QtOpenGLDepends:3,
                       from /home/jmo/git/qt6-build/qtbase/include/QtOpenGL/QtOpenGL:3,
                       from /home/jmo/git/qt6-build/qtbase/src/openglwidgets/CMakeFiles/OpenGLWidgets.dir/cmake_pch.hxx:5,
                       from <command-line>:
      /home/jmo/git/qt6/qtbase/src/gui/util/qundogroup.h:47:1: error: static assertion failed: Required feature undogroup for file /home/jmo/git/qt6/qtbase/src/gui/util/qundogroup.h not available.
         47 | QT_REQUIRE_CONFIG(undogroup);
            | ^~~~~~~~~~~~~~~~~
      /home/jmo/git/qt6/qtbase/src/gui/util/qundostack.h:47:1: error: static assertion failed: Required feature undocommand for file /home/jmo/git/qt6/qtbase/src/gui/util/qundostack.h not available.
         47 | QT_REQUIRE_CONFIG(undocommand);
            | ^~~~~~~~~~~~~~~~~
      

      Whereas

      ../qt6/configure -no-feature-undogroup -no-feature-undocommand -no-feature-undoview -no-feature-undogroup -no-feature-designer -no-feature-linguist -skip qtquick3d -no-pch
      

      compiles as expected.

      Am I missing something here?
       
      I followed the guide to build from git found here: https://wiki.qt.io/Building_Qt_6_from_Git

      Attachments

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

        Activity

          People

            kkohne Kai Köhne
            janmoeller Jan Möller
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes