ndstamsta
Posts: 2
Joined: Sat Nov 17, 2018 11:55 pm

Configuring Qt Creator for RPi

Sun Nov 18, 2018 12:01 am

Hello all, definite novice, so I appreciate your patience. After working a good while, I seemingly have successfully cross-compiled Qt to my RPi3.

While attempting to configure Qt Creator and run a widget test to my RPi, I encounter the following error;

sys/cdefs.h: No such file or directory
/home/noah/raspi/sysroot/usr/include/features.h

Would anyone be able to provide assistance?

fruitoftheloom
Posts: 19813
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Configuring Qt Creator for RPi

Sun Nov 18, 2018 12:33 pm

ndstamsta wrote:
Sun Nov 18, 2018 12:01 am
Hello all, definite novice, so I appreciate your patience. After working a good while, I seemingly have successfully cross-compiled Qt to my RPi3.

While attempting to configure Qt Creator and run a widget test to my RPi, I encounter the following error;

sys/cdefs.h: No such file or directory
/home/noah/raspi/sysroot/usr/include/features.h

Would anyone be able to provide assistance?

Operating System
Version of QT Creator
Guide you are following......


viewtopic.php?t=208186
adieu

My other Computer is an Asus CS10 ChromeBit running Chrome Operating System.
HP Envy 4500 Wireless Printer supported by HPLIP software in Raspbian Buster.
Raspberry Pi Model 2B v1.1

ndstamsta
Posts: 2
Joined: Sat Nov 17, 2018 11:55 pm

Re: Configuring Qt Creator for RPi

Sun Nov 18, 2018 4:22 pm

_______________________________________________________________
RPi3, Rasbian Stretch with Desktop and Recommended Software, 2018-11-13, Kernel Version 4.14

sudo rpi-update

reboot

sudo nano /etc/apt/sources.list (uncomment the deb-src line)

sudo apt-get update
sudo apt-get build-dep qt4-x11
sudo apt-get build-dep libqt5gui5
sudo apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0

sudo mkdir /usr/local/qt5pi
sudo chown pi:pi /usr/local/qt5pi

_______________________________________________________________
Desktop, running Ubuntu 18.04.1 LTS

mkdir ~/raspi

cd ~/raspi

git clone https://github.com/raspberrypi/tools

wget http://download.qt.io/official_releases ... 1.2.tar.xz

tar xf qt-everywhere-src-5.11.2.tar.xz

cp -R qt-everywhere-src-5.11.2/qtbase/mkspecs/linux-arm-gnueabi-g++ qt-everywhere-src-5.11.2/qtbase/mkspecs/linux-arm-gnueabihf-g++

sed -i -e 's/arm-linux-gnueabi-/arm-linux-gnueabihf-/g' qt-everywhere-src-5.11.2/qtbase/mkspecs/linux-arm-gnueabihf-g++/qmake.conf

mkdir sysroot sysroot/usr sysroot/opt

rsync -avz [email protected]:/lib sysroot
rsync -avz [email protected]:/usr/include sysroot/usr
rsync -avz [email protected]:/usr/lib sysroot/usr
rsync -avz [email protected]:/opt/vc sysroot/opt

wget https://raw.githubusercontent.com/riscv ... velinks.py

chmod +x sysroot-relativelinks.py

./sysroot-relativelinks.py sysroot

mv sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0_backup

ln -s sysroot/opt/vc/lib/libEGL.so sysroot/usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0

mv sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0_backup

ln -s sysroot/opt/vc/lib/libGLESv2.so sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0

ln -s sysroot/opt/vc/lib/libEGL.so sysroot/opt/vc/lib/libEGL.so.1

ln -s sysroot/opt/vc/lib/libGLESv2.so sysroot/opt/vc/lib/libGLESv2.so.2

git clone git://code.qt.io/qt/qtbase.git -b 5.11

cd qtbase

./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -no-use-gold-linker -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v

make -j4

make install

cd ~/raspi/

rsync -avz qt5pi [email protected]:/usr/local

Cross Compiling Guide; https://wiki.qt.io/RaspberryPi2EGLFS

Configuring Qt Guide; https://www.ics.com/blog/configuring-qt ... spberry-pi

Extra Tips; viewtopic.php?t=204529, http://ulasdikme.com/projects/raspberry ... errypi.php
______________________________________________

Return to “Graphics programming”