summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-06-07 14:11:14 -0700
committerKhem Raj <raj.khem@gmail.com>2024-06-07 21:53:33 -0700
commit751cb7534cd15dbb74a1af8a1a2112db458c7f08 (patch)
treee65c3b10984820e555bd1b9bcc8b649f62ff5705
parent2b33e916ff8fe8d7c0ec80ba8e9640491ae603e4 (diff)
downloadmeta-openembedded-751cb7534cd15dbb74a1af8a1a2112db458c7f08.tar.gz
networkmanager: Fix undefined symbol errors on musl+lld
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch65
-rw-r--r--meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.0.bb1
2 files changed, 66 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch
new file mode 100644
index 000000000..8e246efe0
--- /dev/null
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch
@@ -0,0 +1,65 @@
1From 34d7a6c9919a73c2e716835000944c17438b2ca1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 7 Jun 2024 14:03:15 -0700
4Subject: [PATCH] libnm-systemd-core: Disable sd_dhcp6_client_set_duid_uuid
5 function
6
7When building on musl systems ( with out systemd ), and using LLD linker
8from LLVM project we fail to link with undefined symbols.
9
10This symbol is in sd_id128.c but its disabled, so let disable the functions
11which need this function.
12
13| x86_64-yoe-linux-musl-ld.lld: error: undefined symbol: sd_id128_get_machine_app_specific
14| >>> referenced by sd-dhcp-duid.c:202 (/usr/src/debug/networkmanager/1.48.0/../NetworkManager-1.48.0/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c:202)
15| >>> libnm-systemd-core.a.p/src_libsystemd-network_sd-dhcp-duid.c.o:(sd_dhcp_duid_set_uuid) in archive src/libnm-systemd-core/libnm-systemd-core.a
16| x86_64-yoe-linux-musl-clang: error: linker command failed with exit code 1 (use -v to see invocation)
17
18Upstream-Status: Submitted [https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1966]
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c | 2 ++
22 .../src/libsystemd-network/sd-dhcp6-client.c | 3 ++-
23 2 files changed, 4 insertions(+), 1 deletion(-)
24
25diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c
26index e664a4a..7ba5020 100644
27--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c
28+++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c
29@@ -193,6 +193,7 @@ int sd_dhcp_duid_set_en(sd_dhcp_duid *duid) {
30 return 0;
31 }
32
33+#if 0
34 int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) {
35 sd_id128_t machine_id;
36 int r;
37@@ -209,6 +210,7 @@ int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) {
38 duid->size = offsetof(struct duid, uuid.uuid) + sizeof(machine_id);
39 return 0;
40 }
41+#endif
42
43 int dhcp_duid_to_string_internal(uint16_t type, const void *data, size_t data_size, char **ret) {
44 _cleanup_free_ char *p = NULL, *x = NULL;
45diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
46index 7c20116..08c1e96 100644
47--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
48+++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c
49@@ -244,6 +244,7 @@ int sd_dhcp6_client_set_duid_en(sd_dhcp6_client *client) {
50 return 0;
51 }
52
53+#if 0
54 int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) {
55 int r;
56
57@@ -256,7 +257,7 @@ int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) {
58
59 return 0;
60 }
61-
62+#endif
63 int sd_dhcp6_client_set_duid_raw(sd_dhcp6_client *client, uint16_t duid_type, const uint8_t *duid, size_t duid_len) {
64 int r;
65
diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.0.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.0.bb
index 1355e52a6..47287951f 100644
--- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.0.bb
+++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.0.bb
@@ -40,6 +40,7 @@ SRC_URI = " \
40 file://${BPN}.initd \ 40 file://${BPN}.initd \
41 file://enable-dhcpcd.conf \ 41 file://enable-dhcpcd.conf \
42 file://enable-iwd.conf \ 42 file://enable-iwd.conf \
43 file://0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch \
43" 44"
44SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}" 45SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}"
45 46