Unsolved Project parsing fails between qmake 3.0 and qmake 3.1 for the same configuration
-
I spent too much time trying to figure this out so I'm asking for your help.
I use some custom mkspec to build my project through qt creator.
I created kit with path to my custom mkspec.
Effective qmake call is basically:
/usr/lib/x86_64-linux-gnu/qt5/bin/qmake project.pro -spec some_spec
On Ubuntu 16.04 and qmake 3.0 this works fine however if I use qmake 3.1 it fails with this errorStarting: "/usr/lib/qt5/bin/qmake" project.pro -spec some_spec Project MESSAGE: Using rootstrap: /home/user/tizen-studio/platforms/tizen-4.0/wearable/rootstraps//wearable-4.0-device.core Project WARNING: qmake spec does not announce the compiler family. Guessed gcc. Project ERROR: Cannot run compiler '/home/user/tizen-studio/tools/arm-linux-gnueabi-gcc-6.2/bin/arm-linux-gnueabi-g++'. Output: =================== # 1 "/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/macros.cpp" =================== Maybe you forgot to setup the environment?
My best guess is that problem is in either my spec file or qmake.
If I run qmake -query on qmake 3.0 in my system I get:
QMAKE_SPEC:linux-g++-64
If I run qmake -query on qmake 3.1 in the same system I get:
QMAKE_SPEC:linux-g++
I'm aware that my compiler specification should be read entirely from my spec file but then why it works/fails on different qmake versions ? -
Hi and welcome to devnet,
Do you have a mix of 32 and 64bit Qt installed ?
How did you install Qt ? -
sudo apt-get install qt5-default and only Qt Creator through online install (no qt framework).
-
Then how come you have two different versions of qmake on your system ?
-
Sorry my mistake. System is ubuntu 16.04:
qmake 3.0 was installed through sudo apt-get install qt5-default.
qmake 3.1 was installed through online installer together with qt creator.
I switch between qmake version by changing it in Kits->Qt version
I also checked and on ubuntu 20.04 'sudo apt-get install qt5-default' install qmake 3.1 and this problem basically blocks my switch to new system. Installing old qmake version is not a solution. -
You should rather have two different kits.
Are you sure they are setup properly ?
-
Yes. QT creator kit doesn't report any errors and I can build successfully. I can have two kits where only difference is qmake version or one kit and just switch qmake version. Result is the same.
-
qmake is always bound to a specific Qt version. The qmake version was last bumped for Qt 5.8, which means that your also comparing two different Qt versions, one older than Qt 5.8, and one newer...
Anyhow, is
/home/user/tizen-studio/tools/arm-linux-gnueabi-gcc-6.2/bin/arm-linux-gnueabi-g++
actually the right compiler to use? Can you run it manually?
/home/user/tizen-studio/tools/arm-linux-gnueabi-gcc-6.2/bin/arm-linux-gnueabi-g++ -E "/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/macros.cpp"
-