Qt6 MSVC2019 Build Attempt: Cmake Error at .../QtProcessConfigureArgs.cmake:788 (Exit Code 1)
-
Unfortunately Qt6 has been a bit of spinning wheels for me so far:
- I can't configure a static build with MSVC2019 due to QTBUG-88581
- The prebuilt MSVC2019 64bit kit of Qt6 available through the maintenance tool has a strange issue where all locals/expressions/watches are completely borked: Strings showing as empty, lists showing incorrect contents and element counts, most variables showing as "not accessible", etc). So, I tried building it myself to see if it was a compatibility issue with the exact versions of the underlying tools I have and that were used to compile the prebuilt, which led to:
- Couldn't configure a non-static debug -debug-and-release build due to QTBUG-88015
- After manually replacing MSVC2019 v142's cmake version with 3.19.2 to avoid 88015, the -debug-and-release build finished with no errors (in the console at least) yet was completely missing its "d" debug libraries in the lib folder, making the Debug config unusable
At this point, I am attempting to build 6.0 using MSVC2019 v142 (with CMake 3.19.2 manually inserted, though this issue happens with stock CMake as well) with just "-debug" to see if I can get that working and maybe figure out why the debugging components of the mixed config end up uncompiled.
Config:
configure.bat -debug -prefix C:\B -platform win32-msvc -opensource -confirm-license -skip webengine -nomake tools -nomake examples -nomake tests -opengl desktop -optimize-size -no-pch -make-tool jom -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype
Full Output:
https://pastebin.com/HFXJMKgrError Section:
Qt is now configured for building. Just run 'cmake --build . --parallel' Once everything is built, you must run 'cmake --install .' Qt will be installed into 'C:/B' To configure and build other Qt modules, you can use the following convenience script: C:/B/bin/qt-configure-module.bat If reconfiguration fails for some reason, try to remove 'CMakeCache.txt' from the build directory CMake Error at C:/Engineering/Development/Qt/src/qt-everywhere-src-6.0.0/qtbase/cmake/QtProcessConfigureArgs.cmake:788 (message): CMake exited with code 1.
CMakeOutput.log: https://pastebin.com/6aj8zW41
CMakeError.log: https://pastebin.com/dKtGmCmeAny idea of what's going on?
Just hoping to be able to get a debug build going for now at least so I can port a few apps and then use the release build to do some speed tests between Qt5/6 and use some of the patches I sent upstream :)
-
@oblivioncth Hey, were you able to get it working? I feel like I'm in the same bucket here...
-
Just hit a similar issue, this happens when an option is incompatible with a condition, in this case the error is at line 145 in your log:
CMake Error at qtbase/cmake/QtFeature.cmake:207 (message): Feature "optimize_size": Forcing to "ON" breaks its condition.
Compiling without
-optimize-size
should help. -
Hello,
I observe a similar issue as @oblivioncth and @Dariusz following official wiki steps. I tried on dev branch.
My command was:
"../qt6-source/configure.bat" -developer-build -- -D QT_BUILD_TESTS_BY_DEFAULT=OFF
My configure.bat output:
https://pastebin.com/bxBii2d5Of course, on Linux everything works smoothly :)
Were you guys able to fix the problem?
-
Sorry, I hadn't come back to trying this for a while.
I was able to get past this by dropping -optimize-size, but ran into other strange issues, primarily where a purely debug build had a bunch of errors and a mixed config build would not create the debug lib files (likely due to the same cause, just the errors didn't show or halt the build for some reason) even though the process appeared to complete successfully.
Not having much luck with Qt6 it seems, which is a shame since I'd really like to make use of the upstream changes I submitted for it.
Luckily at this point MSVCs internal CMake version has been updated to one that is compatible with Qt6, so the manual replacement is no longer needed.
I'm currently trying to build 6.1 and was able to get past the configure step, though I had to disable tests (which this time I wanted to confirm it built correctly) due to QTBUG-88829, so I'll see if I have better luck this time. If the mixed build doesn't work I'll try just a debug one again to see if there are the errors I had before, or if not so that I can compile tests and see what might be failing.