libcamera build errors

  • 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

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值