Installing QT5 to arm debianhf
-
Hi All,
I have an embedded debian system on a Wandboard quad. I need to install QT5 to this machine.
My host machine is a debian x86 on my laptop.Because under debian the arm compiler prefix is arm-linux-gnueabihf I made a new qtbase/mkspecs/linux-arm-gnueabihf-g++ dir to set hosts gcc params well.
After this I set the config params to define sysroot like this:
@
./configure -opensource -confirm-license
-sysroot /home/zamek/embedded/wandboard/rootfs/current
-embedded
-no-nis
-no-libudev
-no-iconv
-no-gtkstyle
-system-zlib
-no-gui
-no-widgets
-no-linuxfb
-no-directfb
-no-xcb
-no-opengl
-no-eglfs
-no-fontconfig
-no-gif
-no-libjpeg
-no-libpng
-no-tslib
-plugindir /usr/lib/qt/plugins
-no-rpath
-device imx6
-make libs
-device imx6
-compile-examples
-xplatform linux-arm-gnueabihf-g++
-device-option CROSS_COMPILE=/opt/arm-linaro/bin/arm-linux-gnueabihf-
-v
@Config finished well, and when I run make, I get the following error:
@
/opt/arm-linaro/bin/arm-linux-gnueabihf-g++ -c -include .pch/Qt5Core -pipe -mfloat-abi=softfp --sysroot= -O2 -O2 -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_LIBUDEV -DQT_NO_XCB -DQT_NO_XKBCOMMON -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DPCRE_HAVE_CONFIG_H -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -I../../mkspecs/devices/linux-imx6-g++ -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.2.1 -I../../include/QtCore/5.2.1/QtCore -Iglobal -I../3rdparty/pcre -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I.moc -I/usr/include -o .obj/qbytearray.o tools/qbytearray.cpp
In file included from tools/qbytearray.cpp:53:0:
/usr/include/zlib.h:34:19: fatal error: zconf.h: No such file or directory@
I checked, there is zconf.h in /home/zamek/embedded/wandboard/rootfs/current/usr/include !What's wrong in config or how can I set correctly the include dir?
thx
Zamek -
Hi and welcome to devnet,
Just a wild guess, but I'm not sure that -system-zlib is playing nice with the cross-compilation setup, maybe you should first try with Qt's zlib.
Hope it helps
-
Hi,
Unfortunately there is no solved the problem :(
Maybe the sysroot is empty, because the g++ command line is:
@
opt/arm-linaro/bin/arm-linux-gnueabihf-g++ -c -include .pch/Qt5Core -pipe -mfloat-abi=softfp --sysroot= -O2 -O2 -march=armv7-a -mfpu=neon...
@How can I set the sysroot of g++ ?
thx
Zamek -
Indeed, theres something fishy going on with sysroot
Check whether removing -embedded helps -
Hi,
There is no -embedded in config and if I try to set it:
@
./wandconfig.sh- cd qtbase
- /home/zamek/embedded/qt/qt5/qtbase/configure -top-level -opensource -confirm-license -sysroot /home/zamek/embedded/wandboard/rootfs/current -embedded -no-nis -no-libudev -no-iconv -no-gtkstyle -system-zlib -no-gui -no-widgets -no-linuxfb -no-directfb -no-xcb -no-opengl -no-eglfs -no-fontconfig -no-gif -no-libjpeg -no-libpng -no-tslib -plugindir /usr/lib/qt/plugins -no-rpath -nomake examples -nomake tests -device imx6 -make libs -device imx6 -compile-examples -xplatform linux-arm-gnueabihf-g++ -device-option CROSS_COMPILE=/opt/arm-linaro/bin/arm-linux-gnueabihf- -system-zlib -v
-embedded: invalid command-line switch
@
Maybe it removed in QT5 ?
thx
Zamek -
Yes,
could be. Because I've tried to compile Qt5 for my wandboard as well, but in no tutorial I could found in the internet, the embedded switch was used for configuring QT5.
-
Indeed, it has been removed, it's not needed anymore with Qt 5 (because of the new QPA architecture)
-
hi,
[quote author="Soilworker" date="1388959939"]Yes,
could be. Because I've tried to compile Qt5 for my wandboard as well, but in no tutorial I could found in the internet, the embedded switch was used for configuring QT5. [/quote]
could you finished compilation to your wandboard? What is your .configure params?
thx,
Zamek -
Hi Zamek,
no I was not able to compile 5.2.0 with the configuration parameters as follows:
./configure -v -dont-process -opensource -confirm-license -device imx6 -device-option
CROSS_COMPILE=/opt/poky/1.5.1/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
-sysroot /mnt/nfs-dev/RootFS
-prefix ~/qt5Arm -shared -no-pch -no-rpath -pkg-config -platform linux-g++
-no-accessibility -no-dbus -no-icu -no-directfb -evdev -no-fontconfig -no-opengl -opengl es2 -eglfs -no-glib -no-gtkstyle -no-iconv -system-libjpeg -no-kms -system-libpng
-no-linuxfb -no-mitshm -no-nis -openssl -qt-pcre -release -no-sm -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2
-no-sql-tds -nomake tests -tslib -libudev -widgets -no-xcb -no-xcursor -no-xfixes -no-xinerama -no-xinput -no-xinput2 -no-xkb -no-xrandr -no-xrender -no-xshape -no-xsync
-no-xvideo -system-zlibI used these parameters to successfully compile the previous sources 5.1.1 and I was even able to create a small application in QT and used the freshly compiled libraries and qmake to deploy it to my wandboard via network out of Creator, but with the same parameters 5.2.0 get stucked somewhere in the middle of the compilation.
Currently I have no idea how to solve it. Any thoughts are welcome.
-
Sorry,
I forget to tell you that I needed to update my mkspec for the IMX6 slightly:
I had to add the following:
Add hardfloat option to mkspec of qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf
--> DISTRO_OPTS += hard-float
--> IMX6_CFLAGS = ... (add after existing parameters) -mfloat-abi=hardBefore I started to execute the configure, I add my cross-compiler to the PATH.
export PATH=$PATH:/opt/poky/1.5.1/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi