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

Invalid qmlcache file name generated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.14.2
    • Fix Version/s: 5.15.1
    • Component/s: Build System
    • Labels:
      None
    • Platform/s:
      Windows
    • Commits:
      dd8e9f3fae84da3dd40b94122ad54d74d329163f (qt/qtdeclarative/dev) 6adf57e8f3dac1912f532cb6956d989b8a148742 (qt/qtdeclarative/5.15)

      Description

      Qt build system generates invalid qmlcache file name for qrc under Windows if the following conditions are met:

      1. Project includes a pri that contains qrc file with qml file inside
      2. Pri subproject directory is located outside project directory
      3. Build directory is on the different drive that the project directory

      In this case qmlcache filename for mentioned qrc starts with windows drive latter followed by a colon. All slashes are replaced with underscores (because file name can not contain slashes), but the colon remains thus making the file name invalid, file's entry in Makefile is also invalid.

      In the attached testcase the invalid rule in Makefile looks like this:

       

      Makefile: E:/projects/testproj/testproj.pro ../../../../Qt/5.14.2/mingw73_64/mkspecs/features/spec_pre.prf \
      <lines are skipped>
      E:_projects_subproj_subproj_qmlcache.qrc
          $(QMAKE) -o Makefile E:/projects/testproj/testproj.pro -spec win32-g++ CONFIG+=qtquickcompiler

      qmlcache.qrc line has a syntax error and the file name is invalid anyway (can not contain colons)

      This leads to the following error during the build:

      C:\Qt\5.14.2\mingw73_64\bin\rcc.exe: File does not exist 'E:_projects_subproj_subproj_qmlcache.qrc'
      C:\Qt\5.14.2\mingw73_64\bin\rcc.exe: File does not exist 'E:_projects_subproj_subproj_qmlcache.qrc'
      WARNING: Failure to find: E:_projects_subproj_subproj_qmlcache.qrc
      WARNING: Failure to find: E:_projects_subproj_subproj_qmlcache.qrc

      C:/projects/git/build/testproj-Desktop_Qt_5_14_2_MinGW_64_bit-Release/Makefile:73: *** multiple target patterns. Stop.

       

      Possible solution is to replace colon with underscore too maybe?

       

        Attachments

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

          Activity

            People

            Assignee:
            kkohne Kai Köhne
            Reporter:
            thesourcehim Max Fedotov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes