Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.14.2
-
None
-
-
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:
- Project includes a pri that contains qrc file with qml file inside
- Pri subproject directory is located outside project directory
- 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?