SlideShare a Scribd company logo
2
Most read
10
Most read
13
Most read
Building Qt 5.12 LTS for
Raspberry Pi Zero on Debian
Stretch
spring 2019
SD card formating and flashing
Preparing SD with Etcher
sudo apt-get update --fix-
missing
https://www.tal.org/tutorials/building-qt-512-raspberry-
pi
First Steps
Cd
Cd Desktop
#Download the Qt 5.12.3 source archive
wget http://download.qt.io/official_releases/qt/5.12/5.12.3/single/qt-everywhere-src-5.12.3.tar.xz
#Check archive MD5 hash
md5sum qt-everywhere-src-5.12.3.tar.xz
#It should be:
#38017e0ed88b9baba063bd723d9ca8b2 qt-everywhere-src-5.12.3.tar.xz
Un-tar the source archive
Un-tar the source archive in a suitable location, with enough free space (~2.8GB). This will take
around 7-13 minutes on a Raspberry Pi 3+, depending on SD card speed, and even more on an older
model, so go grab of coffe again. You can of course start installation of the build dependecies
while you wait.
tar xf qt-everywhere-src-5.12.3.tar.xz
Setup Qt mkspecs configurati
Qt build is configured trough the configure script, but platform and device specifc settings are set in mkspecs configuration files. Qt includes mkspecs for the Raspberry Pi but they are unfortunately setup for c
compilation environments and can not be used for native building without editing or the need for faking a cross compilation environment. Suitable mkspecs files for the various Pi revisions are available in our g
next step is to clone the repository and install the mkspecs files into the Qt source tree.
Clone the configuration repository:
git clone https://github.com/oniongarlic/qt-raspberrypi-configuration.git
cd into the clone repository and run (adjust DESTDIR in case your Qt sources are extracted somewhere else):
cd qt-raspberrypi-configuration && make install DESTDIR=../qt-everywhere-src-5.12.3
PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig 
../qt-everywhere-src-5.12.3/configure -platform linux-rpi-g++ 
-v 
-opengl es2 -eglfs 
-no-gtk 
-opensource -confirm-license -release 
-reduce-exports 
-force-pkg-config 
-nomake examples -no-compile-examples 
-skip qtwayland 
-skip qtwebengine 
-no-feature-geoservices_mapboxgl 
-qt-pcre 
-no-pch 
-ssl 
-evdev 
-system-freetype
Install required build depend
You will need to install plenty of packages to be able to build Qt. Some of the Qt features are optional, for example support for various databases and if you don't need a specific feature you can skip building the
Or the other way around, if you need a specific feature you might need to install more packages. See the table below for a list of some optional features and the required development packages you need to inst
first, start by updating your package cache so everything is fresh:
apt-get update
Then continue with package installation.
Install required development packages
apt-get install build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libp
libjpeg-dev libglib2.0-dev libraspberrypi-dev
#acording my searching needs to install llvm-dev
Sudo apt-get install llvm-dev
Install optional development packages
sudo apt-get install libx11-dev libxcb1-dev libxkbcommon-x11-dev libx11-xcb-dev libxext-dev -y
cd ~
sudo cat << EOF> qt_installation.sh
cd /home/pi/Desktop/qt-raspberrypi-configuration
nohup sh -c " sudo make -j2 && sudo make install "> /home/pi/Desktop/qt_inst.log
/dev/null 2>&1 &
#tail -f /home/pi/Desktop/qt_inst.log
#sudo make -j2
#sudo make install
EOF
Sudo chmod 755 qt_installation.sh
sudo nano .bashrc
#insert ./qt_installation.sh at the end of file
ource accepted.
config.qtmultimedia_multimedia.libraries.pulseaudio succeeded
cking for libresourceqt5...
g source 0 (type pkgConfig) of library libresourceqt5 ...
r/bin/pkg-config --exists --silence-errors libresourceqt5
config did not find package.
ource produced no result.
config.qtmultimedia_multimedia.libraries.libresourceqt5 FAILED
cking for libclang...
config.qttools_qdoc.tests.libclang FAILED
e running configuration tests.
igure summary:
type: linux-rpi-g++ (arm, CPU features: <none>)
piler: gcc 6.3.0
iguration: use_gold_linker enable_new_dtags largefile shared rpath
Install pacman for erro of qt.qpa.plugin:
Could not find the Qt platform plugin
"xcb" in ""
http://www.libarchive.org/downloads/libarchive-3.3.3.tar.gz
Tar xzf libarchive-3.3.3.tar.gz
Cd libarchive-3.3.3
./configure
Make
Make install
#https://www.archlinux.org/pacman/
Wget https://sources.archlinux.org/other/pacman/pacman-5.1.3.tar.gz
Tar xfz pacman-5.1.3.tar.gz
Cd pacman-5.1.3
./configure
Make
Install pacman for erro of qt.qpa.plugin:
Could not find the Qt platform plugin
"xcb" in ""
#https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-
plugin-xcb-in-even-though-it-was-found/8
Error: g++: internal compiler error: Killed
(program cc1plus)
https://wpitchoune.net/tricks/raspberry_pi3_increase_swap_size.htm
l
You could be running out of memory.
Setting up WiFi using an RTL8188eu
dongle on Raspberry Pi Zero
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
#into wpa_… file inser this:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="Haper"
psk="hellohello"
key_mgmt=WPA-PSK
}
https://zsiti.eu/wifi-rtl8188eu-raspberry-pi-
zero/
Installing wifi usb dongle for raspberry
sudo apt-get install git build-essential
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
make
sudo make install
https://askubuntu.com/questions/523197/rtl8188cus-unable-to-install-14-
04
Error:make[1]: ***
/lib/modules/4.14.98+/build: No such file
or directory. Stop.
sudo apt-get install git raspberrypi-kernel-headers build-essential dkms
Make error: invalid conversion from
‘xcb_window_t {aka unsigned int}’
saying that 'sudo rpi-update' would do the trick
https://forum.qt.io/topic/103934/failure-to-build-qt5-5-12-3-on-raspberry-pi-
zero/10
sudo apt-get install qt5-default qt5-qmake
qtbase5-dev-tools qtcreator
https://www.raspberrypi.org/forums/viewtopic.php?f=33&t=122267
sudo apt-get update
sudo apt-get install qt5-default qt5-qmake qtbase5-dev-tools qtcreator

More Related Content

PDF
NetBSDworkshop
PDF
Small, Simple, and Secure: Alpine Linux under the Microscope
ODP
testing-nfs
PPT
Redis深入浅出
PDF
PDF
Software Packaging for Cross OS Distribution
PDF
Ganeti - build your own cloud
PDF
Docker and friends at Linux Days 2014 in Prague
NetBSDworkshop
Small, Simple, and Secure: Alpine Linux under the Microscope
testing-nfs
Redis深入浅出
Software Packaging for Cross OS Distribution
Ganeti - build your own cloud
Docker and friends at Linux Days 2014 in Prague

What's hot (20)

PDF
Automating Mendix application deployments with Nix
PDF
Let's trace Linux Lernel with KGDB @ COSCUP 2021
PDF
Linux network stack
PDF
Kernel Recipes 2017: Performance Analysis with BPF
PDF
A Journey to Boot Linux on Raspberry Pi
PDF
Docker perl build
PDF
configuring a warm standby, the easy way
PPT
GStreamer 101
PDF
Docker remote-api
PDF
Haproxy - zastosowania
PDF
Performance comparison of Distributed File Systems on 1Gbit networks
PPT
Linux Commands
PDF
Ceph issue 해결 사례
PDF
Putting some "logic" in LVM.
ODP
packaging
ODP
Rpm Introduction
PDF
Linux fundamental - Chap 12 Hardware Management
PDF
Oracle cluster installation with grid and nfs
DOC
X64服务器 lnmp服务器部署标准 new
PDF
Velocity 2017 Performance analysis superpowers with Linux eBPF
Automating Mendix application deployments with Nix
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Linux network stack
Kernel Recipes 2017: Performance Analysis with BPF
A Journey to Boot Linux on Raspberry Pi
Docker perl build
configuring a warm standby, the easy way
GStreamer 101
Docker remote-api
Haproxy - zastosowania
Performance comparison of Distributed File Systems on 1Gbit networks
Linux Commands
Ceph issue 해결 사례
Putting some "logic" in LVM.
packaging
Rpm Introduction
Linux fundamental - Chap 12 Hardware Management
Oracle cluster installation with grid and nfs
X64服务器 lnmp服务器部署标准 new
Velocity 2017 Performance analysis superpowers with Linux eBPF
Ad

Similar to Qt native built for raspberry zero (20)

PDF
SPDK benchmark memo
PDF
Bundling Packages and Deploying Applications with RPM
PDF
Dependencies Managers in C/C++. Using stdcpp 2014
PDF
curl --http3 cheatsheet
PDF
Openwrt startup
PDF
Docker to the Rescue of an Ops Team
PDF
Docker to the Rescue of an Ops Team
DOCX
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
PDF
ERP System Implementation Kubernetes Cluster with Sticky Sessions
PDF
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
PDF
Perl on embedded Linux with Buildroot‎
PDF
9 creating cent_os 7_mages_for_dpdk_training
PDF
Magie di git
PPT
Qemu - Raspberry | while42 Singapore #2
PDF
How to burn your GPU with CUDA9.1
PDF
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
PDF
Linux Containers From Scratch
PPTX
Scaling Development Environments with Docker
DOCX
Really useful linux commands
PDF
9 steps to install and configure postgre sql from source on linux
SPDK benchmark memo
Bundling Packages and Deploying Applications with RPM
Dependencies Managers in C/C++. Using stdcpp 2014
curl --http3 cheatsheet
Openwrt startup
Docker to the Rescue of an Ops Team
Docker to the Rescue of an Ops Team
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
ERP System Implementation Kubernetes Cluster with Sticky Sessions
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
Perl on embedded Linux with Buildroot‎
9 creating cent_os 7_mages_for_dpdk_training
Magie di git
Qemu - Raspberry | while42 Singapore #2
How to burn your GPU with CUDA9.1
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
Linux Containers From Scratch
Scaling Development Environments with Docker
Really useful linux commands
9 steps to install and configure postgre sql from source on linux
Ad

Recently uploaded (20)

PPTX
Simulation of electric circuit laws using tinkercad.pptx
PDF
composite construction of structures.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
Queuing formulas to evaluate throughputs and servers
PPT
Project quality management in manufacturing
PPTX
Practice Questions on recent development part 1.pptx
PPTX
“Next-Gen AI: Trends Reshaping Our World”
PDF
Monitoring Global Terrestrial Surface Water Height using Remote Sensing - ARS...
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
PPTX
AgentX UiPath Community Webinar series - Delhi
PPTX
Internship_Presentation_Final engineering.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
algorithms-16-00088-v2hghjjnjnhhhnnjhj.pdf
Simulation of electric circuit laws using tinkercad.pptx
composite construction of structures.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Structs to JSON How Go Powers REST APIs.pdf
Queuing formulas to evaluate throughputs and servers
Project quality management in manufacturing
Practice Questions on recent development part 1.pptx
“Next-Gen AI: Trends Reshaping Our World”
Monitoring Global Terrestrial Surface Water Height using Remote Sensing - ARS...
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
BRKDCN-2613.pdf Cisco AI DC NVIDIA presentation
AgentX UiPath Community Webinar series - Delhi
Internship_Presentation_Final engineering.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
algorithms-16-00088-v2hghjjnjnhhhnnjhj.pdf

Qt native built for raspberry zero

  • 1. Building Qt 5.12 LTS for Raspberry Pi Zero on Debian Stretch spring 2019
  • 2. SD card formating and flashing
  • 3. Preparing SD with Etcher sudo apt-get update --fix- missing
  • 5. First Steps Cd Cd Desktop #Download the Qt 5.12.3 source archive wget http://download.qt.io/official_releases/qt/5.12/5.12.3/single/qt-everywhere-src-5.12.3.tar.xz #Check archive MD5 hash md5sum qt-everywhere-src-5.12.3.tar.xz #It should be: #38017e0ed88b9baba063bd723d9ca8b2 qt-everywhere-src-5.12.3.tar.xz Un-tar the source archive Un-tar the source archive in a suitable location, with enough free space (~2.8GB). This will take around 7-13 minutes on a Raspberry Pi 3+, depending on SD card speed, and even more on an older model, so go grab of coffe again. You can of course start installation of the build dependecies while you wait. tar xf qt-everywhere-src-5.12.3.tar.xz
  • 6. Setup Qt mkspecs configurati Qt build is configured trough the configure script, but platform and device specifc settings are set in mkspecs configuration files. Qt includes mkspecs for the Raspberry Pi but they are unfortunately setup for c compilation environments and can not be used for native building without editing or the need for faking a cross compilation environment. Suitable mkspecs files for the various Pi revisions are available in our g next step is to clone the repository and install the mkspecs files into the Qt source tree. Clone the configuration repository: git clone https://github.com/oniongarlic/qt-raspberrypi-configuration.git cd into the clone repository and run (adjust DESTDIR in case your Qt sources are extracted somewhere else): cd qt-raspberrypi-configuration && make install DESTDIR=../qt-everywhere-src-5.12.3 PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig ../qt-everywhere-src-5.12.3/configure -platform linux-rpi-g++ -v -opengl es2 -eglfs -no-gtk -opensource -confirm-license -release -reduce-exports -force-pkg-config -nomake examples -no-compile-examples -skip qtwayland -skip qtwebengine -no-feature-geoservices_mapboxgl -qt-pcre -no-pch -ssl -evdev -system-freetype
  • 7. Install required build depend You will need to install plenty of packages to be able to build Qt. Some of the Qt features are optional, for example support for various databases and if you don't need a specific feature you can skip building the Or the other way around, if you need a specific feature you might need to install more packages. See the table below for a list of some optional features and the required development packages you need to inst first, start by updating your package cache so everything is fresh: apt-get update Then continue with package installation. Install required development packages apt-get install build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libp libjpeg-dev libglib2.0-dev libraspberrypi-dev #acording my searching needs to install llvm-dev Sudo apt-get install llvm-dev
  • 8. Install optional development packages sudo apt-get install libx11-dev libxcb1-dev libxkbcommon-x11-dev libx11-xcb-dev libxext-dev -y
  • 9. cd ~ sudo cat << EOF> qt_installation.sh cd /home/pi/Desktop/qt-raspberrypi-configuration nohup sh -c " sudo make -j2 && sudo make install "> /home/pi/Desktop/qt_inst.log /dev/null 2>&1 & #tail -f /home/pi/Desktop/qt_inst.log #sudo make -j2 #sudo make install EOF Sudo chmod 755 qt_installation.sh sudo nano .bashrc #insert ./qt_installation.sh at the end of file
  • 10. ource accepted. config.qtmultimedia_multimedia.libraries.pulseaudio succeeded cking for libresourceqt5... g source 0 (type pkgConfig) of library libresourceqt5 ... r/bin/pkg-config --exists --silence-errors libresourceqt5 config did not find package. ource produced no result. config.qtmultimedia_multimedia.libraries.libresourceqt5 FAILED cking for libclang... config.qttools_qdoc.tests.libclang FAILED e running configuration tests. igure summary: type: linux-rpi-g++ (arm, CPU features: <none>) piler: gcc 6.3.0 iguration: use_gold_linker enable_new_dtags largefile shared rpath
  • 11. Install pacman for erro of qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" http://www.libarchive.org/downloads/libarchive-3.3.3.tar.gz Tar xzf libarchive-3.3.3.tar.gz Cd libarchive-3.3.3 ./configure Make Make install #https://www.archlinux.org/pacman/ Wget https://sources.archlinux.org/other/pacman/pacman-5.1.3.tar.gz Tar xfz pacman-5.1.3.tar.gz Cd pacman-5.1.3 ./configure Make
  • 12. Install pacman for erro of qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" #https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform- plugin-xcb-in-even-though-it-was-found/8
  • 13. Error: g++: internal compiler error: Killed (program cc1plus) https://wpitchoune.net/tricks/raspberry_pi3_increase_swap_size.htm l You could be running out of memory.
  • 14. Setting up WiFi using an RTL8188eu dongle on Raspberry Pi Zero sudo nano /etc/wpa_supplicant/wpa_supplicant.conf #into wpa_… file inser this: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US network={ ssid="Haper" psk="hellohello" key_mgmt=WPA-PSK } https://zsiti.eu/wifi-rtl8188eu-raspberry-pi- zero/
  • 15. Installing wifi usb dongle for raspberry sudo apt-get install git build-essential git clone https://github.com/lwfinger/rtlwifi_new.git cd rtlwifi_new make sudo make install https://askubuntu.com/questions/523197/rtl8188cus-unable-to-install-14- 04
  • 16. Error:make[1]: *** /lib/modules/4.14.98+/build: No such file or directory. Stop. sudo apt-get install git raspberrypi-kernel-headers build-essential dkms
  • 17. Make error: invalid conversion from ‘xcb_window_t {aka unsigned int}’ saying that 'sudo rpi-update' would do the trick https://forum.qt.io/topic/103934/failure-to-build-qt5-5-12-3-on-raspberry-pi- zero/10
  • 18. sudo apt-get install qt5-default qt5-qmake qtbase5-dev-tools qtcreator https://www.raspberrypi.org/forums/viewtopic.php?f=33&t=122267 sudo apt-get update sudo apt-get install qt5-default qt5-qmake qtbase5-dev-tools qtcreator