Build worked with QT6.2.4 but failing with QT6.5.3
-
Dear all,
I understand this is maybe far fetched, but in my CI-setup - where we compile QT win64 binaries with Dockers / msys2 - something changed and the build itself started failing.
What fails:
make[3]: Entering directory 'C:/build/my-application/build' [ 1%] Generating qml_de.qm .qt/bin/qt_setup_tool_path.bat C:/QT/6.5.3/mingw_64/bin/lrelease.exe -idbased C:/build/my-application/qml/assets/translations/qml_de.ts -qm C:/build/my-application/build/qml_de.qm '.qt' is not recognized as an internal or external command, operable program or batch file. make[3]: *** [CMakeFiles/MyApp_lrelease.dir/build.make:80: qml_de.qm] Error 1
That is; there is some kind of tool wrap
.qt/bin/qt_setup_tool_path.bat
that the shell is not happy. Tracking down, it seems to have something to do with./6.5.3/mingw_64/lib/cmake/Qt6/QtPublicToolHelpers.cmake: set(tool_command_wrapper_path "${tool_command_wrapper_dir}/qt_setup_tool_path.bat")
The
CMakeCache.txt
cache shows ok, full path (that does work if it would be launched that way)://Path to the wrapper of the tool commands QT_TOOL_COMMAND_WRAPPER_PATH:INTERNAL=C:/build/my-application/build/.qt/bin/qt_setup_tool_path.bat
The all comes from the
CMakefile.txt
command:qt_add_translations(MyApplication TS_FILES ${ts_files} LRELEASE_OPTIONS -idbased)
Now - i can get the build done, by manually removing the
.qt/bin/qt_setup_tool_path.bat
Would there be any ideas
(a) What is going wrong here
(b) how could i manually override not to include this 'tool wrap'The enviroment should be about the same, but the Docker build script does load latest from the msys2 repository so some internal tools (cmake?) might have been updated.
-
And continued to dig out, the culprit is indeed file Qt6LinguistToolsMacros.cmake with commit b5a285f4c51eb1cede244251d8e010537f2b9a36 @ qttools.git
--- a/src/linguist/Qt6LinguistToolsMacros.cmake +++ b/src/linguist/Qt6LinguistToolsMacros.cmake @@ -167,8 +167,11 @@ set(lupdate_sources \"${sources}\") set(lupdate_translations \"${ts_files}\") ") - _qt_internal_wrap_tool_command(lupdate_command SET - $<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::lupdate>) + _qt_internal_get_tool_wrapper_script_path(tool_wrapper) + set(lupdate_command + COMMAND + "${tool_wrapper}" + $<TARGET_FILE:${QT_CMAKE_EXPORT_NAMESPACE}::lupdate>)
Based on my code reading it looks like the thing should work, but for some reason the ${tool_wrapper } gets relative rather than absolute.
-
Created bug report: https://bugreports.qt.io/browse/QTBUG-118406