Qengineering / Qengineering/RPi-image

install raspistill or libcamera

Open
#14 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
138
Forks
19
PR merge metrics
No merged PRs in 30d

Description

How to install raspistill or libcamera?
According to the official article, I encountered an error.

pi@raspberrypi:~/libcamera $ ninja -C build install
ninja: Entering directory `build'
[5/188] Compiling C++ object src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_gsl.cpp.o
FAILED: src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_gsl.cpp.o
c++ -Isrc/ipa/rkisp1/ipa_rkisp1.so.p -Isrc/ipa/rkisp1 -I../src/ipa/rkisp1 -Iinclude -I../include -Isrc/ipa -I../src/ipa -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -g -Wl,--start-group -lstdc++fs -Wl,--end-group -Wshadow -include /home/pi/libcamera/build/config.h -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_gsl.cpp.o -MF src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_gsl.cpp.o.d -o src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_gsl.cpp.o -c ../src/ipa/rkisp1/algorithms/gsl.cpp
In file included from ../include/libcamera/controls.h:11,
from ../src/ipa/libipa/algorithm.h:12,
from ../src/ipa/rkisp1/algorithms/algorithm.h:10,
from ../src/ipa/rkisp1/algorithms/gsl.h:10,
from ../src/ipa/rkisp1/algorithms/gsl.cpp:8:
/usr/include/c++/8/optional: In instantiation of ‘_Tp std::optional<_Tp>::value_or(_Up&&) && [with _Up = const libcamera::utils::details::defopt_t&; _Tp = std::vector]’:
../src/ipa/rkisp1/algorithms/gsl.cpp:63:71: required from here
/usr/include/c++/8/optional:1267:8: error: call of overloaded ‘vector(const libcamera::utils::details::defopt_t&)’ is ambiguous
: static_cast<_Tp>(std::forward<_Up>(__u));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
from ../include/libcamera/controls.h:16,
from ../src/ipa/libipa/algorithm.h:12,
from ../src/ipa/rkisp1/algorithms/algorithm.h:10,
from ../src/ipa/rkisp1/algorithms/gsl.h:10,
from ../src/ipa/rkisp1/algorithms/gsl.cpp:8:
/usr/include/c++/8/bits/stl_vector.h:515:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = short unsigned int; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’
vector(initializer_list<value_type> __l,
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:476:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = short unsigned int; _Alloc = std::allocator]’
vector(vector&& __x) noexcept
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:458:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = short unsigned int; _Alloc = std::allocator]’
vector(const vector& __x)
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:415:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = short unsigned int; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’ vector(size_type __n, const allocator_type& __a = allocator_type())
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:402:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = short unsigned int; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’
vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
^~~~~~
[6/188] Compiling C++ object src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_lsc.cpp.o
FAILED: src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_lsc.cpp.o
c++ -Isrc/ipa/rkisp1/ipa_rkisp1.so.p -Isrc/ipa/rkisp1 -I../src/ipa/rkisp1 -Iinclude -I../include -Isrc/ipa -I../src/ipa -Iinclude/libcamera/ipa -Iinclude/libcamera -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -std=c++17 -O0 -g -Wl,--start-group -lstdc++fs -Wl,--end-group -Wshadow -include /home/pi/libcamera/build/config.h -fPIC -DLIBCAMERA_BASE_PRIVATE -MD -MQ src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_lsc.cpp.o -MF src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_lsc.cpp.o.d -o src/ipa/rkisp1/ipa_rkisp1.so.p/algorithms_lsc.cpp.o -c ../src/ipa/rkisp1/algorithms/lsc.cpp
In file included from ../include/libcamera/controls.h:11,
from ../src/ipa/libipa/algorithm.h:12,
from ../src/ipa/rkisp1/algorithms/algorithm.h:10,
from ../src/ipa/rkisp1/algorithms/lsc.h:10,
from ../src/ipa/rkisp1/algorithms/lsc.cpp:8:
/usr/include/c++/8/optional: In instantiation of ‘_Tp std::optional<_Tp>::value_or(_Up&&) && [with _Up = const libcamera::utils::details::defopt_t&; _Tp = std::vector]’:
../src/ipa/rkisp1/algorithms/lsc.cpp:46:60: required from here
/usr/include/c++/8/optional:1267:8: error: call of overloaded ‘vector(const libcamera::utils::details::defopt_t&)’ is ambiguous
: static_cast<_Tp>(std::forward<_Up>(__u));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
from ../include/libcamera/controls.h:16,
from ../src/ipa/libipa/algorithm.h:12,
from ../src/ipa/rkisp1/algorithms/algorithm.h:10,
from ../src/ipa/rkisp1/algorithms/lsc.h:10,
from ../src/ipa/rkisp1/algorithms/lsc.cpp:8:
/usr/include/c++/8/bits/stl_vector.h:515:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = double; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’
vector(initializer_list<value_type> __l,
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:476:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = double; _Alloc = std::allocator]’
vector(vector&& __x) noexcept
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:458:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = double; _Alloc = std::allocator]’
vector(const vector& __x)
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:415:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = double; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’
vector(size_type __n, const allocator_type& __a = allocator_type())
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:402:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = double; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’
vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
^~~~~~
In file included from ../include/libcamera/controls.h:11,
from ../src/ipa/libipa/algorithm.h:12,
from ../src/ipa/rkisp1/algorithms/algorithm.h:10,
from ../src/ipa/rkisp1/algorithms/lsc.h:10,
from ../src/ipa/rkisp1/algorithms/lsc.cpp:8:
/usr/include/c++/8/optional: In instantiation of ‘_Tp std::optional<_Tp>::value_or(_Up&&) && [with _Up = const libcamera::utils::details::defopt_t&; _Tp = std::vector]’:
../src/ipa/rkisp1/algorithms/lsc.cpp:79:62: required from here
/usr/include/c++/8/optional:1267:8: error: call of overloaded ‘vector(const libcamera::utils::details::defopt_t&)’ is ambiguous
: static_cast<_Tp>(std::forward<_Up>(__u));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
from ../include/libcamera/controls.h:16,
from ../src/ipa/libipa/algorithm.h:12,
from ../src/ipa/rkisp1/algorithms/algorithm.h:10,
from ../src/ipa/rkisp1/algorithms/lsc.h:10,
from ../src/ipa/rkisp1/algorithms/lsc.cpp:8:
/usr/include/c++/8/bits/stl_vector.h:515:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = short unsigned int; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’
vector(initializer_list<value_type> __l,
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:476:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>&&) [with _Tp = short unsigned int; _Alloc = std::allocator]’
vector(vector&& __x) noexcept
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:458:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(const std::vector<_Tp, _Alloc>&) [with _Tp = short unsigned int; _Alloc = std::allocator]’
vector(const vector& __x)
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:415:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(std::vector<_Tp, _Alloc>::size_type, const allocator_type&) [with _Tp = short unsigned int; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’ vector(size_type __n, const allocator_type& __a = allocator_type())
^~~~~~
/usr/include/c++/8/bits/stl_vector.h:402:7: note: candidate: ‘std::vector<_Tp, _Alloc>::vector(const allocator_type&) [with _Tp = short unsigned int; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::allocator_type = std::allocator]’
vector(const allocator_type& __a) _GLIBCXX_NOEXCEPT
^~~~~~
[10/188] Compiling C++ object src/qcam/qcam.p/.._cam_options.cpp.o
ninja: build stopped: subcommand failed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported ninja -C build install failure and inspect src/ipa/rkisp1/algorithms/gsl.cpp and src/ipa/rkisp1/algorithms/lsc.cpp, where the compiler errors occur. Reproduce the build on the Raspberry Pi environment described in the issue; done means the libcamera build completes and installation succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, raspberry-pi
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.