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

QMake fails to build with build directories deeper then the source directory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.4
    • 4.7.1
    • Build tools: qmake
    • None
    • e22e36bc61b4af7c0a9113617df5a35ed315dede

    Description

      This is a follow up to QTCREATORBUG-1036

      Steps to reproduce:

      a) Create a dummy project in (touch main.cpp && qmake -project is good enough)
      C:\TMP\dummy\ [1]

      b) create a build directory
      c:\TMP\dummy-build\desktop [2]

      c) Run qmake in that build directory

      d) Check the Makefile for the qmake target
      It should be -spec ..\..\..\path-to-qt\mkspecs\somespec
      That is relative and as many ".." as the build directory is deep
      And more ".." than the source directory is deep

      e) make qmake
      This will call qmake - spec ../../../path-to-qt\mkspecs\somespec

      Diving into the qmake code, the current working directory is set to c:\TMP\dummy
      And on line 1353 if (QFile::exists( ../../../path-to-qt/mkspecs/somespec + "/qmake.conf")) returns true
      which leads to line 1354 Option::mkfile::qmakespec = QFileInfo("C:\TMP\dummy/../../../path-to-qt/mkspecs/somespec/qmake.conf").absoluteFilePath()
      which leads to setting Option::mkfile::qmakespec to C:/../path-to-qt/mkspecs/somespec/qmake.conf

      And qmake then fails with:
      Failure to read QMAKESPEC conf file c:/../path-to-qt/mkspecs/somespec/qmake.conf
      MAKEFILE_GENERATOR variable not set as a result of parsing : C:/QtCreator/qtcreator-2.0.0beta/untitled15/untitled15.pro. Possibly qmake was not able to find files included using "include(..)" - enable qmake debugging to investigate more.

      [1] This directory needs to be not parent directory of the qt directory and be not deep in the file hierarchy and probably on the same drive as qt
      [2] This directory needs to be one level deeper then [1]

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            dt Daniel Teske
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes