Skip to contentSkip to conversation

nodejs: Fix build with icu-76+

PATCH New Khem Raj 1 participant 2 messages Nov 23, 2024

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 nodejs: Fix build with icu-76+

---
 ...uild-fix-building-with-system-icu-76.patch | 33 +++++++++++++++++++
 .../recipes-devtools/nodejs/nodejs_22.11.0.bb |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-building-with-system-icu-76.patch
meta-oe/recipes-devtools/nodejs/nodejs/0001-build-fix-building-with-system-icu-76.patch new file +33 -0
new file mode 100644
index 0000000000..326d226290
@@ -0,0 +1,33 @@
+From 2aec714749db053014a205d2d66d186f94867b55 Mon Sep 17 00:00:00 2001
+From: Michael Cho <[email protected]>
+Date: Tue, 29 Oct 2024 19:24:38 -0400
+Subject: [PATCH] build: fix building with system icu 76
+
+ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
+add `icu-uc` when linking to shared libraries. This results in undefined
+symbols/references when trying to build with system ICU 76.
+
+[^1]: unicode-org/icu@199bc82
+
+Upstream-Status: Backport [https://github.com/nodejs/node/pull/55563]
+PR-URL: https://github.com/nodejs/node/pull/55563
+Reviewed-By: Richard Lau <[email protected]>
+Reviewed-By: Luigi Pinca <[email protected]>
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.py b/configure.py
+index c4653f37..bff72b75 100755
+--- a/configure.py
++++ b/configure.py
+@@ -1876,7 +1876,7 @@ def configure_intl(o):
+   elif with_intl == 'system-icu':
+     # ICU from pkg-config.
+     o['variables']['v8_enable_i18n_support'] = 1
+-    pkgicu = pkg_config('icu-i18n')
++    pkgicu = pkg_config(['icu-i18n', 'icu-uc'])
+     if not pkgicu[0]:
+       error('''Could not load pkg-config data for "icu-i18n".
+        See above errors or the README.md.''')
meta-oe/recipes-devtools/nodejs/nodejs_22.11.0.bb +1 -0
index 49a5f350d9..e9e569af0d 100644
@@ -28,6 +28,7 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0001-deps-disable-io_uring-support-in-libuv.patch \
            file://0001-positional-args.patch \
            file://0001-custom-env.patch \
+           file://0001-build-fix-building-with-system-icu-76.patch \
            file://run-ptest \
            "
 SRC_URI:append:class-target = " \
author
#1 lore raw

PATCH 2/2 webkitgtk3: Fix build with ICU-76+

---
 .../0001-Support-ICU-76.1-build.patch         | 36 +++++++++++++++++++
 .../webkitgtk/webkitgtk3_2.44.3.bb            |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Support-ICU-76.1-build.patch
meta-oe/recipes-support/webkitgtk/webkitgtk3/0001-Support-ICU-76.1-build.patch new file +36 -0
new file mode 100644
index 0000000000..31535e7ae2
@@ -0,0 +1,36 @@
+From 57b80aa00be614218552fda67b2bf8d535b4f4cf Mon Sep 17 00:00:00 2001
+From: Jason Schonberg <[email protected]>
+Date: Wed, 20 Nov 2024 11:05:52 -0500
+Subject: [PATCH]  Support ICU 76.1 build
+
+https://bugs.webkit.org/show_bug.cgi?id=282120
+
+Reviewed by Yusuke Suzuki.
+
+In ICU 76.1 an additional macro `U_SHOW_CPLUSPLUS_HEADER_API` was added to
+control visibility of the C++ API within ICU. Set this value to `0` since WebKit
+wants to only use the C API.
+
+* Source/WTF/wtf/Platform.h:
+
+Canonical link: https://commits.webkit.org/285727@main
+
+Upstream-Status: Backport [ from webkitgtk-2.47.1 https://github.com/WebKit/WebKit/commit/63f7badbada070ebaadd318b2801818ecf7e7ea0 ]
+
+Signed-off-by: Jason Schonberg <[email protected]>
+---
+ Source/WTF/wtf/Platform.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h
+index 23070df2..51a8dce9 100644
+--- a/Source/WTF/wtf/Platform.h
++++ b/Source/WTF/wtf/Platform.h
+@@ -115,6 +115,7 @@
+ /* ICU configuration. Some of these match ICU defaults on some platforms, but we would like them consistently set everywhere we build WebKit. */
+ #define U_HIDE_DEPRECATED_API 1
+ #define U_SHOW_CPLUSPLUS_API 0
++#define U_SHOW_CPLUSPLUS_HEADER_API 0
+ #ifdef __cplusplus
+ #define UCHAR_TYPE char16_t
+ #endif
meta-oe/recipes-support/webkitgtk/webkitgtk3_2.44.3.bb +1 -0
index 01eefe13de..3eaade5399 100644
@@ -17,6 +17,7 @@ SRC_URI = "https://www.webkitgtk.org/releases/webkitgtk-${PV}.tar.xz \
            file://30e1d5e22213fdaca2a29ec3400c927d710a37a8.patch \
            file://0001-Fix-build-issues-with-latest-Clang.patch \
            file://fff1b1773bff2ef7c3b867ab019d69faa36c010d.patch \
+           file://0001-Support-ICU-76.1-build.patch \
            "
 SRC_URI[sha256sum] = "dc82d042ecaca981a4852357c06e5235743319cf10a94cd36ad41b97883a0b54"