jeudi 28 novembre 2019

Build OpenSCAD on the Raspberry Pi 4 running Raspbian GNU/Linux 10 (buster)

Slighty improving upon the CPU power compared to the 3B+, the 4B is mostly of interest because of the amount of RAM available (up-to 4 GB). So I'm continuing on investigating the possibility to build and run all the software I need on a CAD journey. This article is a follow-up on the Pi 3B+ article, so both articles look very similar. First thing first, let's try to build openscad (no package are available for raspbian buster today (2019/11/28)). For reliable result, notice I switched to tag openscad-2019.05 (using "git checkout openscad-2019.05" inside openscad folder once the git clone and submodule init are done).

Long story, short: build against Qt4 ! Else you'll run into the Open GL ES include issue.

The basic instructions are available at https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Linux/UNIX. This includes getting the dependencies for the project, using:

$ ./scripts/uni-get-dependencies.sh

But, checking the dependencies with:

$ ./scripts/check-dependencies.sh

shows errors. I had to manually install a few more packages. Basic method:

$ sudo apt-get install *name_of_missing_package*

will give you every packet with a name containing what you are looking for, just pick the right one (usually lib_something-dev). Go on until no error are given by the check-dependencies script as well as:

$ qmake-qt4 openscad.pro

Last step: I removed multimedia from the required package in openscad.pro. For this, open openscad.pro in your favorite text editor, look for "multimedia" and remove it.

Working with a 4GB version of the Pi 4, I disabled swap (sudo swapoff -a) and allowed up-to 3 parallel compile.

$ make -j 3 2>&1 | tee make.log

If everything went OK, you can run openscad directly from here (aka the build directory), or, better, install it machine-wide with:

$ sudo make install

And that's it. Please be aware that this will install things in /usr/local/.

That's it ! Faster said than done !

Get 4K 30fps from 4-lane IMX283 StarlightEye

Stock bookworm with imx283 kernel module will only get you up to this stage: pi@Pi5Cam1:~/Src/Official/RaspberryPi/rpicam-apps $ libcamer...