WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: With Qt-5.x version 5.14.0 qmake gives compile error  (Read 9431 times)

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
With Qt-5.x version 5.14.0 qmake gives compile error
« on: July 17, 2020, 09:07:18 PM »
I'm getting the following error with Qt-5.14.0 on TCP-11.0:

Code: [Select]
Could not find qmake spec 'linux-g++'.
Error processing project file: /tmp/ostinato/source/ostinato-1.1/ost.pro
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.

Compiling the same package on TCP-10.1 with Qt-5.11.2 goes fine.

From googling a bit I get that the "Could not find qmake spec 'linux-g++'" error is likely an Qt (environment) issue.

I hope someone can help with this..

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #1 on: July 18, 2020, 03:27:52 AM »
The paths containing linux-g++ in qt-5.x-dev are consitant between the versions of qt-5.x-dev in tinycore 10.x and 11x, so you would think that something that worked with one would work with the other...

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #2 on: July 18, 2020, 06:24:27 AM »
Hi Juanito,

I also tried to use Qt-5.11.2 with TCP 11.0 (e.g. wget http://www.tinycorelinux.net/10.x/x86/tcz/qt-5.x-<each needed component>.tcz[.dep|.md5.txt]), and with Qt-5.11.2 it start to compile.
(eventually it failed with a bunch of 'undefined reference' errors, likely due to changes in openssl. Which likely can be solved with using more packages from 10.x)

From that I would think the issue must be with Qt-5.14.0.

First few lines with Qt-5.11.2 on TCP 11.0:
Code: [Select]
DESTDIR = /tmp/ostinato/build
PREFIX = /tmp/ostinato/build/usr/local
Info: creating stash file /tmp/ostinato/source/ostinato-1.1/.qmake.stash
cd common/ && ( test -e Makefile.ostproto || /usr/local/bin/qmake -o Makefile.ostproto /tmp/ostinato/source/ostinato-1.1/common/ostproto.pro ) && make -f Makefile.ostproto
make[1]: Entering directory '/tmp/ostinato/source/ostinato-1.1/common'
protoc --cpp_out=. --proto_path=. protocol.proto
[libprotobuf WARNING google/protobuf/compiler/parser.cc:546] No syntax specified for the proto file: protocol.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
g++ -c -march=i486 -mtune=i686 -pipe -isystem /usr/local/include/qt5 -std=c++11 -Os -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_CORE_LIB -I. -isystem /usr/local/include/qt5 -isystem /usr/local/include/qt5/QtNetwork -isystem /usr/local/include/qt5/QtScript -isystem /usr/local/include/qt5/QtXml -isystem /usr/local/include/qt5/QtCore -I. -I/usr/local/lib/qt5/mkspecs/linux-g++ -o abstractprotocol.o abstractprotocol.cpp

Same lines with Qt-5.14.0 (on TCP 11.0):
Code: [Select]
DESTDIR = /tmp/ostinato/build
PREFIX = /tmp/ostinato/build/usr/local
Could not find qmake spec 'linux-g++'.
Error processing project file: /tmp/ostinato/source/ostinato-1.1/ost.pro
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #3 on: July 18, 2020, 06:57:53 AM »
Is qt-5.x-dev loaded in tc-11.x?

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #4 on: July 18, 2020, 08:31:36 AM »
Yes it is:
Code: [Select]
tc@testapps:/mnt/vda1/tce/optional$ ls -la /usr/local/tce.installed/qt-*
-rw-r--r--    1 tc       staff            0 Jul 18 12:25 /usr/local/tce.installed/qt-5.x-all
-rw-r--r--    1 tc       staff            0 Jul 18 12:24 /usr/local/tce.installed/qt-5.x-base
-rw-r--r--    1 tc       staff            0 Jul 18 12:24 /usr/local/tce.installed/qt-5.x-bin
-rw-r--r--    1 tc       staff            0 Jul 18 12:24 /usr/local/tce.installed/qt-5.x-dbus
-rw-r--r--    1 tc       staff            0 Jul 18 12:25 /usr/local/tce.installed/qt-5.x-dev
-rw-r--r--    1 tc       staff            0 Jul 18 12:24 /usr/local/tce.installed/qt-5.x-extended
-rw-r--r--    1 tc       staff            0 Jul 18 12:24 /usr/local/tce.installed/qt-5.x-opengl
-rw-r--r--    1 tc       staff            0 Jul 18 12:24 /usr/local/tce.installed/qt-5.x-printsupport
-rw-r--r--    1 tc       staff            0 Jul 18 12:24 /usr/local/tce.installed/qt-5.x-script
-rw-r--r--    1 tc       staff            0 Jul 18 12:24 /usr/local/tce.installed/qt-5.x-sql
-rw-r--r--    1 tc       staff            0 Jul 18 12:24 /usr/local/tce.installed/qt-5.x-xml
tc@testapps:/mnt/vda1/tce/optional$

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #5 on: July 18, 2020, 09:36:50 AM »
strange - i've compiled several apps against qt-5.x-dev and things worked...

Offline Rudock1

  • Jr. Member
  • **
  • Posts: 62
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #6 on: August 21, 2020, 11:45:01 AM »
Hi @rhermsen and @Juanito and all.

After loading the entire Qt5-dev environment, I too am stuck right from the start with this same error "Could not find qmake spec 'linux-g++'." Wondering if you might have figured it out or have some suggestions. I've rattled around in StackOverflow and other sites where this error is discussed but I haven't been able to connect the dots and solve it.

Maybe.... can you suggest a current TC11 Qt5 application on the Tiny Core repository which I can use to study the ../src/compile_notes? 

My little compile project is for a simple github clone that has a normal qmake project file qView.pro  (please see below).  Nothing too ambitious to learn the Qt5 ropes... or so I thought. ;-)

Code: [Select]
/tmp/qview/qView]{$?=0}Fri Aug 21 08:16:43 > lg
total 56K
drwxr-xr-x 9  300 Aug 21 08:15 ./
drwxr-xr-x 3   60 Aug 21 08:15 ../
drwxr-xr-x 2  100 Aug 21 08:15 ci/
drwxr-xr-x 5  100 Aug 21 08:15 dist/
drwxr-xr-x 7  240 Aug 21 08:15 .git/
drwxr-xr-x 3   60 Aug 21 08:15 .github/
drwxr-xr-x 2  100 Aug 21 08:15 resources/
drwxr-xr-x 2  760 Aug 21 08:15 src/
drwxr-xr-x 2   80 Aug 21 08:15 tests/
-rw-r--r-- 1 1.3K Aug 21 08:15 azure-pipelines.yml
-rw-r--r-- 1  386 Aug 21 08:15 .gitignore
-rw-r--r-- 1  35K Aug 21 08:15 LICENSE
-rw-r--r-- 1 2.8K Aug 21 08:15 qView.pro
-rw-r--r-- 1 1.1K Aug 21 08:15 README.md
-rw-r--r-- 1  251 Aug 21 08:15 resources.qrc
[/tmp/qview/qView]{$?=0}Fri Aug 21 08:16:44 > qmake
Could not find qmake spec 'linux-g++'.
Error processing project file: /tmp/qview/qView/qView.pro
[/tmp/qview/qView]{$?=3}Fri Aug 21 08:16:51 >

I appreciate any ideas and suggestions.
thx
Billy
Rio Del Mar, California

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #7 on: August 21, 2020, 12:30:44 PM »
Hi Billy,

I used TCL-10.x/Qt-5.11.2 to successfully compile my Qt5 program.

Unfortunately I have not found a workaround/solution to achieve the same with TCL-11.0/Qt-5.14.0.
(for me it is easy to spin up a TCL-10.x VM i.s.o. TCL-11...)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #8 on: August 22, 2020, 02:44:55 AM »
Maybe.... can you suggest a current TC11 Qt5 application on the Tiny Core repository which I can use to study the ../src/compile_notes? 

avidemux was compiled against qt-5.x-dev relatively recently: http://tinycorelinux.net/11.x/x86_64/tcz/src/avidemux/

Maybe your program is hardwired to look for qt dev files under /usr rather than /usr/local?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #9 on: August 22, 2020, 12:41:47 PM »
Hi Juanito
I don't know ho relevant this might be, but your example is using  cmake  while rhermsen and Rudock1 appear to be using  qmake.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14812
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #10 on: August 22, 2020, 01:18:35 PM »
It was more a proof that the current qt-5.x was able to be used to build something quite complex  :)

Offline Rudock1

  • Jr. Member
  • **
  • Posts: 62
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #11 on: August 23, 2020, 10:04:33 AM »
Thanks, everybody, I did finish the compile with Qt5 (v5.14.0) albeit with an interesting workaround.

The error "Could not find qmake spec 'linux-g++'." led me to https://stackoverflow.com/questions/27524680/i-have-this-error-in-qt-creator-could-not-find-qmake-configuration-file-linux-g/33782609  As instructed, I ran qmake -version to determine qmake's $QTDIR variable and mine said "Using Qt version 5.14.0 in /tmp/tcloop/qt-5.x-bin/usr/local/lib". ... don't usually see references to our tcloop directories.

So I rebooted and I did tce-load -i -c ./qt-5.x-bin.tcz (only this tcz, no other dependencies) to force one time copy to the file system for qmake and then got the appropriate result for $QTDIR:
Code: [Select]
[/mnt/sdc1/source_pkgs]{$?=0}Sat Aug 22 14:00:58 > qmake --version
QMake version 3.1
Using Qt version 5.14.0 in /usr/local/lib

After that the make compile was flawless.  First time I have used the tce-load -c option.  Came in handy!  I appreciate everybody's support;

thx
Billy
(smoky!) Rio Del Mar, California

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #12 on: August 23, 2020, 11:33:02 AM »
Hi Rudock1
Instead of copying  qt-5.x-bin.tcz  to the file system, does it work if you execute this first:
Code: [Select]
export QTDIR="/usr/local/lib"

Offline Rudock1

  • Jr. Member
  • **
  • Posts: 62
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #13 on: August 23, 2020, 01:05:47 PM »
Hi Rich,

That's a good suggestion.  I did now both ways, before and after loading qt-5.x-bin.tcz, but qmake -version still showed "Using Qt version 5.14.0 in /tmp/tcloop/qt-5.x-bin/usr/local/lib". while echo $QTDIR gives us /usr/local/lib

thx
Billy

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: With Qt-5.x version 5.14.0 qmake gives compile error
« Reply #14 on: August 25, 2020, 03:05:51 PM »
Hi Billy,

With your workaround 'tce-load -i -c ./qt-5.x-bin.tcz' it also works for me.
Thanks!