Skip to content

Build on Raspbian Linux

Chnoblouch edited this page Feb 28, 2022 · 5 revisions

SLProject also runs on a Raspberry Pi (...mostly).

  1. Download SLProject:
cd <Path to where you want the SLProject folder>
git clone https://github.com/cpvrlab/SLProject.git
  1. Install the libraries used for building the external libraries:
sudo apt install xorg-dev libzstd-dev libeigen3-dev
  1. 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
In build_openssl_for_linux.sh, remove export CC=clang

  1. 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
  1. 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-SLProject
  1. Install the Weston Wayland server and XWayland:
sudo apt install weston xwayland
  1. Enable OpenGL on the Raspberry Pi:
    In /boot/config.txt, uncomment # dtoverlay=vc4-kms-v3d (requires root privileges)
    Reboot the system: sudo reboot

  2. 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 for the missing features in the driver:

export MESA_GL_VERSION_OVERRIDE=3.0
  1. Launch Weston:
weston-launch
  1. Open a new terminal (top left icon) and launch the demo:
<SLProject root>/build/app-Demo-SLProject-release
Clone this wiki locally