Build error, Qt 5.10, Windows
-
Have been using Qt for quite a while to build a number of (primarily desktop) apps. In particular, have successfully used my existing Qt installation to build a handful of diverse apps.
Now suddenly I can no longer build anything. I am using Qt Creator 4.5.0 and Qt 5.10.0.
The specific error is:
13:13:40: Could not start process "qmake.exe" someproject.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug"
Error while building/deploying project someproject (kit: Desktop Qt 5.10.0 MinGW 32bit)
When executing step "qmake"
I suspect some configuration setting has gotten messed up but don't know where to start.
IMPORTANT NOTES:
Outside the Qt Creator environment, and without need to tweek any environment variables, I can issue the relevant qmake command to create the appropriate Makefile, etc.
I can then simply issue "mingw32-make.exe" to successfully build the app.
BTW, after having run the qmake command outside of Qt Creator, Qt gives a comparable error "13:41:20: Could not start process mingw32-make.exe".
Any suggestions where to look for why Qt Creator fails in issuing the qmake command?
-
Hi,
Take a look at the "Build and Run" panel of Qt Creator's preferences. You can find there your Kits, Qt Versions, Compilers etc.
-
All of the build/run options seem correctly set.
BTW, I have experienced many prior errors with these settings. ALL prior errors have been of the ilk [compiler, make, qmake, etc] not found or specific errors reported from those tools. I have never seen a "could not start process" error.
If you refer to specific preferences that cause errors like the one I report, it would be more helpful to point specific to those sorts of preferences.
-
@drmhkelley If you go to "Build & Run/Qt Versions" do you see any warnings/errors there? Is the path to qmake.exe set properly there?
-
There are no errors there.
As mentioned in my original post, I can cut/paste the qmake command into a command window (with current directory properly set) and and run qmake. I can then cut/paste the configured make command to correctly make the app.
-
Did you modify the PATH environment variable within Qt Creator ?
-
Not sure what you mean. PATH seems to be correct in my Windows environment (i.e., everything works outside Qt Creator), but I don't recall seeing anywhere in Qt Creator's options where to set a different value for PATH.
Further, the error message appears to give verbatim the command for which a process cannot start - that command includes the full path for the failing command. It looks more like whatever mechanism, internal to Qt Creator for starting additional processes, is itself the problem.
-
In the Project panel, you have there the environment setup for build time and run time.
A wild idea, did you try to nuke the .pro.user file and reconfigure your project anew ?
-
I resolved this problem. Well, I resolved this particular instance of a larger and completely weird problem.
Turns out, Qt/Tools/QtCreator/bin was missing two files (don't ask how I eventually figured this out). qtcreator_ctrlc_stub.exe and Clangbackendipc4.dll were just not there - not a clue how/when they disappeared. Once I restored them, QtCreator seems to work correctly.
Full disclosure, I have experienced behavior like this before - enough that I now officially believe in gremlins. Occasional, important files (like g++.exe, make.exe, ar.exe, and others) just vanish. In the middle of a multi-step make process, g++.exe will just vanish., causing make to fail with a "cannot fine g++" error, after having already compiled a couple dozen files.
So the problem you tried to help me with will likely recur at some point, but at least I now have a better chance of tracking down this really bizarre failure.
Thanks.
-
Glad you found out and thanks for sharing !
Do you have any anti-virus running on your system ?
-
I do have anti-virus - up-to-date McAfee. Why do you ask? I (somewhat) regularly check the McAfee logs and never saw that it had quarantined any of the affected files.
-
Because they sometimes just delete generated executable without any notifications.