From patchwork Wed Sep 24 12:07:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 70914 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 6A0C3CAC5B0 for ; Wed, 24 Sep 2025 12:07:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10832.1758715670454630692 for ; Wed, 24 Sep 2025 05:07:50 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B5C2B497 for ; Wed, 24 Sep 2025 05:07:41 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7AD553F66E for ; Wed, 24 Sep 2025 05:07:49 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/5] lame: don't use -march=native when building with clang Date: Wed, 24 Sep 2025 13:07:35 +0100 Message-ID: <20250924120745.2883969-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 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, 24 Sep 2025 12:07:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/223962 Because of a logic error, lame's configure always passes -march=native when building with clang. This is a terrible idea in general as it's not often your build machine and target hardware aligns, and leads to some amusing errors: unknown target CPU 'neoverse-n1' note: valid target CPU values are: i386, i486, ... Move the HAVE_CLANG block up into the FULL_OPTIMIZATION case, alongside HAVE_GCC. This option is never enabled (as it's basically "use native") so resolves the build failure. Signed-off-by: Ross Burton --- meta/recipes-multimedia/lame/lame/clang.patch | 99 +++++++++++++++++++ meta/recipes-multimedia/lame/lame_3.100.bb | 1 + 2 files changed, 100 insertions(+) create mode 100644 meta/recipes-multimedia/lame/lame/clang.patch diff --git a/meta/recipes-multimedia/lame/lame/clang.patch b/meta/recipes-multimedia/lame/lame/clang.patch new file mode 100644 index 00000000000..116000c577b --- /dev/null +++ b/meta/recipes-multimedia/lame/lame/clang.patch @@ -0,0 +1,99 @@ +Don't use -march=native when building with clang + +Because of a logic error, lame's configure always passes -march=native +when building with clang. + +This is a terrible idea in general as it's not often your build machine +and target hardware aligns, and leads to some amusing errors: + + unknown target CPU 'neoverse-n1' + note: valid target CPU values are: i386, i486, ... + +Move the HAVE_CLANG block up into the FULL_OPTIMIZATION case, alongside +HAVE_GCC. This option is never enabled (as it's basically "use native") +so resolves the build failure. + +Upstream-Status: Pending +Signed-off-by: Ross Burton + +diff --git i/configure.in w/configure.in +index 5e43179..d51b017 100644 +--- i/configure.in ++++ w/configure.in +@@ -960,45 +960,43 @@ if test "x$HAVE_GCC" = "xyes" -o "x$HAVE_CLANG" = "xyes"; then + ;; + esac + fi ++ ++ if test "x${HAVE_CLANG}" = "xyes"; then ++ case "${CLANG_VERSION}" in ++ 3.[89]*|[45].*) ++ OPTIMIZATION="-Ofast" ++ ;; ++ *) ++ OPTIMIZATION="-O3" ++ ;; ++ esac ++ ++ # generic CPU specific options ++ case ${host_cpu} in ++ *486) ++ OPTIMIZATION="${OPTIMIZATION} -march=i486" ++ ;; ++ *586) ++ OPTIMIZATION="${OPTIMIZATION} -march=i586 \ ++ -mtune=native" ++ ;; ++ *686) ++ OPTIMIZATION="${OPTIMIZATION} -march=i686 \ ++ -mtune=native" ++ ;; ++ *86) ++ OPTIMIZATION="${OPTIMIZATION} -march=native \ ++ -mtune=native" ++ ;; ++ esac ++ ++ fi + ;; + *) + AC_MSG_ERROR(bad value �${CONFIG_EXPOPT}� for expopt option) + ;; + esac + +- +- if test "x${HAVE_CLANG}" = "xyes"; then +- case "${CLANG_VERSION}" in +- 3.[89]*|[45].*) +- OPTIMIZATION="-Ofast" +- ;; +- *) +- OPTIMIZATION="-O3" +- ;; +- esac +- +- # generic CPU specific options +- case ${host_cpu} in +- *486) +- OPTIMIZATION="${OPTIMIZATION} -march=i486" +- ;; +- *586) +- OPTIMIZATION="${OPTIMIZATION} -march=i586 \ +- -mtune=native" +- ;; +- *686) +- OPTIMIZATION="${OPTIMIZATION} -march=i686 \ +- -mtune=native" +- ;; +- *86) +- OPTIMIZATION="${OPTIMIZATION} -march=native \ +- -mtune=native" +- ;; +- esac +- +- fi +- +- + if test "${expopt_msg_result_printed}" = "no" ; then + AC_MSG_RESULT(${CONFIG_EXPOPT}) + fi diff --git a/meta/recipes-multimedia/lame/lame_3.100.bb b/meta/recipes-multimedia/lame/lame_3.100.bb index efaf3b9817a..42689df3511 100644 --- a/meta/recipes-multimedia/lame/lame_3.100.bb +++ b/meta/recipes-multimedia/lame/lame_3.100.bb @@ -12,6 +12,7 @@ DEPENDS = "ncurses gettext-native" SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \ file://no-gtk1.patch \ + file://clang.patch \ " SRC_URI[sha256sum] = "ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e" From patchwork Wed Sep 24 12:07:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 70913 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 69597CAC5A5 for ; Wed, 24 Sep 2025 12:07:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10833.1758715671005365023 for ; Wed, 24 Sep 2025 05:07:51 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5963D106F for ; Wed, 24 Sep 2025 05:07:42 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 22A733F66E for ; Wed, 24 Sep 2025 05:07:50 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/5] vte: skip gobject-introspection with clang on armv7 Date: Wed, 24 Sep 2025 13:07:36 +0100 Message-ID: <20250924120745.2883969-2-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250924120745.2883969-1-ross.burton@arm.com> References: <20250924120745.2883969-1-ross.burton@arm.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, 24 Sep 2025 12:07:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/223963 For some as yet unknown reason, vte on armv7 (specifically, the qemuarm and beaglebone-yocto machines at least) will fail during G-I code generation (which runs the target binaries inside qemu-user): Bail out! VTE:ERROR:../sources/vte-0.80.3/src/vtegtk.cc:158:void style_provider_parsing_error_cb(GtkCssProvider *, void *, GError *): assertion failed (error == NULL): Expected an identifier (gtk-css-parser-error-quark, 1) qemu: uncaught target signal 6 (Aborted) - core dumped Until this can be root-caused, we can disable G-I for this edge case. Signed-off-by: Ross Burton --- meta/recipes-support/vte/vte_0.80.3.bb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meta/recipes-support/vte/vte_0.80.3.bb b/meta/recipes-support/vte/vte_0.80.3.bb index 1eb95dd8274..93aa8640133 100644 --- a/meta/recipes-support/vte/vte_0.80.3.bb +++ b/meta/recipes-support/vte/vte_0.80.3.bb @@ -55,3 +55,9 @@ FILES:${PN}-prompt = " \ " FILES:${PN}-dev += "${datadir}/glade/" + +# Causes failures at build time on eg qemuarm; +# Bail out! VTE:ERROR:../sources/vte-0.80.3/src/vtegtk.cc:158:void style_provider_parsing_error_cb(GtkCssProvider *, void *, GError *): assertion failed (error == NULL): Expected an identifier (gtk-css-parser-error-quark, 1) +# qemu: uncaught target signal 6 (Aborted) - core dumped +# https://gitlab.gnome.org/GNOME/vte/-/issues/2910 +GI_DATA_ENABLED:toolchain-clang:arm = "False" From patchwork Wed Sep 24 12:07:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 70916 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 7CC5CCAC5B5 for ; Wed, 24 Sep 2025 12:07:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10834.1758715671598047520 for ; Wed, 24 Sep 2025 05:07:51 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0C79E497 for ; Wed, 24 Sep 2025 05:07:43 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BE6BD3F66E for ; Wed, 24 Sep 2025 05:07:50 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/5] classes/cmake: CMAKE_RANLIB needs to be a filename without arguments Date: Wed, 24 Sep 2025 13:07:37 +0100 Message-ID: <20250924120745.2883969-3-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250924120745.2883969-1-ross.burton@arm.com> References: <20250924120745.2883969-1-ross.burton@arm.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, 24 Sep 2025 12:07:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/223964 CMAKE_RANLIB is the path to the binary without any arguments. However, gcc-native.bbclass sets BUILD_RANLIB to "ranlib -D" which means that CMake looks for a binary called "ranlib;-D". This is expected behaviour upstream[1] and as there's no variable for "ranlib flags", we should just set CMAKE_RANLIB to the first element of the list. [1] https://gitlab.kitware.com/cmake/cmake/-/issues/23554 Signed-off-by: Ross Burton --- meta/classes-recipe/cmake.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/cmake.bbclass b/meta/classes-recipe/cmake.bbclass index 1488d744d40..0dc8ea143b2 100644 --- a/meta/classes-recipe/cmake.bbclass +++ b/meta/classes-recipe/cmake.bbclass @@ -56,7 +56,7 @@ OECMAKE_NATIVE_C_COMPILER_LAUNCHER ?= "${@oecmake_map_compiler('BUILD_CC', d)[1] OECMAKE_NATIVE_CXX_COMPILER ?= "${@oecmake_map_compiler('BUILD_CXX', d)[0]}" OECMAKE_NATIVE_CXX_COMPILER_LAUNCHER ?= "${@oecmake_map_compiler('BUILD_CXX', d)[1]}" OECMAKE_NATIVE_AR ?= "${BUILD_AR}" -OECMAKE_NATIVE_RANLIB ?= "${BUILD_RANLIB}" +OECMAKE_NATIVE_RANLIB ?= "${@d.getVar('BUILD_RANLIB').split()[0]}" OECMAKE_NATIVE_NM ?= "${BUILD_NM}" # Native compiler flags From patchwork Wed Sep 24 12:07:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 70915 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 8812CCAC5B6 for ; Wed, 24 Sep 2025 12:07:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.10913.1758715672309540775 for ; Wed, 24 Sep 2025 05:07:52 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AED80497 for ; Wed, 24 Sep 2025 05:07:43 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6ECD53F66E for ; Wed, 24 Sep 2025 05:07:51 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 4/5] classes/cmake: set CMAKE_CROSSCOMPILING explicitly Date: Wed, 24 Sep 2025 13:07:38 +0100 Message-ID: <20250924120745.2883969-4-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250924120745.2883969-1-ross.burton@arm.com> References: <20250924120745.2883969-1-ross.burton@arm.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, 24 Sep 2025 12:07:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/223965 Let's be explicit and ensure that CMAKE_CROSSCOMPILING is explicitly set to true when we're cross-compiling. Signed-off-by: Ross Burton --- meta/classes-recipe/cmake.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes-recipe/cmake.bbclass b/meta/classes-recipe/cmake.bbclass index 0dc8ea143b2..b8cd622c2df 100644 --- a/meta/classes-recipe/cmake.bbclass +++ b/meta/classes-recipe/cmake.bbclass @@ -122,6 +122,7 @@ cmake_do_generate_toolchain_file() { if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then cmake_crosscompiling="set( CMAKE_CROSSCOMPILING FALSE )" else + cmake_crosscompiling="set( CMAKE_CROSSCOMPILING TRUE )" cmake_sysroot="set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" fi From patchwork Wed Sep 24 12:07:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 70917 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 698F3CAC5B3 for ; Wed, 24 Sep 2025 12:07:57 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10835.1758715673029197184 for ; Wed, 24 Sep 2025 05:07:53 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 62D77497 for ; Wed, 24 Sep 2025 05:07:44 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1FE1F3F66E for ; Wed, 24 Sep 2025 05:07:52 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 5/5] classes/cython: also process .cpp files Date: Wed, 24 Sep 2025 13:07:39 +0100 Message-ID: <20250924120745.2883969-5-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250924120745.2883969-1-ross.burton@arm.com> References: <20250924120745.2883969-1-ross.burton@arm.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, 24 Sep 2025 12:07:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/223966 Some Python packages, such as python3-frozenlist, generate .cpp files with cython so we should also process those. Frustratingly this doesn't actually solve the reproducible problem with frozenlist as the path is a temporary directory... Signed-off-by: Ross Burton --- meta/classes-recipe/cython.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/cython.bbclass b/meta/classes-recipe/cython.bbclass index dd9fc732bcb..9ae7a291345 100644 --- a/meta/classes-recipe/cython.bbclass +++ b/meta/classes-recipe/cython.bbclass @@ -4,5 +4,5 @@ do_compile[postfuncs] = "strip_cython_metadata" strip_cython_metadata() { # Remove the Cython Metadata headers that we don't need after the build, and # may contain build paths. - find ${S} -name "*.c" -print0 | xargs --no-run-if-empty --null sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d" + find ${S} \( -name "*.c" -o -name "*.cpp" \) -print0 | xargs --no-run-if-empty --null sed -i -e "/BEGIN: Cython Metadata/,/END: Cython Metadata/d" }