From patchwork Mon May 27 17:40:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20104 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 70AF8C32C8 for ; Mon, 27 May 2024 17:40:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BC1D3634B5; Mon, 27 May 2024 19:40:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sG5qagaZ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E4DF2634AF for ; Mon, 27 May 2024 19:40:28 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 859371586 for ; Mon, 27 May 2024 19:40:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1716831626; bh=yswmm/DhaPODHu6Lm+Qqc6hOwyCqzULSSfXBlfedK+A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=sG5qagaZVcJVjSdZ3Xac7173Df74rOqRrpx5FtbvY/xes50fEQAAvkpKvpp2jsC0u n/1pHW/VCMh57Cs5X5mUgVd4GQZWzKQWaEEVtlXmihnOBuv/DIcFegFQnZ4zt2v851 9Lkpsg61D2pGIZaxbKYdAVS0oQ/y+A3b2BfsnAss= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [CI] [PATCH 1/2] Enable compilation of the Android camera HAL Date: Mon, 27 May 2024 20:40:15 +0300 Message-ID: <20240527174016.11415-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.1 In-Reply-To: <20240527174016.11415-1-laurent.pinchart@ideasonboard.com> References: <20240527174016.11415-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Expend compilation test coverage by enabling the Android camera HAL in test builds. This requires adding the cmake package to the container images, as it is needed to build the libyuv subproject. Debian buster ships a too old cmake version, so disable the Android HAL compilation there. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- .gitlab-ci/setup-container.sh | 1 + gitlab-ci.yml | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh index 6f75c3209eb7..fc3c0568bf7c 100755 --- a/.gitlab-ci/setup-container.sh +++ b/.gitlab-ci/setup-container.sh @@ -34,6 +34,7 @@ PKGS_LIBCAMERA_CBUILD=( PKGS_LIBCAMERA_RUNTIME=( clang clang-format + cmake doxygen g++ ghostscript diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 60e52deac520..465931a761fc 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -12,6 +12,7 @@ variables: GIT_DEPTH: 1 KERNEL_VERSION: '6.6' MESON_ALL_OPTIONS: >- + -D android=enabled -D cam=enabled -D documentation=enabled -D gstreamer=enabled @@ -58,17 +59,17 @@ include: .libcamera-ci.debian:11: variables: FDO_DISTRIBUTION_VERSION: 'bullseye' - FDO_DISTRIBUTION_TAG: '2024-05-07.1' + FDO_DISTRIBUTION_TAG: '2024-05-27.0' .libcamera-ci.debian:12: variables: FDO_DISTRIBUTION_VERSION: 'bookworm' - FDO_DISTRIBUTION_TAG: '2024-04-18.0' + FDO_DISTRIBUTION_TAG: '2024-05-27.0' .libcamera-ci.debian:13: variables: FDO_DISTRIBUTION_VERSION: 'trixie' - FDO_DISTRIBUTION_TAG: '2024-04-18.0' + FDO_DISTRIBUTION_TAG: '2024-05-27.0' .container-debian: extends: @@ -159,6 +160,9 @@ build-full:debian:10: ARCH: amd64 CC: gcc-8 CXX: g++-8 + MESON_OPTIONS: >- + ${MESON_ALL_OPTIONS} + -D android=disabled build-full:debian:11: extends: From patchwork Mon May 27 17:40:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20105 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E47B5BDE6B for ; Mon, 27 May 2024 17:40:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 89750634AF; Mon, 27 May 2024 19:40:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="piCFruGR"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 24986634AF for ; Mon, 27 May 2024 19:40:30 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CEC801586 for ; Mon, 27 May 2024 19:40:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1716831628; bh=5+B0kvQKsWVlfQTrMuMrCLbYg1P/Az1s5cdCKKaMBOU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=piCFruGRbcYbK9CX+qNOw+lFVsggoOCYn+Hiy3LaCxNpR6d6plHDg7QHMjGr8c4iQ rg4zWcdkB364KPWY8Erfax0X+EjdgTfm4xSTTQzP6G/f/HblKmkHIlp87sUz5iVDqh 0uVA112U0gUvZp5pj8dcCUGlh5v2I78GHmA5zu/E= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [CI] [PATCH 2/2] Add compilation test with gcc 14 Date: Mon, 27 May 2024 20:40:16 +0300 Message-ID: <20240527174016.11415-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.1 In-Reply-To: <20240527174016.11415-1-laurent.pinchart@ideasonboard.com> References: <20240527174016.11415-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Compile with gcc 14 on Debian trixie. Compiling with C++20 would trigger the following warning, introduced in gcc 14: ../src/libcamera/base/log.cpp: In member function ‘void libcamera::Logger::write(const libcamera::LogMessage&)’: ../src/libcamera/base/log.cpp:468:61: error: ‘std::shared_ptr<_Tp> std::atomic_load(const shared_ptr<_Tp>*) [with _Tp = libcamera::LogOutput]’ is deprecated: use 'std::atomic>' instead [-Werror=deprecated-declarations] 468 | std::shared_ptr output = std::atomic_load(&output_); | ~~~~~~~~~~~~~~~~^~~~~~~~~~ In file included from /usr/include/c++/14/memory:81, from ../include/libcamera/base/class.h:10, from ../include/libcamera/base/log.h:15, from ../src/libcamera/base/log.cpp:8: /usr/include/c++/14/bits/shared_ptr_atomic.h:142:5: note: declared here 142 | atomic_load(const shared_ptr<_Tp>* __p) | ^~~~~~~~~~~ As std::atomic> got introduced in C++20, we can't use it while remaining compatible with C++17. Disabling the -Werror=deprecated-declarations option would prevent other deprecated declarations from being noticed, so it's not a good solution either. To work around the problem, use C++17 when compiling with gcc 14. gcc 13 still gives us decent test coverage of C++20 compilation. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- .gitlab-ci/setup-container.sh | 12 +++++++++--- gitlab-ci.yml | 20 ++++++++++++-------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci/setup-container.sh b/.gitlab-ci/setup-container.sh index fc3c0568bf7c..93a9f9cc91e8 100755 --- a/.gitlab-ci/setup-container.sh +++ b/.gitlab-ci/setup-container.sh @@ -93,10 +93,16 @@ archs=( amd64 ) declare -A components -# On Debian bullseye, install gcc 9 in addition to the default gcc 10. -if [[ $FDO_DISTRIBUTION_VERSION == 'bullseye' ]] ; then +# Install additional gcc versions On Debian bullseye (gcc 9) and trixie (gcc +# 14). +case $FDO_DISTRIBUTION_VERSION in +'bullseye') PKGS_LIBCAMERA_RUNTIME+=( g++-9 ) -fi + ;; +'trixie') + PKGS_LIBCAMERA_RUNTIME+=( g++-14 ) + ;; +esac # We use Debian bookworm containers to produce ARM binaries and run unit tests # with virtme, and other Debian versions for compilation-testing on amd64 only. diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 465931a761fc..50b81e591458 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -69,7 +69,7 @@ include: .libcamera-ci.debian:13: variables: FDO_DISTRIBUTION_VERSION: 'trixie' - FDO_DISTRIBUTION_TAG: '2024-05-27.0' + FDO_DISTRIBUTION_TAG: '2024-05-27.1' .container-debian: extends: @@ -219,13 +219,17 @@ build-full:debian:13: needs: - job: container-debian:13 artifacts: false - variables: - ARCH: amd64 - CC: gcc-13 - CXX: g++-13 - MESON_OPTIONS: >- - ${MESON_ALL_OPTIONS} - -D cpp_std=c++20 + parallel: + matrix: + - ARCH: amd64 + CC: gcc-13 + CXX: g++-13 + MESON_OPTIONS: >- + ${MESON_ALL_OPTIONS} + -D cpp_std=c++20 + - ARCH: amd64 + CC: gcc-14 + CXX: g++-14 # Build each commit in the branch individually to detect compilation breakages. build-history: