linuxdeployqt icon indicating copy to clipboard operation
linuxdeployqt copied to clipboard

Cannot build linuxdeployqt on RPI 3 - Jessie - Qt 5.8.1

Open agooddaytowork opened this issue 6 years ago • 16 comments

Hi all,

I ran into this error while trying to build the linuxdeloyqt on RPI 3, Jessie.

Here's the error after running make. Please Advise

pi@raspberrypi:~/WorkSpace/linuxdeployqt $ make
cd src/ && ( test -e Makefile || /usr/local/Qt-5.8.1/bin/qmake -o Makefile /home                                                                                     /pi/WorkSpace/linuxdeployqt/src/src.pro ) && make -f Makefile
make[1]: Entering directory '/home/pi/WorkSpace/linuxdeployqt/src'
make[1]: Nothing to be done for 'first'.
make[1]: Leaving directory '/home/pi/WorkSpace/linuxdeployqt/src'
cd tools/ && ( test -e Makefile || /usr/local/Qt-5.8.1/bin/qmake -o Makefile /ho                                                                                     me/pi/WorkSpace/linuxdeployqt/tools/tools.pro ) && make -f Makefile
make[1]: Entering directory '/home/pi/WorkSpace/linuxdeployqt/tools'
cd linuxdeployqt/ && ( test -e Makefile || /usr/local/Qt-5.8.1/bin/qmake -o Make                                                                                     file /home/pi/WorkSpace/linuxdeployqt/tools/linuxdeployqt/linuxdeployqt.pro ) &&                                                                                      make -f Makefile
Project MESSAGE: Not building on Travis CI, tagging build as local dev build
make[2]: Entering directory '/home/pi/WorkSpace/linuxdeployqt/tools/linuxdeployq                                                                                     t'
g++ -c -pipe -O2 -std=c++11 -Wall -W -D_REENTRANT -fPIC -DBUILD_LINUXDEPLOYQT -D                                                                                     LINUXDEPLOYQT_GIT_COMMIT='"88aba55"' -DBUILD_DATE='"2018-04-10 02:43:18 UTC"' -D                                                                                     BUILD_NUMBER='"<local dev build>"' -DLINUXDEPLOYQT_VERSION='"4"' -DEXCLUDELIST="                                                                                     \"ld-linux.so.2\" << \"ld-linux-x86-64.so.2\" << \"libanl.so.1\" << \"libasound.                                                                                     so.2\" << \"libBrokenLocale.so.1\" << \"libcidn.so.1\" << \"libcom_err.so.2\" <<                                                                                      \"libcrypt.so.1\" << \"libc.so.6\" << \"libdl.so.2\" << \"libdrm.so.2\" << \"li                                                                                     bexpat.so.1\" << \"libfontconfig.so.1\" << \"libfreetype.so.6\" << \"libgcc_s.so                                                                                     .1\" << \"libgdk_pixbuf-2.0.so.0\" << \"libgio-2.0.so.0\" << \"libglib-2.0.so.0\                                                                                     " << \"libGL.so.1\" << \"libgobject-2.0.so.0\" << \"libgpg-error.so.0\" << \"lib                                                                                     harfbuzz.so.0\" << \"libICE.so.6\" << \"libjack.so.0\" << \"libkeyutils.so.1\" <                                                                                     < \"libm.so.6\" << \"libmvec.so.1\" << \"libnsl.so.1\" << \"libnss_compat.so.2\"                                                                                      << \"libnss_db.so.2\" << \"libnss_dns.so.2\" << \"libnss_files.so.2\" << \"libn                                                                                     ss_hesiod.so.2\" << \"libnss_nisplus.so.2\" << \"libnss_nis.so.2\" << \"libp11-k                                                                                     it.so.0\" << \"libpango-1.0.so.0\" << \"libpangocairo-1.0.so.0\" << \"libpangoft                                                                                     2-1.0.so.0\" << \"libpthread.so.0\" << \"libresolv.so.2\" << \"librt.so.1\" << \                                                                                     "libSM.so.6\" << \"libstdc++.so.6\" << \"libthread_db.so.1\" << \"libusb-1.0.so.                                                                                     0\" << \"libutil.so.1\" << \"libuuid.so.1\" << \"libX11.so.6\" << \"libxcb.so.1\                                                                                     " << \"libz.so.1\"" -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT                                                                                     _BOOTSTRAP_LIB -DQT_VERSION_STR='"5.8.1"' -DQT_VERSION_MAJOR=5 -DQT_VERSION_MINO                                                                                     R=8 -DQT_VERSION_PATCH=1 -DQT_BOOTSTRAPPED -DQT_NO_CAST_TO_ASCII -I. -I/usr/loca                                                                                     l/Qt-5.8.1/include -I/usr/local/Qt-5.8.1/include/QtCore -I/usr/local/Qt-5.8.1/in                                                                                     clude/QtCore/5.8.1 -I/usr/local/Qt-5.8.1/include/QtCore/5.8.1/QtCore -I/usr/loca                                                                                     l/Qt-5.8.1/include/QtXml -I/usr/local/Qt-5.8.1/include/QtXml/5.8.1 -I/usr/local/                                                                                     Qt-5.8.1/include/QtXml/5.8.1/QtXml -I/usr/local/Qt-5.8.1/mkspecs/linux-g++ -o .o                                                                                     bj/main.o main.cpp
In file included from /usr/local/Qt-5.8.1/include/QtCore/qcoreapplication.h:43:0,
                 from /usr/local/Qt-5.8.1/include/QtCore/QCoreApplication:1,
                 from main.cpp:28:
/usr/local/Qt-5.8.1/include/QtCore/qglobal.h:732:47: error: static assertion failed: Required feature process for file /usr/local/Qt-5.8.1/include/QtCore/qprocess.h not available.
 #define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
                                               ^
/usr/local/Qt-5.8.1/include/QtCore/qglobal.h:84:36: note: in expansion of macro ‘Q_STATIC_ASSERT_X’
 #define QT_REQUIRE_CONFIG(feature) Q_STATIC_ASSERT_X(QT_FEATURE_##feature == 1, "Required feature " #feature " for file " __FILE__ " not available.")
                                    ^
/usr/local/Qt-5.8.1/include/QtCore/qprocess.h:49:1: note: in expansion of macro ‘QT_REQUIRE_CONFIG’
 QT_REQUIRE_CONFIG(process);
 ^
Makefile:565: recipe for target '.obj/main.o' failed
make[2]: *** [.obj/main.o] Error 1
make[2]: Leaving directory '/home/pi/WorkSpace/linuxdeployqt/tools/linuxdeployqt'
Makefile:42: recipe for target 'sub-linuxdeployqt-make_first-ordered' failed
make[1]: *** [sub-linuxdeployqt-make_first-ordered] Error 2
make[1]: Leaving directory '/home/pi/WorkSpace/linuxdeployqt/tools'
Makefile:69: recipe for target 'sub-tools-make_first' failed
make: *** [sub-tools-make_first] Error 2

Thanks, Tam.

agooddaytowork avatar Apr 10 '18 02:04 agooddaytowork

Never ran into Required feature process for file /usr/local/Qt-5.8.1/include/QtCore/qprocess.h not available and I don't know what it means.

probonopd avatar Apr 10 '18 09:04 probonopd

I suffer the same problem. Raspberry has too much bugs when you code a qt program.

suntaoxy avatar May 10 '18 12:05 suntaoxy

Can you try on Wheezy?

probonopd avatar May 10 '18 12:05 probonopd

I'd rather try a vanilla Raspbian stretch.

TheAssassin avatar May 10 '18 12:05 TheAssassin

You can emulate a Raspbian system on any other system for testing: https://wiki.debian.org/RaspberryPi/qemu-user-static

TheAssassin avatar May 10 '18 12:05 TheAssassin

Yes, and you'll need patience as it's sloow...

probonopd avatar May 10 '18 12:05 probonopd

Not really a fair example. I'd say it's ~3-5 times slower (the more cores, the better the overall performance). See https://travis-ci.org/AppImage/AppImageKit/builds/352338762.

TheAssassin avatar May 10 '18 13:05 TheAssassin

cd src/ && ( test -e Makefile || /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /home/pi/qtstudy/linuxdeployqt/linuxdeployqt/src/src.pro -o Makefile ) && make -f Makefile make[1]: Entering directory '/home/pi/qtstudy/linuxdeployqt/linuxdeployqt/src' make[1]: Nothing to be done for 'first'. make[1]: Leaving directory '/home/pi/qtstudy/linuxdeployqt/linuxdeployqt/src' cd tools/ && ( test -e Makefile || /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /home/pi/qtstudy/linuxdeployqt/linuxdeployqt/tools/tools.pro -o Makefile ) && make -f Makefile make[1]: Entering directory '/home/pi/qtstudy/linuxdeployqt/linuxdeployqt/tools' cd linuxdeployqt/ && ( test -e Makefile || /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /home/pi/qtstudy/linuxdeployqt/linuxdeployqt/tools/linuxdeployqt/linuxdeployqt.pro -o Makefile ) && make -f Makefile Project MESSAGE: Not building on Travis CI, tagging build as local dev build Project MESSAGE: Updating exclude list... make[2]: Entering directory '/home/pi/qtstudy/linuxdeployqt/linuxdeployqt/tools/linuxdeployqt' g++ -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -O2 -std=c++0x -Wall -W -D_REENTRANT -fPIE -DBUILD_LINUXDEPLOYQT -DLINUXDEPLOYQT_GIT_COMMIT='"c17e3f0"' -DBUILD_DATE='"2018-05-10 12:17:52 UTC"' -DBUILD_NUMBER='""' -DLINUXDEPLOYQT_VERSION='"4"' -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -I. -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I.moc -o .obj/main.o main.cpp main.cpp: In function ‘int main(int, char**)’: main.cpp:53:11: error: ‘qInfo’ was not declared in this scope qInfo().noquote() << QString::fromStdString(version.str()); ^ Makefile:386: recipe for target '.obj/main.o' failed make[2]: *** [.obj/main.o] Error 1 make[2]: Leaving directory '/home/pi/qtstudy/linuxdeployqt/linuxdeployqt/tools/linuxdeployqt' Makefile:38: recipe for target 'sub-linuxdeployqt-make_first-ordered' failed make[1]: *** [sub-linuxdeployqt-make_first-ordered] Error 2 make[1]: Leaving directory '/home/pi/qtstudy/linuxdeployqt/linuxdeployqt/tools' Makefile:65: recipe for target 'sub-tools-make_first' failed make: *** [sub-tools-make_first] Error 2

That was my error infomation when I ran "make" Could you give some suggestions ?

suntaoxy avatar May 10 '18 13:05 suntaoxy

Looks like your version of Qt might be too old, what is the Qt version @suntaobuaa?

probonopd avatar May 10 '18 13:05 probonopd

main.cpp:53:11: error: ‘qInfo’ was not declared in this scope

Maybe this can be worked around by replacing all occurences of qInfo() with qDebug() like in https://github.com/csete/gqrx/commit/3556cbf79cfd5e024a391dd766735328e25b8371?

probonopd avatar May 10 '18 13:05 probonopd

The Qt version is 5.3.2 .Maybe it's too old, but this is the latest version in raspberry's software repositories. OK I will try replacing "qInfo()" with "qDebug()" Thanks @probonopd

suntaoxy avatar May 10 '18 13:05 suntaoxy

Qt 5.3 is way too old. You'll need 5.5 at least, 5.6 onwards is ideal.

TheAssassin avatar May 10 '18 13:05 TheAssassin

Hi,

FYI, I gave up building linuxdeployqt and used the "ldd" approach with the help of below script to copy all dependencies to a folder

ldd file | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /destination

After that I write a sh script to export all the necessary paths described in QT Deploy notes.

It work just fine but take times ...

cheers !

agooddaytowork avatar May 10 '18 16:05 agooddaytowork

Note to everyone interested in linuxdeployqt for ARM, potentialy we could/should use OBS to build an AppImage for it. It already gets built there, but packaged as an rpm. So it should be very doable.

http://download.opensuse.org/repositories/OBS:/AppImage/toolchain.arm/

probonopd avatar May 10 '18 17:05 probonopd

i use linuxdeployqt-6-x86_64.AppImage in raspberrypi 4 but give me this error bash: ./linuxdeployqt-6-x86_64.AppImage: cannot execute binary file: Exec format error how to can deploy in raspberry pi ?

sadeghelect avatar Apr 14 '20 19:04 sadeghelect

You would need a linuxdeployqt compiled for ARM. I am currently not offering it due to lack of time.

probonopd avatar Apr 15 '20 16:04 probonopd