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

Build fails when configuring twice with CMake and with both INSTALL_MKSPECSDIR and QT_QMAKE_TARGET_MKSPEC set

    XMLWordPrintable

    Details

    • Commits:
      478f5fcde66a49b710c427447916a0ee0e4d9e0a (qt/qtbase/dev) b33913318ba43addb28acf1c5326cbbf454b1bbe (qt/qtbase/6.2) 943b561c329f7a893cd09517a52ee9fbd004f420 (qt/qtbase/6.1)

      Description

      Issue:

      When both the "INSTALL_MKSPECSDIR" and "QT_QMAKE_TARGET_MKSPEC" variables are provided, building the Qt fails if it has been configured more than two times. This probably impacts previous versions too.

       

      Reproduction: 

      • Run this twice:

       

      cmake {qt5_source_dir} -G Ninja \
        -DQT_QMAKE_TARGET_MKSPEC=linux-g++ \
        -DINSTALL_MKSPECSDIR=install/archdatadir/mkspecs

       

      • Build:

       

      cmake --build . -v -j
      
      • Compiling every translation unit fails with:

       

      /home/tibo/Downloads/qt5/qtbase/src/corelib/io/qfilesystemmetadata_p.h:54:10: fatal error: qplatformdefs.h: No such file or directory
         54 | #include "qplatformdefs.h"

       

       

      Causes:

      The variable "
      QT_DEFAULT_PLATFORM_DEFINITION_DIR_ABSOLUTE" is defined differently in "QtBuild.cmake" depending on whether "QT_PLATFORM_DEFINITION_DIR" is defined or not. The second time the project is configured, "QT_PLATFORM_DEFINITION_DIR" is is the cache (and defined) and the "QT_DEFAULT_PLATFORM_DEFINITION_DIR_ABSOLUTE" is set to a non-existing directory.
       

        Attachments

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

          Activity

            People

            Assignee:
            semlanik Alexey Edelev
            Reporter:
            t6tb7n t6t b7n
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews