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

Wrong path in a Qt CMake file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Cannot Reproduce
    • Affects Version/s: 5.11.1
    • Fix Version/s: None
    • Component/s: Build System: CMake
    • Labels:
    • Environment:
      Windows 10
    • Platform/s:
      Windows

      Description

      I'm working on Windows 10.

      I had a static version of Qt that I compiled fresh from https://download.qt.io/archive/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.zip

      with the configuration options "-commerical -no-accessibility -nomake examples -debug-and-release -platform win32-g++ -static -qt-libjpeg -opengl desktop"

      For the compiler, I use a MinGW 64 (GNU Make 4.1 built for i686-w64-mingw32), although the compiler should not be relevant here.

      With that, I wanted to build VTK 8.1.1 (I also tested other versions), with it's Qt classes (the VTK_Group_Qt flag in VTK). Generating the VTK Makefile using the CMake GUI failed, saying

      The imported target "Qt5::Core" references the file

          "C:/build_environment/qt-everywhere-src-5.11.1/qtbase/.../qt-everywhere-src-5.11.1/qtbase//mkspecs/win32-g++"

      but this file does not exist. Possible reasons include:

      • The file was deleted, renamed, or moved to another location.
      • An install or uninstall procedure did not complete successfully.
      • The installation package was faulty and contained

          "C:/build_environment/qt-everywhere-src-5.11.1/qtbase/lib/cmake/Qt5Core/qt5CoreConfigExtras.cmake"

      but not all the files it references

      Obviously, the path where it searches mkspecs is wrong, it acts as if the qtbase folder would not exist and everything was in it's parent folder.

      I originally thought that VTK was the problem here, or better to say incompatibilities of versions, and asked this as a question on SO:

      https://stackoverflow.com/questions/52002432/wrong-path-for-qt-mkspecs-when-generating-makefile-for-vtk-under-windows-10

      Then I took a look at one particular cmake file that the Qt configuration created:

      qt-everywhere-src-5.11.1/qtbase/lib/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake

      The file contained a single line:

      set(_qt5_corelib_extra_includes "${_qt5Core_install_prefix}/.../qt-everywhere-src-5.11.1/qtbase//mkspecs/win32-g++")

      which I changed to

      set(_qt5_corelib_extra_includes "${_qt5Core_install_prefix}/mkspecs/win32-g++")

      and everything worked.

      I thought that maybe I made a mistake while configuring Qt, but taking a look at the options I used above, I don't see where it could be. Another user on SO suggested that it might be an actual bug in Qt, which is why I came here.

       

       

       

        Attachments

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

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            gwyn_ap_nudd Prizl Quax
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes