Setup environment to compile for Raspberry
-
Hi,
I try to setup environment to be able to compile application Qt for Raspberry.
I follow the this tutorial but I have an error when I try to configure :$./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/raspberry-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi -v This is the Qt Open Source Edition. You are licensed to use this software under the terms of the Lesser GNU General Public License (LGPL) versions 2.1. You are also licensed to use this software under the terms of the GNU Lesser General Public License (LGPL) versions 3. You have already accepted the terms of the Open Source license. Running configuration tests (phase 1)... Precompiled-headers support enabled. /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c Symbol visibility control enabled. arm-linux-gnueabihf-g++: erreur: unrecognized command line option ‘-fuse-ld=gold’ /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/mnt/raspberry-rootfs -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)." Symbolic function binding disabled. DEFAULT_INCDIRS="/home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/include/c++/4.7.2 /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/include/c++/4.7.2/arm-linux-gnueabihf /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/include/c++/4.7.2/backward /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.7.2/include /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.7.2/include-fixed /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/include /mnt/raspberry-rootfs/usr/include /mnt/raspberry-rootfs/usr/include/arm-linux-gnueabihf " DEFAULT_LIBDIRS="/home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/arm-linux-gnueabihf/lib /mnt/raspberry-rootfs/lib /mnt/raspberry-rootfs/lib/arm-linux-gnueabihf /mnt/raspberry-rootfs/usr/lib /mnt/raspberry-rootfs/usr/lib/arm-linux-gnueabihf /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc/arm-linux-gnueabihf/4.7.2 /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/lib/gcc/arm-linux-gnueabihf " Done running configuration tests. <srcbase> = /home/helene/opt/qt5/qtbase <outbase> = /home/helene/opt/qt5/qtbase Creating qmake... make: Rien à faire pour « first ». Running configuration tests (phase 2)... Found pkg-config from $PATH: /usr/bin/pkg-config Note: PKG_CONFIG_LIBDIR automatically set to /mnt/raspberry-rootfs/usr/lib/pkgconfig:/mnt/raspberry-rootfs/usr/share/pkgconfig:/mnt/raspberry-rootfs/usr/lib/arm-linux-gnueabihf/pkgconfig Note: PKG_CONFIG_SYSROOT_DIR automatically set to /mnt/raspberry-rootfs Determining architecture... () /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/raspberry-rootfs -g -Wall -W -fPIC -I. -I../../mkspecs/devices/linux-rasp-pi-g++ -o arch.o arch.cpp In file included from /mnt/raspberry-rootfs/usr/include/stdio.h:28:0, from arch.cpp:37: /mnt/raspberry-rootfs/usr/include/features.h:356:25: fatal error: /mnt/raspberry-rootfs/usr/include/sys/cdefs.h: Erreur d'entrée/sortie ... ... compilation terminated. make: *** [arch.o] Erreur 1 Unable to determine architecture! compilation terminated. make: *** [opengles2.o] Erreur 1 OpenGL ES 2.0 disabled. The OpenGL ES 2.0 functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in /home/helene/opt/qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++.
I have tried several times the procedure and I always have the error.
-
Hi,
You should run
fcheckfsck on your RPi sdcard. An In/Out error usually means that some data got corrupted or more likely the data storage. -
Sorry, I meant fsck.
You got an IO error on a mounted disk image ?
-
When I insert my SD Card, I have on dmesg :
[ 1597.464008] sd 3:0:0:0: [sdb] 15482880 512-byte logical blocks: (7.92 GB/7.38 GiB) [ 1597.470203] sdb: sdb1 sdb2 [ 1597.886246] EXT4-fs (sdb2): recovery complete [ 1597.886254] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null) [ 1597.909332] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
When I run fsck, I have :
$sudo fsck /dev/sdb1 fsck de util-linux 2.20.1 fsck.fat 3.0.26 (2014-03-07) 0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. 1) Remove dirty bit 2) No action ?
After correction, if I insert the card, I have :
[ 2116.065860] sd 3:0:0:0: [sdb] 15482880 512-byte logical blocks: (7.92 GB/7.38 GiB) [ 2116.071942] sdb: sdb1 sdb2 [ 2116.461258] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null)
I will try again the procedure.
Thank for your help
-
The problem of seems solved but I have an other error :
Running configuration tests... Failed to process makespec for platform 'devices/linux-rasp-pi-g++' Project ERROR: Compiler /home/helene/raspberry/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ not found. Check the value of CROSS_COMPILE -device-option Could not read qmake configuration file /home/helene/raspberry/qt-everywhere-opensource-src-5.4.1/qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf. Error processing project file: /dev/null
-
Are you shutting down the RPi properly ?
Does
/home/helene/raspberry/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++
exists ? -
I succeed to setup environment but I can't succeed to run a simple project.
I had- debugger (Path : /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gdb)
- compiler (Path: /home/helene/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++)
- Qt version (qmake path : /usr/local/qt5pi/bin/qmake)
- Kit
But I don't know why, version is to Qt 5.6.1 ans when I run my application, I have the error :
avertissement : You are using deprecated mkspecs. Please use qnx-armle-v7-qcc instead. erreur : qcc: Command not found
-
QNX ? Did you change anything in the mkspec ?
-
Did you clone directly from code.qt.io ?
-
What about 5.5.1 ?