Skip to contentSkip to conversation

package/libcamera-apps: new package

PATCH Applied Peter Seiderer 2 participants 3 messages Feb 11, 2022 – Feb 12, 2022

lore
Share & tools
lore
#0 lore raw

v6 cover package/libcamera-apps: new package

- patch on top of latest libcamera version bump ([1])

- tested with test-pkg and the following test config

    BR2_PACKAGE_MESA3D=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER=y
    BR2_PACKAGE_MESA3D_DRIVER=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=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 RPi3-b-plus/Pi-Camaera-v2.1) with the followig defconfig (raspberrypi3_64_defconfig based)

    BR2_aarch64=y
    BR2_ARM_FPU_VFPV4=y
    BR2_OPTIMIZE_3=y
    BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
    BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
    BR2_PACKAGE_GLIBC_UTILS=y
    BR2_GCC_VERSION_11_X=y
    BR2_TOOLCHAIN_BUILDROOT_CXX=y
    BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
    BR2_SYSTEM_DHCP="eth0"
    BR2_GENERATE_LOCALE="en_US"
    BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi3-64/post-build.sh"
    BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi3-64/post-image.sh"
    BR2_LINUX_KERNEL=y
    BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
    BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,0b54dbda3cca2beb51e236a25738784e90853b64)/linux-0b54dbda3cca2beb51e236a25738784e90853b64.tar.gz"
    BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3"
    BR2_LINUX_KERNEL_DTS_SUPPORT=y
    BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus broadcom/bcm2837-rpi-3-b"
    BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
    BR2_PACKAGE_STRACE=y
    BR2_PACKAGE_MTOOLS=y
    BR2_PACKAGE_DEJAVU=y
    BR2_PACKAGE_MESA3D=y
    BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y
    BR2_PACKAGE_MESA3D_OPENGL_ES=y
    BR2_PACKAGE_QT5=y
    BR2_PACKAGE_QT5BASE_EXAMPLES=y
    BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
    BR2_PACKAGE_QT5BASE_EGLFS=y
    BR2_PACKAGE_QT5BASE_DEFAULT_QPA="eglfs"
    BR2_PACKAGE_QT5BASE_FONTCONFIG=y
    BR2_PACKAGE_QT5BASE_HARFBUZZ=y
    BR2_PACKAGE_QT5BASE_GIF=y
    BR2_PACKAGE_QT5BASE_JPEG=y
    BR2_PACKAGE_QT5BASE_PNG=y
    BR2_PACKAGE_QT5QUICKCONTROLS=y
    BR2_PACKAGE_QT5QUICKCONTROLS2=y
    BR2_PACKAGE_RPI_FIRMWARE=y
    BR2_PACKAGE_RPI_FIRMWARE_BOOTCODE_BIN=y
    BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI=y
    BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="board/raspberrypi3-64/config_3_64bit.txt"
    BR2_PACKAGE_LIBXKBCOMMON=y
    BR2_PACKAGE_LIBCAMERA_V4L2=y
    BR2_PACKAGE_LIBCAMERA_PIPELINE_RASPBERRYPI=y
    BR2_PACKAGE_LIBCAMERA_PIPELINE_RKISP1=y
    BR2_PACKAGE_LIBCAMERA_PIPELINE_SIMPLE=y
    BR2_PACKAGE_LIBCAMERA_PIPELINE_UVCVIDEO=y
    BR2_PACKAGE_LIBCAMERA_PIPELINE_VIMC=y
    BR2_PACKAGE_LIBCAMERA_COMPLIANCE=y
    BR2_PACKAGE_LIBCAMERA_APPS=y
    BR2_PACKAGE_DDRESCUE=y
    BR2_TARGET_ROOTFS_EXT2=y
    BR2_TARGET_ROOTFS_EXT2_4=y
    BR2_TARGET_ROOTFS_EXT2_SIZE="384M"
    # BR2_TARGET_ROOTFS_TAR is not set
    BR2_PACKAGE_HOST_DOSFSTOOLS=y
    BR2_PACKAGE_HOST_GENIMAGE=y
    BR2_PACKAGE_HOST_MTOOLS=y

and the additional /boot/config.txt entries

dtoverlay=vc4-kms-v3d
dtoverlay=imx219

and the followig change in the kernel config to fix imx219 camera detection ('imx219 10-0010: failed to get regulators')

@@ -3485,7 +3485,7 @@

CONFIG_REGULATOR=y
# CONFIG_REGULATOR_DEBUG is not set
-# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +CONFIG_REGULATOR_FIXED_VOLTAGE=y
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set # CONFIG_REGULATOR_88PG86X is not set

and the following libcamera patch to disable the signature check (see [2] and [3] for details)

    diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
    index ad05b9c9..66d4ea48 100644
    --- a/src/libcamera/ipa_manager.cpp
    +++ b/src/libcamera/ipa_manager.cpp
    @@ -302,6 +302,9 @@ std::unique_ptr<IPAProxy> IPAManager::createIPA(PipelineHandler *pipe,
     
     bool IPAManager::isSignatureValid([[maybe_unused]] IPAModule *ipa) const
     {
    +#if 1
    +	return true;
    +#else
     #if HAVE_IPA_PUBKEY
     	File file{ ipa->path() };
     	if (!file.open(File::ReadOnly))
    @@ -321,6 +324,7 @@ bool IPAManager::isSignatureValid([[maybe_unused]] IPAModule *ipa) const
     #else
     	return false;
     #endif
    +#endif
     }
     
     } /* namespace libcamera */

[1] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
[2] https://lists.buildroot.org/pipermail/buildroot/2020-June/284963.html
[3] http://lists.busybox.net/pipermail/buildroot/2021-January/302373.html

Peter Seiderer (1):
package/libcamera-apps: new package

 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...ror-and-Wfatal-errors-compiler-comma.patch | 37 +++++++++++++++
 package/libcamera-apps/Config.in              | 30 ++++++++++++
 package/libcamera-apps/libcamera-apps.hash    |  3 ++
 package/libcamera-apps/libcamera-apps.mk      | 46 +++++++++++++++++++
 6 files changed, 118 insertions(+)
 create mode 100644 package/libcamera-apps/0001-cmake-remove-Werror-and-Wfatal-errors-compiler-comma.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
Signature · 6 lines
2.34.1

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

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

---
Changes v5 -> v6:
- bump version to 2d1009e
- refresh 0001-cmake-remove-Werror-and-Wfatal-errors-compiler-comma.patch update to remove -Werror and -Wfatal-errors and add failure description
- libdrm, libepoxy, xlib_libX11 are now optional
- disable opencv (opencv2) and tflite support
- optional libdrm support
- optional X11 support
- optional Qt5 support

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)

---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...ror-and-Wfatal-errors-compiler-comma.patch | 37 +++++++++++++++
 package/libcamera-apps/Config.in              | 30 ++++++++++++
 package/libcamera-apps/libcamera-apps.hash    |  3 ++
 package/libcamera-apps/libcamera-apps.mk      | 46 +++++++++++++++++++
 6 files changed, 118 insertions(+)
 create mode 100644 package/libcamera-apps/0001-cmake-remove-Werror-and-Wfatal-errors-compiler-comma.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 0e759bc168..acf8438ab8 100644
@@ -2272,6 +2272,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 1a9f3e29d8..0dfd2e89db 100644
@@ -1731,6 +1731,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-Werror-and-Wfatal-errors-compiler-comma.patch new file +37 -0
new file mode 100644
index 0000000000..988d89cca3
@@ -0,0 +1,37 @@
+From 6bd733b52f0b4039407c676cd3126a9e2f79456b 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 -Werror and -Wfatal-errors compiler command
+ line option
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes (with bootlin-riscv64-musl toolchain):
+
+  .../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/core/libcamera_app.cpp:30:22: error: overflow in conversion from ‘long unsigned int’ to ‘int’ changes value from ‘2154321408’ to ‘-2140645888’ [-Werror=overflow]
+     30 |  int ret = ioctl(fd, VIDIOC_QUERYCAP, &caps);
+        |                      ^~~~~~~~~~~~~~~
+  cc1plus: all warnings being treated as errors
+
+Signed-off-by: Peter Seiderer <[email protected]>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 748c6dd..1ca1e39 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -11,7 +11,7 @@ endif()
+ 
+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
+ set (CMAKE_CXX_STANDARD 17)
+-add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new -Werror -Wfatal-errors)
++add_compile_options(-Wall -Wextra -pedantic -Wno-unused-parameter -faligned-new)
+ add_definitions(-D_FILE_OFFSET_BITS=64)
+ 
+ if (CMAKE_COMPILER_IS_GNUCXX)
+-- 
+2.34.1
+
package/libcamera-apps/Config.in new file +30 -0
new file mode 100644
index 0000000000..75807b9c01
@@ -0,0 +1,30 @@
+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
+	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
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBCAMERA
+	select BR2_PACKAGE_LIBEXIF
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_TIFF
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
+	select BR2_PACKAGE_LIBEPOXY if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
+	select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5
+
+	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"
+	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
package/libcamera-apps/libcamera-apps.hash new file +3 -0
new file mode 100644
index 0000000000..2dbb74d463
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  611aec06dd24de6586580164d9b7c55da0698ac4cf129944b2fc41fe67210597  libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5.tar.gz
+sha256  36dfed86bdef661a0a14ec1a1cc84c771d5a06b6f9b92e9ebb610ba711bd528a  license.txt
package/libcamera-apps/libcamera-apps.mk new file +46 -0

46 lines not on this page · raw message

Signature · 6 lines
2.34.1

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

Peter, All,

+Kieran

On 2022-02-11 16:06 +0100, Peter Seiderer spake thusly:

Quoted 1 line

Finally applied to master, thanks.

However, see below for somme important comments...

Quoted 1 line

---

[--SNIP--]

Quoted 11 lines
package/libcamera-apps/0001-cmake-remove-Werror-and-Wfatal-errors-compiler-comma.patch new file +5 -0
new file mode 100644
index 0000000000..988d89cca3
@@ -0,0 +1,37 @@
+From 6bd733b52f0b4039407c676cd3126a9e2f79456b 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 -Werror and -Wfatal-errors compiler command
+ line option

package/libcamera-apps/0001-cmake-remove-Werror-and-Wfatal-errors-compiler-comma.patch line 15

Quoted 10 lines
package/libcamera-apps/0001-cmake-remove-Werror-and-Wfatal-errors-compiler-comma.patch new file +10 -0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes (with bootlin-riscv64-musl toolchain):
+
+  .../build/libcamera-apps-2d1009e3badcc8047361ff81149ad6cba3b911b5/core/libcamera_app.cpp:30:22: error: overflow in conversion from ‘long unsigned int’ to ‘int’ changes value from ‘2154321408’ to ‘-2140645888’ [-Werror=overflow]
+     30 |  int ret = ioctl(fd, VIDIOC_QUERYCAP, &caps);
+        |                      ^~~~~~~~~~~~~~~
+  cc1plus: all warnings being treated as errors

Kieran, I believe this really needs some investigation on your side. Peter, can you provide a defconfig that exhibits the issue, please?

[--SNIP--]

Quoted 13 lines
package/libcamera-apps/Config.in new file +7 -0
new file mode 100644
index 0000000000..75807b9c01
@@ -0,0 +1,30 @@
+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
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17/libcamera
+	depends on !BR2_STATIC_LIBS # gnutls/libcamera

package/libcamera-apps/Config.in line 17

Quoted 10 lines
package/libcamera-apps/Config.in new file +10 -0
+	depends on BR2_USE_WCHAR # gnutls/libcamera/boost
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_LIBCAMERA
+	select BR2_PACKAGE_LIBEXIF
+	select BR2_PACKAGE_LIBPNG
+	select BR2_PACKAGE_TIFF
+	select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)
+	select BR2_PACKAGE_LIBEPOXY if BR2_PACKAGE_XORG7 && (BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL)

Look closely those two select: if neither EGL nor GL are neabled, then neither libeopxy nor xlib-libx11 are enabled, even when Xorg is. So, see later [0]...

package/libcamera-apps/Config.in line 19

Quoted 2 lines
package/libcamera-apps/Config.in new file +2 -0
+	select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5
+	select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5

When Qt5 is enabled, then Qt5GUI and Qt5Widgets are enabled, so [1]...

package/libcamera-apps/Config.in line 20

Quoted 1 line
package/libcamera-apps/Config.in new file +1 -0
+

Spurious empty line, I dropeed it.

[--SNIP--]

Quoted 30 lines
package/libcamera-apps/libcamera-apps.mk new file +24 -0
new file mode 100644
index 0000000000..23cc02793d
@@ -0,0 +1,46 @@
+################################################################################
+#
+# libcamera-apps
+#
+################################################################################
+
+LIBCAMERA_APPS_VERSION = 2d1009e3badcc8047361ff81149ad6cba3b911b5
+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 \
+	libexif \
+	libpng \
+	tiff
+
+LIBCAMERA_APPS_CONF_OPTS = \
+	-DENABLE_COMPILE_FLAGS_FOR_TARGET=disabled \
+	-DENABLE_OPENCV=0 \
+	-DENABLE_TFLITE=0
+

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

Quoted 10 lines
package/libcamera-apps/libcamera-apps.mk new file +10 -0
+ifeq ($(BR2_PACKAGE_LIBDRM),y)
+LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=1
+LIBCAMERA_APPS_DEPENDENCIES += libdrm
+else
+LIBCAMERA_APPS_CONF_OPTS += -DENABLE_DRM=0
+endif
+
+ifeq ($(BR2_PACKAGE_XORG7)$(BR2_PACKAGE_LIBEPOXY),yy)
+LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=1
+LIBCAMERA_APPS_DEPENDENCIES += libepoxy xlib_libX11

[0] so here, the condition is only on Xorg && linepoxy, and nothing about xlib-libx11, but still a dependency is added against it, although it may well be not enabled.

So, I changed the condition to:

    ifeq ($(BR2_PACKAGE_XORG7),y)
    LIBCAMERA_APPS_DEPENDENCIES += \
        $(if $(BR2_PACKAGE_LIBEPOXY),libepoxy) \
        $(if $(BR2_PACKAGE_XLIB_LIBX11),xlib_libX11)
    LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=1
    else
    LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=0
    endif

Argh, and now I see I missed something: indeed, libepoxy and xlib-libx11 are selected udner the same conditions, so if either is enabled, the other is.... Oh, wait, no, they can either be enabled manually by the user, and not 'selected' by libcanera-apps, so we still can have the situation where they are not both enabled...

So, if both xlib-libx11 are required, then please send a patch to fix the comndition. In any case, pelase review the current code, at least to check if I did not mess too much...

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

Quoted 5 lines
package/libcamera-apps/libcamera-apps.mk new file +5 -0
+else
+LIBCAMERA_APPS_CONF_OPTS += -DENABLE_X11=0
+endif
+
+ifeq ($(BR2_PACKAGE_QT5)$(BR2_PACKAGE_QT5BASE_GUI)$(BR2_PACKAGE_QT5BASE_WIDGETS),yyy) 

[1] so here, GUI and widgets will be enabled when Qt5 is, so checking for them is redundant.

Also:

    # make check-package
    package/libcamera-apps/libcamera-apps.mk:39: line contains trailing whitespace

Applied to master with a buncha fixes for all the above, thanks.

Regards,
Yann E. MORIN.

Quoted 14 lines
package/libcamera-apps/libcamera-apps.mk new file +7 -0
+LIBCAMERA_APPS_CONF_OPTS += -DENABLE_QT=1
+LIBCAMERA_APPS_DEPENDENCIES += qt5base
+else
+LIBCAMERA_APPS_CONF_OPTS += -DENABLE_QT=0
+endif
+
+$(eval $(cmake-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot