Skip to content

Commit ade94e6

Browse files
committed
sucessfully compiled welle.io
1 parent f0fd35d commit ade94e6

File tree

6 files changed

+53
-16
lines changed

6 files changed

+53
-16
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,10 @@ By default the image automatically executes `qmake` and `make` in the current wo
9898
``` shell
9999
docker pull arose/qtrpi:rpi3-qt5.6.2
100100
docker run -v /someqtprojectfolder/:/source arose/qtrpi:rpi3-qt5.6.2
101-
```
101+
```
102+
103+
### Errors during compile
104+
105+
#### Undefined reference error _dl_stack_flags with gcc and pthreads
106+
107+
Run sysroot-relativelinks.py again

init-qtrpi-full.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
# DEBUG
4+
set -e
5+
36
source ${0%/*}/utils/common.sh
47

58
function usage() {
@@ -46,5 +49,4 @@ cd utils
4649
./prepare-sysroot-minimal.sh
4750
./switch-sysroot.sh full
4851
./synchronize-qt-modules.sh
49-
./compile-qt-modules.sh #--clean-output --clean-modules-repo
50-
52+
./compile-qt-modules.sh --clean-output --clean-modules-repo

utils/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ validate_var_qtrpi_target_device() {
4545
NAME=$(device_name $QTRPI_TARGET_DEVICE)
4646

4747
if [[ ! $NAME ]]; then
48-
exit_error "Invalid QTRPI_TARGET_DEVICE value ($QTRPI_TARGET_DEVICE). Supported values: \n- linux-rasp-pi-g++ \n- linux-rasp-pi2-g++ \n- linux-rpi3-g++"
48+
exit_error "Invalid QTRPI_TARGET_DEVICE value ($QTRPI_TARGET_DEVICE). Supported values: \n- linux-rasp-pi-g++ \n- linux-rasp-pi2-g++ \n- linux-rasp-rpi3-g++"
4949
fi
5050
}
5151

utils/compile-qt-modules.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ function build_qtbase() {
6767
NO_USE_GOLD_LINKER='-no-use-gold-linker'
6868
fi
6969

70+
7071
TODO new target device pi4: linux-rasp-pi4-v3d-g++
7172
./configure -release -opengl es2 -device $TARGET_DEVICE \
7273
-device-option CROSS_COMPILE=$CROSS_COMPILE \
@@ -75,11 +76,25 @@ function build_qtbase() {
7576
-prefix /usr/local/qt5pi \
7677
-extprefix $OUTPUT_DIR \
7778
-hostprefix $OUTPUT_HOST_DIR \
78-
-no-feature-accessibility \
7979
$NO_USE_GOLD_LINKER \
8080
|& tee $ROOT/logs/$MODULE.log
8181

82-
# Disabled accessiblity, due to errors
82+
# -skip qtwayland -skip qtlocation -skip qtscript \
83+
# -no-gbm \
84+
85+
# from: https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/
86+
# ./configure -release -opengl es2 -device linux-rasp-pi-g++ \
87+
# -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \
88+
# -sysroot ~/raspi/sysroot \
89+
# -opensource -confirm-license \
90+
# -skip qtwayland -skip qtlocation -skip qtscript \
91+
# -make libs \
92+
# -prefix /usr/local/qt5pi \
93+
# -extprefix ~/raspi/qt5pi \
94+
# -hostprefix ~/raspi/qt5 \
95+
# -no-use-gold-linker \
96+
# -v \
97+
# -no-gbm
8398

8499
# Old version:
85100
# ./configure -release -opengl es2 -device $TARGET_DEVICE \

utils/init-common.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ if [[ ! $DOCKER_BUILD ]]; then
1212
sudo umount $ROOT/raspbian/sysroot-full/proc
1313

1414
sudo mkdir -p $ROOT
15-
sudo chown -R $USER:$USER $ROOT
15+
GROUP=$(id -g -n)
16+
sudo chown -R $USER:$GROUP $ROOT
1617
else
1718
# === Docker-Mode ===
1819
# umount is not allowed in a docker image, besides we use a fresh linux image => skipping sanity checks
1920
# sudo is also not needed/installed by default => creating directory structure without use of sudo
2021
mkdir -p $ROOT
21-
chown -R $USER:$USER $ROOT
22+
GROUP=$(id -g -n)
23+
chown -R $USER:$GROUP $ROOT
2224
fi
2325

2426
cd_root
2527

26-
mkdir raspi raspbian bin logs
28+
mkdir raspi -p raspbian bin logs

utils/prepare-sysroot-full.sh

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,25 @@ sudo sed -i '/deb-src/s/^#//g' sysroot-full/etc/apt/sources.list
3939
sudo chroot sysroot-full /bin/bash -c 'apt-get update'
4040
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y apt-transport-https'
4141
sudo chroot sysroot-full /bin/bash -c 'apt-get build-dep -y qt4-x11 qtbase-opensource-src'
42-
sudo chroot sysroot-full /bin/bash -c 'apt-get build-dep -y qt5-default build-essential'
43-
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libegl1-mesa libegl1-mesa-dev libgles2-mesa libgles2-mesa-dev libgbm-dev mesa-common-dev'
44-
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y wiringpi libnfc-bin libnfc-dev fonts-texgyre libts-dev'
4542
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0 libraspberrypi-dev'
46-
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libbluetooth-dev bluez-tools gstreamer1.0-plugins* libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libopenal-data libsndio7.0 libopenal1 libopenal-dev pulseaudio'
47-
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y qtdeclarative5-dev qtdeclarative5-dev-tools libopenal-dev'
43+
44+
# Requirements for some of the modules
45+
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libbluetooth-dev bluez-tools gstreamer1.0-plugins* libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libopenal-data libsndio7.0 libopenal1 libopenal-dev pulseaudio libopenal-dev'
4846

4947
# welle.io requirements
50-
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libmpg124-dev libfaad-dev libfftw3-dev libfftw3-doc'
48+
sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libmp3lame-dev libsoapysdr-dev libmpg123-dev libfaad-dev libfftw3-dev librtlsdr-dev libairspy-dev libusb-1.0-0-dev mesa-common-dev libglu1-mesa-dev libpulse-dev rtl-sdr'
49+
50+
# sudo chroot sysroot-full /bin/bash -c 'apt-get update'
51+
# sudo chroot sysroot-full /bin/bash -c 'apt-get install -y apt-transport-https'
52+
# sudo chroot sysroot-full /bin/bash -c 'apt-get build-dep -y qt4-x11 qtbase-opensource-src'
53+
# sudo chroot sysroot-full /bin/bash -c 'apt-get build-dep -y qt5-default'
54+
# sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libegl1-mesa libegl1-mesa-dev libgles2-mesa libgles2-mesa-dev libgbm-dev mesa-common-dev'
55+
# sudo chroot sysroot-full /bin/bash -c 'apt-get install -y wiringpi libnfc-bin libnfc-dev fonts-texgyre libts-dev'
56+
# sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0 libraspberrypi-dev'
57+
# sudo chroot sysroot-full /bin/bash -c 'apt-get install -y libbluetooth-dev bluez-tools gstreamer1.0-plugins* libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libopenal-data libsndio7.0 libopenal1 libopenal-dev pulseaudio'
58+
# sudo chroot sysroot-full /bin/bash -c 'apt-get install -y qtdeclarative5-dev qtdeclarative5-dev-tools libopenal-dev'
59+
60+
# build-essential
5161

5262
# Accessibilty, needed? - installing libs does not work, only -no-feature-accessibility which is not good
5363
# mappings.cpp:82:35: error: ‘ATSPI_STATE_READ_ONLY’ was not declared in this scope
@@ -57,7 +67,9 @@ sudo umount sysroot-full/sys
5767
sudo umount sysroot-full/dev
5868
sudo umount sysroot-full/proc
5969

60-
sudo chown -R $USER:$USER sysroot-full
70+
GROUP=$(id -g -n)
71+
sudo chown -R $USER:$GROUP sysroot-full
6172

73+
# TODO this was not called, somehow?
6274
$UTILS_DIR/sysroot-relativelinks.py sysroot-full
6375

0 commit comments

Comments
 (0)