Skip to contentSkip to conversation

protobuf: Upgrade to 3.19.1

PATCH In review Khem Raj 2 participants 5 messages Nov 1, 2021 1 message not in the archive

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 protobuf: Upgrade to 3.19.1

Release details [1]
[1] https://github.com/protocolbuffers/protobuf/releases/tag/v3.19.1

---
 .../protobuf/{protobuf_3.19.0.bb => protobuf_3.19.1.bb}         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-oe/recipes-devtools/protobuf/{protobuf_3.19.0.bb => protobuf_3.19.1.bb} (98%)
meta-oe/recipes-devtools/protobuf/protobuf_3.19.1.bb renamed from meta-oe/recipes-devtools/protobuf/protobuf_3.19.0.bb +1 -1
similarity index 98%
rename from meta-oe/recipes-devtools/protobuf/protobuf_3.19.0.bb
rename to meta-oe/recipes-devtools/protobuf/protobuf_3.19.1.bb
index 94e8695af4..9b8c396045 100644
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b"
 DEPENDS = "zlib"
 DEPENDS:append:class-target = " protobuf-native"
 
-SRCREV = "17b30e96476be70b8773b2b807bab857fd3ceb39"
+SRCREV = "7c40b2df1fdf6f414c1c18c789715a9c948a0725"
 
 SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=3.19.x \
            file://run-ptest \
Signature · 1 line
2.33.1
author
#1 lore raw

PATCH 2/4 protobuf: Disable tailcall on mips/clang

Clang13 crashes and lets workaround it for now

---
 .../0001-Fix-build-on-mips-clang.patch        | 32 +++++++++++++++++++
 .../protobuf/protobuf_3.19.1.bb               |  3 ++
 2 files changed, 35 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch
meta-oe/recipes-devtools/protobuf/protobuf/0001-Fix-build-on-mips-clang.patch new file +32 -0
new file mode 100644
index 0000000000..8a0696edfe
@@ -0,0 +1,32 @@
+From 08e46feb6553af670754e65d94c3bb6fcd4e0cf9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 31 Oct 2021 23:39:44 -0700
+Subject: [PATCH] Fix build on mips/clang
+
+clang13 crashes on mips, until its fixed upstream disable tailcall on
+mips
+
+https://bugs.llvm.org/show_bug.cgi?id=52367
+
+Upstream-Status: Inappropriate [Clang workaround]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/google/protobuf/port_def.inc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
+index 71325c387..303475232 100644
+--- a/src/google/protobuf/port_def.inc
++++ b/src/google/protobuf/port_def.inc
+@@ -230,7 +230,7 @@
+ #error PROTOBUF_TAILCALL was previously defined
+ #endif
+ #if __has_cpp_attribute(clang::musttail) && \
+-  !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__)
++  !defined(__arm__) && !defined(_ARCH_PPC) && !defined(__wasm__) && !defined(__mips__)
+ #  ifndef PROTO2_OPENSOURCE
+ // Compilation fails on ARM32: b/195943306
+ // Compilation fails on powerpc64le: b/187985113
+-- 
+2.33.1
+
meta-oe/recipes-devtools/protobuf/protobuf_3.19.1.bb +3 -0
index 9b8c396045..93daa1804e 100644
@@ -19,6 +19,9 @@ SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=3.19.x \
            file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \
            file://0001-Fix-linking-error-with-ld-gold.patch \
            "
+SRC_URI:append:mips:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch "
+SRC_URI:append:mipsel:toolchain-clang = " file://0001-Fix-build-on-mips-clang.patch "
+
 S = "${WORKDIR}/git"
 
 inherit autotools-brokensep pkgconfig ptest
Signature · 1 line
2.33.1
author
#2 lore raw

PATCH 4/4 gjs: Exclude from builds for now

In reply to Khem Raj

It needs forward porting to mozjs91+ until its done it is not buildable

---
 meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb +2 -0
index d5f10ff3f5..4942bfcbb1 100644
@@ -32,3 +32,5 @@ RDEPENDS:${PN}-valgrind += "valgrind"
 # Valgrind not yet available on rv32/rv64
 RDEPENDS:${PN}-valgrind:remove:riscv32 = "valgrind"
 RDEPENDS:${PN}-valgrind:remove:riscv64 = "valgrind"
+
+PNBLACKLIST[gjs] ?= "Needs porting to mozjs91+"
Signature · 1 line
2.33.1
#3 lore raw

Re: [oe] [meta-gnome][PATCH 4/4] gjs: Exclude from builds for now

Same give me few hours to test...

Quoted 30 lines · Khem Raj

It needs forward porting to mozjs91+ until its done it is not buildable

---
 meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb +2 -1
index d5f10ff3f5..4942bfcbb1 100644
@@ -32,3 +32,5 @@ RDEPENDS:${PN}-valgrind += "valgrind"
 # Valgrind not yet available on rv32/rv64
 RDEPENDS:${PN}-valgrind:remove:riscv32 = "valgrind"
 RDEPENDS:${PN}-valgrind:remove:riscv64 = "valgrind"
+
+PNBLACKLIST[gjs] ?= "Needs porting to mozjs91+"
--

2.33.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93691): https://lists.openembedded.org/g/openembedded-devel/message/93691
Mute This Topic: https://lists.openembedded.org/mt/86734008/3617609
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Re: [oe] [meta-gnome][PATCH 3/4] gjs: Upgrade to 1.70.0 + mozjs-91 branch

Please don't add this but wait few hours: Have mozjzs-78 and stable gjs. [1] It tool me a while to get mozjs-78/gjs build on all arches (yes I mean it: all qemu machines oe-core offers).

Hope I am in the final test-iteration and can send out today...

[1] https://github.com/schnitzeltony/meta-openembedded/tree/de-rotten-meta-gnome-part-I

Cheers,

Andreas

Quoted 293 lines · Khem Raj

This is an attempt to fix the build, its needs some more work though

---
 .../gjs/gjs/0001-Disable-tests-on-host.patch  | 33 --------
 ...id-g_once_init_enter-error-in-GCC-11.patch | 77 -------------------
 .../0001-meson-Disable-runtime-checks.patch   | 48 ++++++++++++
 meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb    | 42 ----------
 meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb    | 34 ++++++++
 5 files changed, 82 insertions(+), 152 deletions(-)
 delete mode 100644 meta-gnome/recipes-gnome/gjs/gjs/0001-Disable-tests-on-host.patch
 delete mode 100644 meta-gnome/recipes-gnome/gjs/gjs/0001-maint-Avoid-g_once_init_enter-error-in-GCC-11.patch
 create mode 100644 meta-gnome/recipes-gnome/gjs/gjs/0001-meson-Disable-runtime-checks.patch
 delete mode 100644 meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb
 create mode 100644 meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb
meta-gnome/recipes-gnome/gjs/gjs/0001-Disable-tests-on-host.patch deleted +0 -33
deleted file mode 100644
index 0953214fbf..0000000000
@@ -1,33 +0,0 @@
-From 95379de2132786f855e8caec1fd5869225774d02 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>
-Date: Sat, 18 May 2019 01:14:07 +0200
-Subject: [PATCH] Disable tests on host
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Upstream-Status: Inappropriate [OE-specific]
-
-Signed-off-by: Andreas Müller <[email protected]>
----
- configure.ac | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index fa4e136..056e96e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -335,9 +335,7 @@ AS_IF([test "x$with_dbus_tests" != "xno"], [
- ])
- AM_CONDITIONAL([DBUS_TESTS], [test "x$with_dbus_tests" != "xno"])
-
--AC_MSG_CHECKING([for a suitable UTF-8 locale to run the tests in])
--TESTS_LOCALE=$($srcdir/build/choose-tests-locale.sh)
--AC_MSG_RESULT([$TESTS_LOCALE])
-+TESTS_LOCALE=C
- AC_SUBST([TESTS_LOCALE])
-
- AC_SUBST([gjsjsdir], [\${datadir}/gjs-1.0])
---
-2.20.1
-
meta-gnome/recipes-gnome/gjs/gjs/0001-maint-Avoid-g_once_init_enter-error-in-GCC-11.patch deleted +0 -77
deleted file mode 100644
index 6343a24a2d..0000000000
@@ -1,77 +0,0 @@
-From dae0055be61937fe70252f3f4ee09b355aba2b8f Mon Sep 17 00:00:00 2001
-From: Philip Chimento <[email protected]>
-Date: Sun, 14 Feb 2021 12:20:09 -0800
-Subject: [PATCH] maint: Avoid g_once_init_enter error in GCC 11
-
-On platforms where g_once_init_enter() is defined to use C11 atomic
-builtins, passing a pointer to a volatile value is an error in GCC 11 and
-later, in C++.
-
-More info about the GCC change:
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95378
-https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548283.html
-
-However, it's my understanding that in modern C++ there is no longer a
-need to guard the initialization of these variables. Since C++11, static
-local variables in a function are guaranteed to be initialized only once,
-the first time control passes through that function. So we can just remove
-the g_once_init_enter guard.
-
-More info:
-https://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables
-
-Stack Overflow answers with quotations from the C++ standard:
-https://stackoverflow.com/a/58804/172999
-https://stackoverflow.com/a/8102145/172999
-
-Closes: #376
----
- gjs/error-types.cpp | 32 +++++++++++++-------------------
- 1 file changed, 13 insertions(+), 19 deletions(-)
-
-Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/gjs/-/commit/f02eaf3a9d3465915eb849428c2d9615e2184a4c]
-diff --git a/gjs/error-types.cpp b/gjs/error-types.cpp
-index 86cb878..5eba61b 100644
---- a/gjs/error-types.cpp
-+++ b/gjs/error-types.cpp
-@@ -31,24 +31,18 @@ G_DEFINE_QUARK(gjs-js-error-quark, gjs_js_error)
- // clang-format on
-
- GType gjs_js_error_get_type(void) {
--    static volatile GType g_type_id;
--
--    if (g_once_init_enter(&g_type_id)) {
--        static GEnumValue errors[] = {
--            { GJS_JS_ERROR_ERROR, "Error", "error" },
--            { GJS_JS_ERROR_EVAL_ERROR, "EvalError", "eval-error" },
--            { GJS_JS_ERROR_INTERNAL_ERROR, "InternalError", "internal-error" },
--            { GJS_JS_ERROR_RANGE_ERROR, "RangeError", "range-error" },
--            { GJS_JS_ERROR_REFERENCE_ERROR, "ReferenceError", "reference-error" },
--            { GJS_JS_ERROR_STOP_ITERATION, "StopIteration", "stop-iteration" },
--            { GJS_JS_ERROR_SYNTAX_ERROR, "SyntaxError", "syntax-error" },
--            { GJS_JS_ERROR_TYPE_ERROR, "TypeError", "type-error" },
--            { GJS_JS_ERROR_URI_ERROR, "URIError", "uri-error" },
--            { 0, nullptr, nullptr }
--        };
--
--        g_type_id = g_enum_register_static("GjsJSError", errors);
--    }
--
-+    static const GEnumValue errors[] = {
-+        {GJS_JS_ERROR_ERROR, "Error", "error"},
-+        {GJS_JS_ERROR_EVAL_ERROR, "EvalError", "eval-error"},
-+        {GJS_JS_ERROR_INTERNAL_ERROR, "InternalError", "internal-error"},
-+        {GJS_JS_ERROR_RANGE_ERROR, "RangeError", "range-error"},
-+        {GJS_JS_ERROR_REFERENCE_ERROR, "ReferenceError", "reference-error"},
-+        {GJS_JS_ERROR_STOP_ITERATION, "StopIteration", "stop-iteration"},
-+        {GJS_JS_ERROR_SYNTAX_ERROR, "SyntaxError", "syntax-error"},
-+        {GJS_JS_ERROR_TYPE_ERROR, "TypeError", "type-error"},
-+        {GJS_JS_ERROR_URI_ERROR, "URIError", "uri-error"},
-+        {0, nullptr, nullptr}};
-+    // Initialization of static local variable guaranteed only once in C++11
-+    static GType g_type_id = g_enum_register_static("GjsJSError", errors);
-     return g_type_id;
- }
---
-2.31.1
-
meta-gnome/recipes-gnome/gjs/gjs/0001-meson-Disable-runtime-checks.patch new file +48 -0
new file mode 100644
index 0000000000..da5a990326
@@ -0,0 +1,48 @@
+From 399ad6ab6d5234199e17df2a16509549943646ce Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 20 Oct 2021 20:31:55 -0700
+Subject: [PATCH] meson: Disable runtime checks
+
+Wont work in cross compile case
+
+Upstream-Status: Inappropriate [Cross-compile specific]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ meson.build | 21 ---------------------
+ 1 file changed, 21 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index b8112c16..37c6fdd4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -252,27 +252,6 @@ release builds of SpiderMonkey. Try configuring SpiderMonkey with
+ --disable-debug.''')
+ endif
+
+-# Check if a minimal SpiderMonkey program compiles, links, and runs. If not,
+-# it's most likely the case that SpiderMonkey was configured incorrectly, for
+-# example by building mozglue as a shared library.
+-minimal_program = cxx.run('''
+-#include <js/Initialization.h>
+-int main(void) {
+-    if (!JS_Init()) return 1;
+-    JS_ShutDown();
+-    return 0;
+-}
+-''',
+-    args: debug_arg, dependencies: spidermonkey,
+-    name: 'SpiderMonkey sanity check')
+-
+-if not minimal_program.compiled() or minimal_program.returncode() != 0
+-    error('''A minimal SpiderMonkey program
+-could not be compiled, linked, or run. Most likely you should build it with a
+-different configuration. Check the recommended configuration:
+-https://github.com/spidermonkey-embedders/spidermonkey-embedding-examples/blob/esr91/docs/Building%20SpiderMonkey.md''')
+-endif
+-
+ have_printf_alternative_int = cc.compiles('''
+ #include <stdio.h>
+ int main(void) {
+--
+2.33.1
+
meta-gnome/recipes-gnome/gjs/gjs_1.58.8.bb deleted +0 -42
deleted file mode 100644
index 096e277bb4..0000000000
@@ -1,42 +0,0 @@
-SUMMARY = "Javascript bindings for GNOME"
-LICENSE = "MIT & LGPLv2+"
-LIC_FILES_CHKSUM = " \
-    file://COPYING;md5=beb29cf17fabe736f0639b09ee6e76fa \
-    file://COPYING.LGPL;md5=3bf50002aefd002f49e7bb854063f7e7 \
-"
-
-GNOMEBASEBUILDCLASS = "autotools"
-
-DEPENDS = "mozjs gtk+3"
-
-inherit gnomebase gsettings gobject-introspection vala gettext features_check upstream-version-is-even pkgconfig
-
-SRC_URI[archive.sha256sum] = "7fb3eb746c17363d9ee47f4a5d0bb048f0075611763eb0da11d85e0e57aff381"
-SRC_URI += "file://0001-Disable-tests-on-host.patch \
-            file://0001-maint-Avoid-g_once_init_enter-error-in-GCC-11.patch \
-"
-
-# gobject-introspection is mandatory and cannot be configured
-REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
-UNKNOWN_CONFIGURE_WHITELIST:append = " --enable-introspection --disable-introspection"
-
-EXTRA_OECONF = " \
-    --without-dbus-tests \
-    --disable-installed-tests \
-"
-
-do_configure:prepend() {
-    # make configure find gobject-introspection test code. Although we set
-    # --disable-installed-tests gjs builds them
-    sed -i 's|:$GI_DATADIR|:${STAGING_DIR_NATIVE}$GI_DATADIR|g' ${S}/configure.ac
-}
-
-FILES:${PN} += "${datadir}/gjs-1.0/lsan"
-
-PACKAGES =+ "${PN}-valgrind"
-FILES:${PN}-valgrind = "${datadir}/gjs-1.0/valgrind"
-RDEPENDS:${PN}-valgrind += "valgrind"
-
-# Valgrind not yet available on rv32/rv64
-RDEPENDS:${PN}-valgrind:remove:riscv32 = "valgrind"
-RDEPENDS:${PN}-valgrind:remove:riscv64 = "valgrind"
meta-gnome/recipes-gnome/gjs/gjs_1.70.0.bb new file +34 -1
new file mode 100644
index 0000000000..d5f10ff3f5
@@ -0,0 +1,34 @@
+SUMMARY = "Javascript bindings for GNOME"
+LICENSE = "MIT & LGPLv2+"
+LIC_FILES_CHKSUM = " \
+    file://COPYING;md5=8dcea832f6acf45d856abfeb2d51ec48 \
+"
+
+GNOMEBASEBUILDCLASS = "meson"
+
+DEPENDS = "mozjs gtk+3 dbus gobject-introspection libffi cairo"
+
+inherit gnomebase gsettings gobject-introspection gobject-introspection-data vala gettext features_check upstream-version-is-even pkgconfig
+
+PV .= "+git${SRCPV}"
+SRCREV = "e41f247f8c170d125ce968ed236ae7249e966178"
+SRC_URI = "git://gitlab.gnome.org/GNOME/gjs;protocol=https;branch=mozjs91 \
+           file://0001-meson-Disable-runtime-checks.patch \
+          "
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMESON += "-Dinstalled_tests=false -Dskip_dbus_tests=true -Dskip_gtk_tests=true -Dprofiler=disabled"
+
+# gobject-introspection is mandatory and cannot be configured
+REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
+
+FILES:${PN} += "${datadir}/gjs-1.0/lsan"
+
+PACKAGES =+ "${PN}-valgrind"
+FILES:${PN}-valgrind = "${datadir}/gjs-1.0/valgrind"
+RDEPENDS:${PN}-valgrind += "valgrind"
+
+# Valgrind not yet available on rv32/rv64
+RDEPENDS:${PN}-valgrind:remove:riscv32 = "valgrind"
+RDEPENDS:${PN}-valgrind:remove:riscv64 = "valgrind"
--

2.33.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93690): https://lists.openembedded.org/g/openembedded-devel/message/93690
Mute This Topic: https://lists.openembedded.org/mt/86734007/3617609
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-