Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: rhermsen on July 17, 2020, 09:07:18 PM

Title: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: rhermsen 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..
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Juanito 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...
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: rhermsen 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.
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Juanito on July 18, 2020, 06:57:53 AM
Is qt-5.x-dev loaded in tc-11.x?
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: rhermsen 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$
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Juanito on July 18, 2020, 09:36:50 AM
strange - i've compiled several apps against qt-5.x-dev and things worked...
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Rudock1 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
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: rhermsen 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...)
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Juanito 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?
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Rich 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.
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Juanito 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  :)
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Rudock1 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 (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
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Rich 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"
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Rudock1 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
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: rhermsen 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!
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: rhermsen on August 25, 2020, 04:00:16 PM
Trying to run the package on TCL-11.0 requires a lot more dependencies to be loaded but still failed with:

Code: [Select]
tc@box:~$ sudo ostinato
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.

Aborted
tc@box:~$

Only if I also load 'qt-5.x-dev' with all its dependencies it will run.

Other packages I had to install:
Code: [Select]
tce-load -wi harfbuzz.tcz
tce-load -wi libGL.tcz
tce-load -wi gcc_libs.tcz
tce-load -wi libzstd.tcz
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Rich on August 25, 2020, 04:31:43 PM
Hi rhermsen
... Only if I also load 'qt-5.x-dev' with all its dependencies it will run. ...
If you install  qt-5.x-opengl  instead of  qt-5.x-dev , does it run then?
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: rhermsen on August 25, 2020, 05:41:57 PM
Hi Rich, that was the first one I tried, but that one was already installed.

Code: [Select]
tc@box:~$ tce-load -wi qt-5.x-opengl.tcz
qt-5.x-opengl is already installed!
tc@box:~$ tce-load -wi qt-5.x-dev
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Rich on August 25, 2020, 08:18:41 PM
Hi rhermsen
Instead of loading  qt-5.x-dev , run this:
Code: [Select]
ldd `which ostinato` | grep -i foundThose are not apostrophes in that command, they are back ticks and found on the  ~  key. If that command produces any  Not found
messages, you can find the missing libraries using the  Apps  utilities  Provides  function.
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: Juanito on August 26, 2020, 01:20:32 AM
From this message:
Code: [Select]
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb

..I'd guess that you'll need qt-5.x-all.
Title: Re: With Qt-5.x version 5.14.0 qmake gives compile error
Post by: rhermsen on October 13, 2020, 04:44:32 PM
I had a look again and also compiled the same version of the program on TC-10.1 / Qt-5.11.2.
And found I was missing the following dependency 'qt-5.x-extended.tcz'

Regarding qt-5.x-bin.tcz path issue.
Used the following workaround in my script:

Code: [Select]
TCLVERSION=`version`
TCLVERSION=${TCLVERSION:0:2}
if [ $TCLVERSION -ge 11 ]
then
echo TCL version greater or equal to 11 install qt-5.x-bin.tcz locally
### begin workaround for Qt-5.14.0 ###
tce-load -wi libbluetooth5.tcz
tce-load -wi qt-5.x-xml.tcz
tce-load -wi qt-5.x-printsupport.tcz
tce-load -wi qt-5.x-extended.tcz
[ -f /mnt/vda1/tce/optional/qt-5.x-bin.tcz ] || wget http://www.tinycorelinux.net/11.x/x86/tcz/qt-5.x-bin.tcz -O /mnt/vda1/tce/optional/qt-5.x-bin.tcz
[ -f /mnt/vda1/tce/optional/qt-5.x-bin.tcz.dep ] || wget http://www.tinycorelinux.net/11.x/x86/tcz/qt-5.x-bin.tcz.dep -O /mnt/vda1/tce/optional/qt-5.x-bin.tcz.dep
[ -f /mnt/vda1/tce/optional/qt-5.x-bin.tcz.md5.txt ] || wget http://www.tinycorelinux.net/11.x/x86/tcz/qt-5.x-bin.tcz.md5.txt -O /mnt/vda1/tce/optional/qt-5.x-bin.tcz.md5.txt
tce-load -i -c /mnt/vda1/tce/optional/qt-5.x-bin.tcz
### end workaround for Qt-5.14.0 ###
fi