From patchwork Wed Jan 25 16:54:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 18645 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3958C27C76 for ; Wed, 25 Jan 2023 16:54:07 +0000 (UTC) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mx.groups.io with SMTP id smtpd.web10.50532.1674665645383394533 for ; Wed, 25 Jan 2023 08:54:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KVdgP/5b; spf=pass (domain: gmail.com, ip: 209.85.216.41, mailfrom: raj.khem@gmail.com) Received: by mail-pj1-f41.google.com with SMTP id n20-20020a17090aab9400b00229ca6a4636so2702603pjq.0 for ; Wed, 25 Jan 2023 08:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MuYyJeYrdMy8DbwqjJwG6E3Bywmyg3kvWolu2qjUJJw=; b=KVdgP/5bavIFk0hXcFIHW8iuEXjfCc43AHkGBC+w3//Xn29272aJTpDykIqNF11a0u m0pZrFNM+w/X+GTghHX4/eAuyVqqp1GVX+nUyaRZXZPVz2FhQiiszUlpINM2w26AwG/N sADp+mfSmbZnZenC1wGbkq7tphkTx+rYVAaO75l+6gdZW/vrvHpDxfFK+uKYZ/0265oB y+lFqM2l4Mc2iUDbOnPhDK8qt8Snp0UFcAJ5oNzNWbPNWoVqj+Dw+8ZSvvROARdH3Y0X 3lduon/MGdhcF1j8m+uERqyadGLgSbhWPPCxI9hMrYCWJPHVHtHn+xonHTnioHL7lcs9 E1lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MuYyJeYrdMy8DbwqjJwG6E3Bywmyg3kvWolu2qjUJJw=; b=KCXy6ucXyuhhf1Zyj6ombYUOy6LZBHG0l+UGMANooUexE3s88lGLPxQ5VERYiPEWVj hCqExbsIZKIZyhf52RxHNDd6trWR7H8pf1xveO4V+xoOMtnA4hoCMP7J80Rt4owcsn07 +H6mauITX1Tq0JFOPEE1jgtXRWb7DFCv588sPCg1OrEZPYDcgkIOICeV915OaPLxdW42 fowdzJt0zeu8Oit4bk3GzQnKVlxOOI8ufW+DsZgQsVI2oTmhrY8ET/7S/2bR5wO2HqKZ LKuSdCblVbIfCEj7nHJ8lHDxrt1bxaReBZnjXg4jS2aW/RapCgay1NrCaj3ZJqZA3LOV Yc2Q== X-Gm-Message-State: AFqh2kpkZEL4c/J0NrCheVS1IaQxFBBBvbKlxt4GJ25SGm74GfoIbYuC xJQ8lu4zPDNiTEdAcE/Yyk3+6COeH/TAKQ== X-Google-Smtp-Source: AMrXdXtq6LZlqfbHSW6Ld0U1xN4Zc/W7EYN03ZUKEGECx8zXKlSy6sjUtpJ/yIcNh0LugdTqQHI1zw== X-Received: by 2002:a17:903:22c9:b0:191:e0b0:f8df with SMTP id y9-20020a17090322c900b00191e0b0f8dfmr44473736plg.58.1674665644125; Wed, 25 Jan 2023 08:54:04 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::aee3]) by smtp.gmail.com with ESMTPSA id x5-20020a1709029a4500b00192a04bc620sm3824023plv.295.2023.01.25.08.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 08:54:03 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-multimedia][PATCH 1/2] libcamera: Fix build with gcc-13 Date: Wed, 25 Jan 2023 08:54:00 -0800 Message-Id: <20230125165401.1151126-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 25 Jan 2023 16:54:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/100778 Signed-off-by: Khem Raj --- ...le_sink.cpp-Avoid-dangling-reference.patch | 46 +++++++++++++++++++ .../libcamera/libcamera_0.0.1.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch b/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch new file mode 100644 index 0000000000..5aa6ee8d3c --- /dev/null +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera/0001-file_sink.cpp-Avoid-dangling-reference.patch @@ -0,0 +1,46 @@ +From 0e97896e6a09957f27125957d00b5150ec90b2e9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 24 Jan 2023 01:18:25 -0800 +Subject: [PATCH] file_sink.cpp: Avoid dangling-reference + +Fixes following errors with gcc-13 + +../git/src/cam/file_sink.cpp:92:45: error: possibly dangling reference to a temporary [-Werror=dangling-reference] + 92 | const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; + | ^~~~ +../git/src/cam/file_sink.cpp:92:81: note: the temporary was destroyed at the end of the full expression '(& buffer->libcamera::FrameBuffer::metadata())->libcamera::FrameMetadata::planes().libcamera::Span::operator[](i)' + 92 | const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; + | ^ +cc1plus: all warnings being treated as errors + +Upstream-Status: Submitted [https://lists.libcamera.org/pipermail/libcamera-devel/2023-January/036575.html] +Signed-off-by: Khem Raj +--- + src/cam/file_sink.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/cam/file_sink.cpp b/src/cam/file_sink.cpp +index 45213d4a..897c4b37 100644 +--- a/src/cam/file_sink.cpp ++++ b/src/cam/file_sink.cpp +@@ -89,13 +89,13 @@ void FileSink::writeBuffer(const Stream *stream, FrameBuffer *buffer) + Image *image = mappedBuffers_[buffer].get(); + + for (unsigned int i = 0; i < buffer->planes().size(); ++i) { +- const FrameMetadata::Plane &meta = buffer->metadata().planes()[i]; ++ unsigned int bytesused = buffer->metadata().planes()[i].bytesused; + + Span data = image->data(i); +- unsigned int length = std::min(meta.bytesused, data.size()); ++ unsigned int length = std::min(bytesused, data.size()); + +- if (meta.bytesused > data.size()) +- std::cerr << "payload size " << meta.bytesused ++ if (bytesused > data.size()) ++ std::cerr << "payload size " << bytesused + << " larger than plane size " << data.size() + << std::endl; + +-- +2.39.1 + diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.1.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.1.bb index 483fe1507e..46f058f2ea 100644 --- a/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.1.bb +++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera_0.0.1.bb @@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "\ SRC_URI = " \ git://git.libcamera.org/libcamera/libcamera.git;protocol=https;branch=master \ + file://0001-file_sink.cpp-Avoid-dangling-reference.patch \ " SRCREV = "a83aed77df1258e469c0eb42d9cb4f1938db53f2" From patchwork Wed Jan 25 16:54:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 18646 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2A59C54E94 for ; Wed, 25 Jan 2023 16:54:07 +0000 (UTC) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mx.groups.io with SMTP id smtpd.web10.50533.1674665645750636552 for ; Wed, 25 Jan 2023 08:54:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=al9ImgSO; spf=pass (domain: gmail.com, ip: 209.85.214.178, mailfrom: raj.khem@gmail.com) Received: by mail-pl1-f178.google.com with SMTP id 5so13123426plo.3 for ; Wed, 25 Jan 2023 08:54:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1vd9m5MKKyjYjmo2GFDYBUtz3Kw5S7RnrTL84E/xGMg=; b=al9ImgSO8clnYvp7vyxUXxIFeuTctSlrlFQVg7tfF1hiy/d7WhpwTeVqn9xxpPifyz ke4A9nYleYFzr8PbxkhwXMx9s0BSs11WpSp+zrr+G/cLAX1tbEnGdKQWDVgGLP1ijrFF rcnTPxWcZBCCSz4+x1POzz4fAhyMy34W/kUYvkgYHfW/MkQXfiHZF7Lts3mo4ncmkhGo vkRGdYDQ8lZi7Gzadnl0odvZoYkza6lvTdePFuWyJD7HR+i1ihahlPENE3XU8Ko6Dm0O UWvu9VYEn2VkqL8zXhVuFiTVkILBeS4pAQXagmcRtr/qFnSkJFkTnjd7vZ6Rd/ZNDVBx iojA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1vd9m5MKKyjYjmo2GFDYBUtz3Kw5S7RnrTL84E/xGMg=; b=YfAMefGEqZlYEUqdf2C7uTlMhlY38cF0IbWTmjipOvnjhLCuqnWj3QgLoluj2W4NKb KpBpvOP9fiJJkJLPQ6WZSm0cQL766SGubK0Anz1GjauQD2K8tQBD041T6PgfWWGsMoMY 0aSusO5H7jGIa9NAwqvT5oB7TGpQYDVHQ1A/zGmtAcAPclkJ2qr/tThJhaXzDjB43KQA rP3Mu/R5r6v66B63wXqfTTS+QM3r1aqVrnir153QiTbpGH0rcJCfv0KzIGS+/o4AQmd/ 8lANAZmQEu/9e7uH0f6umNQ/jegscTqXvsX9gXmpGsXJttqSRsECeGfb640skrdMrY43 P/fw== X-Gm-Message-State: AO0yUKXW3xY+SY7sy73pL3nfm1vJ5cuyiRaz/UsDE/KDSI72do/Y9OQw yM0kiw6ORaw6BlAZT3FusFyboO97JfEExw== X-Google-Smtp-Source: AK7set+pTbISmCiMGq7/OX26+Tqs7yuRg/A4Bk+HUpwj8YnwBU+tHHNNB0AZM3aTsKlY0GwiKfPfZg== X-Received: by 2002:a17:903:1208:b0:196:1425:740c with SMTP id l8-20020a170903120800b001961425740cmr8349299plh.62.1674665644865; Wed, 25 Jan 2023 08:54:04 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9181:1cf0::aee3]) by smtp.gmail.com with ESMTPSA id x5-20020a1709029a4500b00192a04bc620sm3824023plv.295.2023.01.25.08.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 08:54:04 -0800 (PST) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 2/2] mariadb: Fix build with gcc-13 Date: Wed, 25 Jan 2023 08:54:01 -0800 Message-Id: <20230125165401.1151126-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230125165401.1151126-1-raj.khem@gmail.com> References: <20230125165401.1151126-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 25 Jan 2023 16:54:07 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/100779 Signed-off-by: Khem Raj --- meta-oe/recipes-dbs/mysql/mariadb.inc | 1 + ...-missing-includes-cstdint-and-cstdio.patch | 95 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index 4e285aea7e..1a47d91105 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -22,6 +22,7 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ file://cross-compiling.patch \ file://0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \ file://lfs64.patch \ + file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ " SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" SRC_URI[sha256sum] = "ffacf84e74daf249ad64b9573d79a4e882f66b004614f8b33bfcb14a8e25da1d" diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch new file mode 100644 index 0000000000..7c37fef493 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Add-missing-includes-cstdint-and-cstdio.patch @@ -0,0 +1,95 @@ +From 6e376601c990abaa5e261d1311f92acb3b370b8f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 24 Jan 2023 21:40:43 -0800 +Subject: [PATCH] Add missing includes and + +This is needed with GCC 13 and newer [1] + +[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + .../rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h | 1 + + storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h | 1 + + .../rocksdb/rocksdb/table/block_based/data_block_hash_index.h | 1 + + storage/rocksdb/rocksdb/util/slice.cc | 1 + + storage/rocksdb/rocksdb/util/string_util.h | 1 + + tpool/aio_linux.cc | 1 + + 6 files changed, 6 insertions(+) + +diff --git a/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h b/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h +index 963c1d8eb49..73487edd96d 100644 +--- a/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h ++++ b/storage/rocksdb/rocksdb/db/compaction/compaction_iteration_stats.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include + #include "rocksdb/rocksdb_namespace.h" + + struct CompactionIterationStats { +diff --git a/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h b/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h +index c7f93b4cfcd..3c2ab80535a 100644 +--- a/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h ++++ b/storage/rocksdb/rocksdb/include/rocksdb/utilities/checkpoint.h +@@ -8,6 +8,7 @@ + #pragma once + #ifndef ROCKSDB_LITE + ++#include + #include + #include + #include "rocksdb/status.h" +diff --git a/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h b/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h +index f356395f329..3215221755d 100644 +--- a/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h ++++ b/storage/rocksdb/rocksdb/table/block_based/data_block_hash_index.h +@@ -5,6 +5,7 @@ + + #pragma once + ++#include + #include + #include + +diff --git a/storage/rocksdb/rocksdb/util/slice.cc b/storage/rocksdb/rocksdb/util/slice.cc +index 6db11cc947a..c26b6a21a57 100644 +--- a/storage/rocksdb/rocksdb/util/slice.cc ++++ b/storage/rocksdb/rocksdb/util/slice.cc +@@ -8,6 +8,7 @@ + // found in the LICENSE file. See the AUTHORS file for names of contributors. + + #include ++#include + #include "rocksdb/slice_transform.h" + #include "rocksdb/slice.h" + #include "util/string_util.h" +diff --git a/storage/rocksdb/rocksdb/util/string_util.h b/storage/rocksdb/rocksdb/util/string_util.h +index a761be66c52..064d059f08f 100644 +--- a/storage/rocksdb/rocksdb/util/string_util.h ++++ b/storage/rocksdb/rocksdb/util/string_util.h +@@ -6,6 +6,7 @@ + + #pragma once + ++#include + #include + #include + #include +diff --git a/tpool/aio_linux.cc b/tpool/aio_linux.cc +index 10234e0e46a..a6adf1af257 100644 +--- a/tpool/aio_linux.cc ++++ b/tpool/aio_linux.cc +@@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/ + + # include + # include ++# include + # include + # include + +-- +2.39.1 +