Skip to contentSkip to conversation

network-manager-applet: Fix build with musl/lld linker

PATCH In review Khem Raj 2 participants 3 messages Sep 3, 2023 – Sep 26, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 network-manager-applet: Fix build with musl/lld linker

---
 ...-script-Do-not-export-_IO_stdin_used.patch | 30 +++++++++++++++++++
 .../network-manager-applet_1.32.0.bb          |  6 ++--
 2 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet/0001-linker-script-Do-not-export-_IO_stdin_used.patch
meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet/0001-linker-script-Do-not-export-_IO_stdin_used.patch new file +30 -0
new file mode 100644
index 0000000000..eafd497ae2
@@ -0,0 +1,30 @@
+From e09ba80e342b3b24bb2a46e11dae1c30cc61c75c Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 3 Sep 2023 08:48:42 -0700
+Subject: [PATCH] linker-script: Do not export _IO_stdin_used
+
+This is glibc specific toolhain issue, it should have been handled in
+toolchain instead of exposing to applications. This was done to fix
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835550
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ linker-script-binary.ver | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/linker-script-binary.ver b/linker-script-binary.ver
+index a2780c0..f030d35 100644
+--- a/linker-script-binary.ver
++++ b/linker-script-binary.ver
+@@ -1,6 +1,5 @@
+ {
+ global:
+-	_IO_stdin_used;
+ local:
+ 	*;
+ };
+-- 
+2.42.0
+
meta-gnome/recipes-connectivity/network-manager-applet/network-manager-applet_1.32.0.bb +4 -2
index cc37291c8a..20fc0f3868 100644
@@ -5,9 +5,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 DEPENDS = "gtk+3 libnma libnotify libsecret libgudev networkmanager iso-codes nss"
 
 GNOMEBASEBUILDCLASS = "meson"
-inherit features_check gnomebase gsettings gtk-icon-cache gettext
+inherit features_check gnomebase gsettings gtk-icon-cache gettext pkgconfig
 
-REQUIRED_DISTRO_FEATURES = "x11 opengl"
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+SRC_URI:append:libc-musl = " file://0001-linker-script-Do-not-export-_IO_stdin_used.patch"
 
 SRC_URI[archive.sha256sum] = "a2b5affa1505ad43902959fdbe09e5bcec57b11ed333fa60458ffb9c62efba38"
 
Signature · 1 line
2.42.0
author
#1 lore raw

PATCH 2/2 networkmanager-openvpn: Fix build with lld on musl

---
 ...-script-Do-not-export-_IO_stdin_used.patch | 30 +++++++++++++++++++
 .../networkmanager-openvpn_1.10.2.bb          |  2 ++
 2 files changed, 32 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-script-Do-not-export-_IO_stdin_used.patch
meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-script-Do-not-export-_IO_stdin_used.patch new file +30 -0
new file mode 100644
index 0000000000..eafd497ae2
@@ -0,0 +1,30 @@
+From e09ba80e342b3b24bb2a46e11dae1c30cc61c75c Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 3 Sep 2023 08:48:42 -0700
+Subject: [PATCH] linker-script: Do not export _IO_stdin_used
+
+This is glibc specific toolhain issue, it should have been handled in
+toolchain instead of exposing to applications. This was done to fix
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835550
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ linker-script-binary.ver | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/linker-script-binary.ver b/linker-script-binary.ver
+index a2780c0..f030d35 100644
+--- a/linker-script-binary.ver
++++ b/linker-script-binary.ver
+@@ -1,6 +1,5 @@
+ {
+ global:
+-	_IO_stdin_used;
+ local:
+ 	*;
+ };
+-- 
+2.42.0
+
meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.10.2.bb +2 -0
index 3114731f2a..024ef39361 100644
@@ -10,6 +10,8 @@ inherit gnomebase useradd gettext systemd
 
 SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz"
 
+SRC_URI:append:libc-musl = " file://0001-linker-script-Do-not-export-_IO_stdin_used.patch"
+
 SRC_URI[sha256sum] = "62f0f2a8782221b923f212ac2a8ebbc1002efd6a90ee945dad4adfb56d076d21"
 
 S = "${WORKDIR}/NetworkManager-openvpn-${PV}"
Signature · 1 line
2.42.0
#2 lore raw

Re: [oe] [meta-networking][PATCH 2/2] networkmanager-openvpn: Fix build with lld on musl

Hi Khem,

Quoted 28 lines · Khem Raj
---
 ...-script-Do-not-export-_IO_stdin_used.patch | 30 +++++++++++++++++++
 .../networkmanager-openvpn_1.10.2.bb          |  2 ++
 2 files changed, 32 insertions(+)
 create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-script-Do-not-export-_IO_stdin_used.patch
meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-script-Do-not-export-_IO_stdin_used.patch new file +14 -0
new file mode 100644
index 0000000000..eafd497ae2
@@ -0,0 +1,30 @@
+From e09ba80e342b3b24bb2a46e11dae1c30cc61c75c Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sun, 3 Sep 2023 08:48:42 -0700
+Subject: [PATCH] linker-script: Do not export _IO_stdin_used
+
+This is glibc specific toolhain issue, it should have been handled in
+toolchain instead of exposing to applications. This was done to fix
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835550
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ linker-script-binary.ver | 1 -

meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-script-Do-not-export-_IO_stdin_used.patch line 24

Quoted 10 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-script-Do-not-export-_IO_stdin_used.patch new file +10 -0
+ 1 file changed, 1 deletion(-)
+
+diff --git a/linker-script-binary.ver b/linker-script-binary.ver
+index a2780c0..f030d35 100644
+--- a/linker-script-binary.ver
++++ b/linker-script-binary.ver
+@@ -1,6 +1,5 @@
+ {
+ global:
+-      _IO_stdin_used;

This gives me the following error when building for qemuarm64 with musl

/test-meta-oe/build/tmp/work/cortexa57-poky-linux-musl/networkmanager/1.44.0/recipe-sysroot-native/usr/bin/aarch64-poky-linux-musl/../../libexec/aarch64-poky-linux-musl/gcc/aarch64-poky-linux-musl/13.2.0/ld:/test-meta-oe/build/tmp/work/cortexa57-poky-linux-musl/networkmanager/1.44.0/NetworkManager-1.44.0/linker-script-binary.ver:3:
syntax error in VERSION script
collect2: error: ld returned 1 exit status

$> cat /test-meta-oe/build/tmp/work/cortexa57-poky-linux-musl/networkmanager/1.44.0/NetworkManager-1.44.0/linker-script-binary.ver {
global:
local:
*;
};

I am on top of master of Poky

Regards,
Clement

Quoted 31 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-script-Do-not-export-_IO_stdin_used.patch new file +6 -0
+ local:
+       *;
+ };
+--
+2.42.0
+
meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.10.2.bb +2 -1
index 3114731f2a..024ef39361 100644
@@ -10,6 +10,8 @@ inherit gnomebase useradd gettext systemd
 
 SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz"
 
+SRC_URI:append:libc-musl = " file://0001-linker-script-Do-not-export-_IO_stdin_used.patch"
+
 SRC_URI[sha256sum] = "62f0f2a8782221b923f212ac2a8ebbc1002efd6a90ee945dad4adfb56d076d21"
 
 S = "${WORKDIR}/NetworkManager-openvpn-${PV}"
--

2.42.0

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