-
Notifications
You must be signed in to change notification settings - Fork 1
Build on Raspbian Linux
Marcus Hudritsch edited this page Jul 1, 2024
·
2 revisions
SLProject also runs on a Raspberry Pi (...mostly).
- Download SLProject:
cd <Path to where you want the SLProject folder>
git clone https://github.com/cpvrlab/SLProject.git
- Install the libraries used for building the external libraries of SLProject:
sudo apt install xorg-dev libzstd-dev libeigen3-dev
- Go into the build scripts directory and modify some of them:
cd <SLProject root>/externals/prebuild_scripts/
In build_assimp_for_linux.sh
, build_g2o_for_linux.sh
and build_glfw_for_linux.sh
, change make -j100
to make -j8
(The system can't handle 100 compilers running in parallel)
In build_openssl_for_linux.sh
, remove export CC=clang
(OpenSSL cannot be compiled with Clang on this system)
- Build the external libraries:
./build_assimp_for_linux.sh v5.0.0
./build_g2o_for_linux.sh
./build_glfw_for_linux.sh 3.3.2
./build_ktx_for_linux.sh
./build_opencv_w_contrib_for_linux.sh 4.5.0
./build_openssl_for_linux.sh
- Build the SLProject Demo:
WAI must be disabled as it uses x86 intrinsics, which are not supported on AAarch64 (the Raspberry Pi processor architecture)
cd <SLProject root>
mkdir build
cd build
cmake .. -DSL_BUILD_WAI=off -DCMAKE_BUILD_TYPE=Release
cmake --build . --target app-demo
- Install the Weston Wayland server and XWayland:
sudo apt install weston xwayland
-
Enable OpenGL on the Raspberry Pi:
In/boot/config.txt
, uncomment# dtoverlay=vc4-kms-v3d
(requires root privileges)
Reboot the system:sudo reboot
-
The Raspberry Pi hardware only supports OpenGL up to version 2.1, but SLProject requires at least version 3.0. To fix this, enable software rendering in the driver for the missing features:
export MESA_GL_VERSION_OVERRIDE=3.0
- Launch Weston:
weston-launch
- Open a new terminal (top left icon) and launch the demo:
<SLProject root>/build/app-demo-release