Skip to contentSkip to conversation

package/libcamera-apps: new package

PATCH Superseded Peter Seiderer 4 participants 5 messages May 2, 2021 – Feb 9, 2022

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 package/libcamera-apps: new package

---
Changes v4 -> v5:
- rebased on master, updated version to 326fdfd

Changes v3 -> v4:
- bump version
- remove 14 upstream applied patches

Changes v2 -> v3:
- bump version
- add license file entry/hash
- exchange patch 0002-cmake-remove-unrecognized-gcc-command-line-option.patch with 0002-cmake-add-option-ENABLE_COMPILE_FLAGS_FOR_TARGET.patch (a upstream suggested solution) and add cmake configure option accordingly

Changes v1 -> v2:
- fix Config.in indent (Thomas Petazzoni)
- fix Config.in select ordering (Thomas Petazzoni)
- fix Config.in comment regarding OpenGL
- change download to use github macro (Thomas Petazzoni)
- update 0001-cmake-remove-unsafe-host-include-path-for-libdrm-use.patch (add upstream link)
- update 0002-cmake-remove-unrecognized-gcc-command-line-option.patch (add upstream link)
- update 0003-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch (new patch)
- update 0004-libcamera_vid-fix-getline-call-needs-size_t.patch (add upstream link)
- update 0005-libcamera_still-fix-getline-call-needs-size_t.patch (add upstream link)
- update 0006-libcamera_app-fix-int64_t-constants.patch
(add upstream link)
- update 0007-cmake-fix-linking-with-exif-jpeg.patch
(add upstream link)
- update 0008-cmake-add-install-target.patch
(add upstream link, update on upstream request to support older cmake versions - add DESTINATION defaults)
- update 0009-cmake-no-need-to-link-against-ipa_rpi.so.patch (add upstream link)
- update 0010-circular_output-fix-size_t-vs.-unsigned-int-narrowin.patch (new patch)
- update 0011-egl_preview-fix-XVisualInfo-initializer.patch (new patch)
- update 0012-jpeg-fix-long-unsigned-int-vs.-size_t-mismatch.patch (new patch)
- update 0013-jpeg-fix-bool-vs.-boolean-mismatch.patch
(new patch)
- update 0014-mjpeg_encoder-fix-long-unsigned-int-vs.-size_t-misma.patch (new patch)
- update 0015-mjpeg_encoder-fix-bool-vs.-boolean-mismatch.patch (new patch)

Notes:
- Tested with test-pkg and the following two test configs

    BR2_PACKAGE_MESA3D=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER=y
    BR2_PACKAGE_MESA3D_DRIVER=y
    BR2_PACKAGE_MESA3D_GALLIUM_KMSRO=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y
    BR2_PACKAGE_MESA3D_GBM=y
    BR2_PACKAGE_MESA3D_OPENGL_EGL=y
    BR2_PACKAGE_XORG7=y
    BR2_PACKAGE_XLIB_LIBX11=y
    BR2_PACKAGE_LIBEPOXY=y
    BR2_PACKAGE_LIBDRM=y
    BR2_PACKAGE_BOOST=y
    BR2_PACKAGE_BOOST_PROGRAM_OPTIONS=y
    BR2_PACKAGE_LIBEXIF=y
    BR2_PACKAGE_JPEG=y
    BR2_PACKAGE_TIFF=y
    BR2_PACKAGE_LIBPNG=y
    BR2_PACKAGE_LIBCAMERA=y
    BR2_PACKAGE_LIBCAMERA_V4L2=y

    BR2_PACKAGE_MESA3D=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER=y
    BR2_PACKAGE_MESA3D_DRIVER=y
    BR2_PACKAGE_MESA3D_GALLIUM_KMSRO=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV=y
    BR2_PACKAGE_MESA3D_GBM=y
    BR2_PACKAGE_MESA3D_OPENGL_EGL=y
    BR2_PACKAGE_XORG7=y
    BR2_PACKAGE_XLIB_LIBX11=y
    BR2_PACKAGE_LIBEPOXY=y
    BR2_PACKAGE_LIBDRM=y
    BR2_PACKAGE_BOOST=y
    BR2_PACKAGE_BOOST_PROGRAM_OPTIONS=y
    BR2_PACKAGE_LIBEXIF=y
    BR2_PACKAGE_JPEG=y
    BR2_PACKAGE_TIFF=y
    BR2_PACKAGE_LIBPNG=y
    BR2_PACKAGE_LIBCAMERA=y
    BR2_PACKAGE_LIBCAMERA_V4L2=y

- runtime tested on RPi4 as described here

    http://lists.busybox.net/pipermail/buildroot/2021-January/302373.html
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...tal-errors-compiler-command-line-opt.patch | 25 +++++++++++++++
 package/libcamera-apps/Config.in              | 31 +++++++++++++++++++
 package/libcamera-apps/libcamera-apps.hash    |  3 ++
 package/libcamera-apps/libcamera-apps.mk      | 25 +++++++++++++++
 6 files changed, 86 insertions(+)
 create mode 100644 package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch
 create mode 100644 package/libcamera-apps/Config.in
 create mode 100644 package/libcamera-apps/libcamera-apps.hash
 create mode 100644 package/libcamera-apps/libcamera-apps.mk
DEVELOPERS +1 -0
index 573d8d84de..dc7f2ad564 100644
@@ -2127,6 +2127,7 @@ F:	package/gstreamer1/gst1-devtools/
 F:	package/gstreamer1/gst1-interpipe/
 F:	package/gstreamer1/gstreamer1-editing-services/
 F:	package/iwd/
+F:	package/libcamera-apps/
 F:	package/libevdev/
 F:	package/libuev/
 F:	package/log4cplus/
package/Config.in +1 -0
index 6181aaac2c..775d5d083f 100644
@@ -1686,6 +1686,7 @@ menu "Multimedia"
 	source "package/libbdplus/Config.in"
 	source "package/libbluray/Config.in"
 	source "package/libcamera/Config.in"
+	source "package/libcamera-apps/Config.in"
 	source "package/libdcadec/Config.in"
 	source "package/libdvbcsa/Config.in"
 	source "package/libdvbpsi/Config.in"
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +25 -0
new file mode 100644
index 0000000000..11d19fa526
@@ -0,0 +1,25 @@
+From 22096ef8cfb18563c1955145db24742081910e10 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Fri, 5 Feb 2021 18:24:08 +0100
+Subject: [PATCH] cmake: remove -Wfatal-errors compiler command line option
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4191245..199a0f6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,7 +10,6 @@ endif()
+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
+ set (CMAKE_CXX_STANDARD 17)
+ set (CMAKE CXX_FLAGS "-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new")
+-add_definitions(-Wfatal-errors)
+ add_definitions(-Wno-psabi)
+ add_definitions(-DBOOST_LOG_DYN_LINK)
+ 
+-- 
+2.30.0
+
package/libcamera-apps/Config.in new file +31 -0
new file mode 100644
index 0000000000..08667eb830
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_LIBCAMERA_APPS
+	bool "libcamera-apps"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
+	depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+	depends on !BR2_STATIC_LIBS # gnutls/libcamera
+	depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBCAMERA
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_LIBEPOXY
+	select BR2_PACKAGE_LIBEXIF
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_TIFF
+	select BR2_PACKAGE_XLIB_LIBX11
+	help
+	  This is a small suite of libcamera-based apps that aim to copy
+	  the functionality of the existing "raspicam" apps.
+
+	  https://github.com/raspberrypi/libcamera-apps
+
+comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 7 and needs an OpenGL and/or OpenGL EGL backend"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
+	depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL
package/libcamera-apps/libcamera-apps.hash new file +3 -0
new file mode 100644
index 0000000000..da426434c1
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  9b3475e1c817cbcf942c4be0dac3d1f6bf2ee192b0ca5edb95c85c06c5a12b4f  libcamera-apps-326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6.tar.gz
+sha256  36dfed86bdef661a0a14ec1a1cc84c771d5a06b6f9b92e9ebb610ba711bd528a  license.txt
package/libcamera-apps/libcamera-apps.mk new file +25 -0
new file mode 100644
index 0000000000..5edcefefad
@@ -0,0 +1,25 @@
+################################################################################
+#
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_VERSION = 326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6
+LIBCAMERA_APPS_SITE = $(call github,raspberrypi,libcamera-apps,$(LIBCAMERA_APPS_VERSION))
+LIBCAMERA_APPS_LICENSE = BSD-2-Clause
+LIBCAMERA_APPS_LICENSE_FILES = license.txt
+LIBCAMERA_APPS_DEPENDENCIES = \
+	host-pkgconf \
+	boost \
+	jpeg \
+	libcamera \
+	libdrm \
+	libexif \
+	libepoxy \
+	libpng \
+	tiff \
+	xlib_libX11
+
+LIBCAMERA_APPS_CONF_OPTS = -DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled
+
+$(eval $(cmake-package))
Signature · 1 line
2.31.1
#1 lore raw
Quoted 1 line · Peter Seiderer

(Finally) applied to master, thanks. However...

[snip]

Quoted 15 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +9 -0
new file mode 100644
index 0000000000..11d19fa526
@@ -0,0 +1,25 @@
+From 22096ef8cfb18563c1955145db24742081910e10 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Fri, 5 Feb 2021 18:24:08 +0100
+Subject: [PATCH] cmake: remove -Wfatal-errors compiler command line option
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)

package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch line 19

Quoted 10 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +10 -0
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4191245..199a0f6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,7 +10,6 @@ endif()
+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
+ set (CMAKE_CXX_STANDARD 17)
+ set (CMAKE CXX_FLAGS "-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new")
+-add_definitions(-Wfatal-errors)

Why is this patch needed? The only thing that -Wfatal-errors does is to stop
compilation when there is an error, instead of trying to continue and find more errors in the rest of the file. It's not -Werror.

I kept the patch anyway because I didn't test without it.

Regards,
Arnout

Quoted 73 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +6 -0
+ add_definitions(-Wno-psabi)
+ add_definitions(-DBOOST_LOG_DYN_LINK)
+
+--
+2.30.0
+
package/libcamera-apps/Config.in new file +31 -0
new file mode 100644
index 0000000000..08667eb830
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_LIBCAMERA_APPS
+	bool "libcamera-apps"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
+	depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+	depends on !BR2_STATIC_LIBS # gnutls/libcamera
+	depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBCAMERA
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_LIBEPOXY
+	select BR2_PACKAGE_LIBEXIF
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_TIFF
+	select BR2_PACKAGE_XLIB_LIBX11
+	help
+	  This is a small suite of libcamera-based apps that aim to copy
+	  the functionality of the existing "raspicam" apps.
+
+	  https://github.com/raspberrypi/libcamera-apps
+
+comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 7 and needs an OpenGL and/or OpenGL EGL backend"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
+	depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL
package/libcamera-apps/libcamera-apps.hash new file +3 -0
new file mode 100644
index 0000000000..da426434c1
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  9b3475e1c817cbcf942c4be0dac3d1f6bf2ee192b0ca5edb95c85c06c5a12b4f  libcamera-apps-326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6.tar.gz
+sha256  36dfed86bdef661a0a14ec1a1cc84c771d5a06b6f9b92e9ebb610ba711bd528a  license.txt
package/libcamera-apps/libcamera-apps.mk new file +15 -0
new file mode 100644
index 0000000000..5edcefefad
@@ -0,0 +1,25 @@
+################################################################################
+#
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_VERSION = 326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6
+LIBCAMERA_APPS_SITE = $(call github,raspberrypi,libcamera-apps,$(LIBCAMERA_APPS_VERSION))
+LIBCAMERA_APPS_LICENSE = BSD-2-Clause
+LIBCAMERA_APPS_LICENSE_FILES = license.txt
+LIBCAMERA_APPS_DEPENDENCIES = \
+	host-pkgconf \
+	boost \
+	jpeg \
+	libcamera \

package/libcamera-apps/libcamera-apps.mk line 25

Quoted 10 lines
package/libcamera-apps/libcamera-apps.mk new file +10 -0
+	libdrm \
+	libexif \
+	libepoxy \
+	libpng \
+	tiff \
+	xlib_libX11
+
+LIBCAMERA_APPS_CONF_OPTS = -DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled
+
+$(eval $(cmake-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw

Hi All,

Quoting Arnout Vandecappelle (2022-02-08 21:09:44)

Quoted 6 lines · Peter Seiderer
Quoted 1 line

(Finally) applied to master, thanks. However...

Ohh, I'm happy to see this packaged.

Can someone try to bump the libcamera to the latest revision soon please? There have been a couple of bug fixes/performance issues resolved that were quite noticable on the Pi.

In fact, now I check there's a couple more RPi patches to be merged soon so it might be worth getting those in first.
--
Kieran.

Quoted 114 lines

[snip]

Quoted 15 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +9 -0
new file mode 100644
index 0000000000..11d19fa526
@@ -0,0 +1,25 @@
+From 22096ef8cfb18563c1955145db24742081910e10 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Fri, 5 Feb 2021 18:24:08 +0100
+Subject: [PATCH] cmake: remove -Wfatal-errors compiler command line option
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)

package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch line 19

Quoted 10 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +10 -0
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4191245..199a0f6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,7 +10,6 @@ endif()
+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
+ set (CMAKE_CXX_STANDARD 17)
+ set (CMAKE CXX_FLAGS "-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new")
+-add_definitions(-Wfatal-errors)

Why is this patch needed? The only thing that -Wfatal-errors does is to stop
compilation when there is an error, instead of trying to continue and find more errors in the rest of the file. It's not -Werror.

I kept the patch anyway because I didn't test without it.

Regards,
Arnout

Quoted 75 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +6 -0
+ add_definitions(-Wno-psabi)
+ add_definitions(-DBOOST_LOG_DYN_LINK)
+
+--
+2.30.0
+
package/libcamera-apps/Config.in new file +31 -0
new file mode 100644
index 0000000000..08667eb830
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_LIBCAMERA_APPS
+     bool "libcamera-apps"
+     depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
+     depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
+     depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm
+     depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+     depends on !BR2_STATIC_LIBS # gnutls/libcamera
+     depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+     depends on BR2_PACKAGE_XORG7
+     depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy
+     select BR2_PACKAGE_BOOST
+     select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+     select BR2_PACKAGE_JPEG
+     select BR2_PACKAGE_LIBCAMERA
+     select BR2_PACKAGE_LIBDRM
+     select BR2_PACKAGE_LIBEPOXY
+     select BR2_PACKAGE_LIBEXIF
+     select BR2_PACKAGE_LIBPNG
+     select BR2_PACKAGE_TIFF
+     select BR2_PACKAGE_XLIB_LIBX11
+     help
+       This is a small suite of libcamera-based apps that aim to copy
+       the functionality of the existing "raspicam" apps.
+
+       https://github.com/raspberrypi/libcamera-apps
+
+comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 7 and needs an OpenGL and/or OpenGL EGL backend"
+     depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
+     depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+             !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
+     depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL
package/libcamera-apps/libcamera-apps.hash new file +3 -0
new file mode 100644
index 0000000000..da426434c1
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  9b3475e1c817cbcf942c4be0dac3d1f6bf2ee192b0ca5edb95c85c06c5a12b4f  libcamera-apps-326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6.tar.gz
+sha256  36dfed86bdef661a0a14ec1a1cc84c771d5a06b6f9b92e9ebb610ba711bd528a  license.txt
package/libcamera-apps/libcamera-apps.mk new file +17 -0
new file mode 100644
index 0000000000..5edcefefad
@@ -0,0 +1,25 @@
+################################################################################
+#
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_VERSION = 326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6
+LIBCAMERA_APPS_SITE = $(call github,raspberrypi,libcamera-apps,$(LIBCAMERA_APPS_VERSION))
+LIBCAMERA_APPS_LICENSE = BSD-2-Clause
+LIBCAMERA_APPS_LICENSE_FILES = license.txt
+LIBCAMERA_APPS_DEPENDENCIES = \
+     host-pkgconf \
+     boost \
+     jpeg \
+     libcamera \
+     libdrm \
+     libexif \
Quoted 8 lines

package/libcamera-apps/libcamera-apps.mk line 25

Quoted 8 lines
package/libcamera-apps/libcamera-apps.mk new file +8 -0
+     libepoxy \
+     libpng \
+     tiff \
+     xlib_libX11
+
+LIBCAMERA_APPS_CONF_OPTS = -DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled
+
+$(eval $(cmake-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw

Hi Kieran,

Quoted 10 lines · Kieran Bingham

Hi All,

Quoting Arnout Vandecappelle (2022-02-08 21:09:44)

Quoted 6 lines · Peter Seiderer
Quoted 1 line

(Finally) applied to master, thanks. However...

Quoted 8 lines

Ohh, I'm happy to see this packaged.

Can someone try to bump the libcamera to the latest revision soon please? There have been a couple of bug fixes/performance issues resolved that were quite noticable on the Pi.

In fact, now I check there's a couple more RPi patches to be merged soon so it might be worth getting those in first.

I can bump the version once you've pushed the RPi patches, but I see that you're the maintainer here in Buildroot so you should. Anyway it's not a problem for me. Only let me know when it's time to bump it

Thank you!

Best regards

Signature · 2 lines
Giulio Benetti
Benetti Engineering sas
Quoted 121 lines

--
Kieran.

Quoted 118 lines

[snip]

Quoted 15 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +9 -0
new file mode 100644
index 0000000000..11d19fa526
@@ -0,0 +1,25 @@
+From 22096ef8cfb18563c1955145db24742081910e10 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Fri, 5 Feb 2021 18:24:08 +0100
+Subject: [PATCH] cmake: remove -Wfatal-errors compiler command line option
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)

package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch line 19

Quoted 10 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +10 -0
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4191245..199a0f6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,7 +10,6 @@ endif()
+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
+ set (CMAKE_CXX_STANDARD 17)
+ set (CMAKE CXX_FLAGS "-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new")
+-add_definitions(-Wfatal-errors)

Why is this patch needed? The only thing that -Wfatal-errors does is to stop
compilation when there is an error, instead of trying to continue and find more errors in the rest of the file. It's not -Werror.

I kept the patch anyway because I didn't test without it.

Regards,
Arnout

Quoted 79 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +6 -0
+ add_definitions(-Wno-psabi)
+ add_definitions(-DBOOST_LOG_DYN_LINK)
+
+--
+2.30.0
+
package/libcamera-apps/Config.in new file +31 -0
new file mode 100644
index 0000000000..08667eb830
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_LIBCAMERA_APPS
+     bool "libcamera-apps"
+     depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
+     depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
+     depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm
+     depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+     depends on !BR2_STATIC_LIBS # gnutls/libcamera
+     depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+     depends on BR2_PACKAGE_XORG7
+     depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy
+     select BR2_PACKAGE_BOOST
+     select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+     select BR2_PACKAGE_JPEG
+     select BR2_PACKAGE_LIBCAMERA
+     select BR2_PACKAGE_LIBDRM
+     select BR2_PACKAGE_LIBEPOXY
+     select BR2_PACKAGE_LIBEXIF
+     select BR2_PACKAGE_LIBPNG
+     select BR2_PACKAGE_TIFF
+     select BR2_PACKAGE_XLIB_LIBX11
+     help
+       This is a small suite of libcamera-based apps that aim to copy
+       the functionality of the existing "raspicam" apps.
+
+       https://github.com/raspberrypi/libcamera-apps
+
+comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 7 and needs an OpenGL and/or OpenGL EGL backend"
+     depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
+     depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+             !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
+     depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL
package/libcamera-apps/libcamera-apps.hash new file +3 -0
new file mode 100644
index 0000000000..da426434c1
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  9b3475e1c817cbcf942c4be0dac3d1f6bf2ee192b0ca5edb95c85c06c5a12b4f  libcamera-apps-326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6.tar.gz
+sha256  36dfed86bdef661a0a14ec1a1cc84c771d5a06b6f9b92e9ebb610ba711bd528a  license.txt
package/libcamera-apps/libcamera-apps.mk new file +21 -0
new file mode 100644
index 0000000000..5edcefefad
@@ -0,0 +1,25 @@
+################################################################################
+#
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_VERSION = 326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6
+LIBCAMERA_APPS_SITE = $(call github,raspberrypi,libcamera-apps,$(LIBCAMERA_APPS_VERSION))
+LIBCAMERA_APPS_LICENSE = BSD-2-Clause
+LIBCAMERA_APPS_LICENSE_FILES = license.txt
+LIBCAMERA_APPS_DEPENDENCIES = \
+     host-pkgconf \
+     boost \
+     jpeg \
+     libcamera \
+     libdrm \
+     libexif \
+     libepoxy \
+     libpng \
+     tiff \
+     xlib_libX11
Quoted 8 lines
Quoted 4 lines

package/libcamera-apps/libcamera-apps.mk line 25

Quoted 4 lines
package/libcamera-apps/libcamera-apps.mk new file +4 -0
+
+LIBCAMERA_APPS_CONF_OPTS = -DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled
+
+$(eval $(cmake-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
In reply to Arnout Vandecappelle

Hello Arnout,

Quoted 27 lines · Arnout Vandecappelle
Quoted 1 line · Peter Seiderer

(Finally) applied to master, thanks. However...

[snip]

Quoted 21 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +15 -0
new file mode 100644
index 0000000000..11d19fa526
@@ -0,0 +1,25 @@
+From 22096ef8cfb18563c1955145db24742081910e10 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <[email protected]>
+Date: Fri, 5 Feb 2021 18:24:08 +0100
+Subject: [PATCH] cmake: remove -Wfatal-errors compiler command line option
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4191245..199a0f6 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,7 +10,6 @@ endif()
Quoted 8 lines

package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch line 19

Quoted 4 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +4 -0
+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
+ set (CMAKE_CXX_STANDARD 17)
+ set (CMAKE CXX_FLAGS "-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new")
+-add_definitions(-Wfatal-errors)

Why is this patch needed? The only thing that -Wfatal-errors does is to stop
compilation when there is an error, instead of trying to continue and find more errors in the rest of the file. It's not -Werror.

Do not remember the exact failure....

Quoted 2 lines

I kept the patch anyway because I didn't test without it.

Ups, patch needs some update anyway, fails with current libcamera package/version:

-- Checking for module 'camera'
-- Package 'camera', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:603 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal) CMakeLists.txt:36 (pkg_check_modules)

Fixed upstream by [1]...

Regards,
Peter

[1] https://github.com/raspberrypi/libcamera-apps/commit/729df015fb37ab25abd73c4832f9e7fa5d1cb8de

Quoted 81 lines

Regards,
Arnout

Quoted 75 lines
package/libcamera-apps/0001-cmake-remove-Wfatal-errors-compiler-command-line-opt.patch new file +6 -0
+ add_definitions(-Wno-psabi)
+ add_definitions(-DBOOST_LOG_DYN_LINK)
+
+--
+2.30.0
+
package/libcamera-apps/Config.in new file +31 -0
new file mode 100644
index 0000000000..08667eb830
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_LIBCAMERA_APPS
+	bool "libcamera-apps"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS # libcamera
+	depends on BR2_INSTALL_LIBSTDCPP # libcamera/boost
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libcamera/boost/libdrm
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+	depends on !BR2_STATIC_LIBS # gnutls/libcamera
+	depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL # libepoxy
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBCAMERA
+	select BR2_PACKAGE_LIBDRM
+	select BR2_PACKAGE_LIBEPOXY
+	select BR2_PACKAGE_LIBEXIF
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_TIFF
+	select BR2_PACKAGE_XLIB_LIBX11
+	help
+	  This is a small suite of libcamera-based apps that aim to copy
+	  the functionality of the existing "raspicam" apps.
+
+	  https://github.com/raspberrypi/libcamera-apps
+
+comment "libcamera-apps needs a toolchain w/ C++, threads, wchar, dynamic library, gcc >= 7 and needs an OpenGL and/or OpenGL EGL backend"
+	depends on BR2_PACKAGE_LIBCAMERA_ARCH_SUPPORTS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
+	depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL
package/libcamera-apps/libcamera-apps.hash new file +3 -0
new file mode 100644
index 0000000000..da426434c1
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  9b3475e1c817cbcf942c4be0dac3d1f6bf2ee192b0ca5edb95c85c06c5a12b4f  libcamera-apps-326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6.tar.gz
+sha256  36dfed86bdef661a0a14ec1a1cc84c771d5a06b6f9b92e9ebb610ba711bd528a  license.txt
package/libcamera-apps/libcamera-apps.mk new file +17 -0
new file mode 100644
index 0000000000..5edcefefad
@@ -0,0 +1,25 @@
+################################################################################
+#
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_VERSION = 326fdfd120a0f62b7e76f4ee8aa0c82c2bf008e6
+LIBCAMERA_APPS_SITE = $(call github,raspberrypi,libcamera-apps,$(LIBCAMERA_APPS_VERSION))
+LIBCAMERA_APPS_LICENSE = BSD-2-Clause
+LIBCAMERA_APPS_LICENSE_FILES = license.txt
+LIBCAMERA_APPS_DEPENDENCIES = \
+	host-pkgconf \
+	boost \
+	jpeg \
+	libcamera \
+	libdrm \
+	libexif \
Quoted 8 lines

package/libcamera-apps/libcamera-apps.mk line 25

Quoted 8 lines
package/libcamera-apps/libcamera-apps.mk new file +8 -0
+	libepoxy \
+	libpng \
+	tiff \
+	xlib_libX11
+
+LIBCAMERA_APPS_CONF_OPTS = -DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled
+
+$(eval $(cmake-package))

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot