- ninja error
$ sudo ninja -C build install -j 1
limit the ninja threads to 1, so that the whole OS won’t get stuck during build process.
- meson error
$ meson build
meson.build:136.33: ERROR: Expecting eol got not.
if get_option('test') and 'vimc' not in pipelines
^
refer to the github repo of libcamera : https://github.com/kbingham/libcamera we can find that meson requires gcc-8 or higher complier. However, on ubuntu MATE 18.04 the default gcc version is 7.4.0.
Hence, we have to install gcc-8 and the make it default choice
# install gcc-8
sudo apt-get install gcc-8
# change default
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 8
check which gcc is by default selected
sudo update-alternatives --config gcc
#check the gcc version
gcc --version
libcamera-hello error on raspbian bullseye
the official guide tells me to enable camera legacy in the raspi-config -> Interface Options
Here is the official guide.
- Ensure your system is up-to-date and reboot it.
- Run sudo raspi-config.
- Navigate to Interface Options and select Legacy camera to enable it.
- Reboot your Raspberry Pi again.
However, it turns out that operation like this will lead to an error when you try to start libcamera-hello. It says that :
error the system appears to be configured for the legacy camera stack
Obviously, the error tells us we don’t need configure legacy camera here, which means the official guide is wrong. The right step is:
- Run sudo raspi-config.
- Navigate to Interface Options and select Legacy camera to disable it.
- Navigate to Advanced Options and select Glamer to enable it.
- Finish and reboot
Now you will see the image after type in libcamera-hello