Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] QMAKESPEC has not been set ... Linux
I have cloned a Debian VM in which I perfectly can develop and compile my eLinux project.
In the clone I created a new user account and set up everything for this new user.
However, building the exact same project with the exact same sources returns:
@QMAKESPEC has not been set, so configuration cannot be deduced.
Error processing project file: src/qtgui.pro
I have echoed all parameters that are in the makefile and they are exactly the same as in the original VM. I have also compared the env to no avail. Does somebody have a clue how I get this thing to build?
andreyc last edited by
Did you install Qt from qt-project.org or it is Qt that comes with Debian?
What is result of qmake -query ?
Neither one. It's a package supplied from a chip manufacturer incorporating changes he made to have it work with his SDK to develop for his SoC.
However, the query seems to help. It looks as if all the props point to the old user account (path in home directory) that has been used before cloning the VM instead of pointing to the current users respective path.
How can I easily correct this, i.e. regenerating these props?
andreyc last edited by
Reinstall SDK under new user.
Create a qt.conf file in SDK bin directory. The directory where is qmake and all other Qt tools are located
Here is an example of qt.conf
Prefix = /path/to/root/of/qt-sdk
Then run qmake -query to see a result.
Basically, this works. However, it does not set all built-in props as supposed.
Where are these built-in props stored?
I did set all properties to the new user path using a shell script.
Now, I have all properties doubled, with the old path as well as with the new path. How could the same property be there twice? Shouldn't that be overwritten?
As a matter of fact, compiling only works with your solution. I had to remove the QMake.conf that was created by QMake when I executed my script.
It really looks as if the current props have been hardcoded into qmake at install/buildtime of the Qt package.
The solution with the qt.conf works and I implemented a "svn-fit" solution that works for all users with a single touch at first co.
All tools in /bin have hardcoded paths.
I actually absolutely don't understand why one would design a system that creates executables with hardcoded paths in the firstplace ... but that's not the point here.
Prefix = /home/username/path/to/qt
Examples = examples
Demos = demos