ostree: Fix build errors found with lld linker
PATCH 1/3 ostree: Fix build errors found with lld linker
Signed-off-by Khem Raj <[email protected]>
--- ...ith-libgpg-error-for-gpg_strerror_r-.patch | 35 +++++++++++++++++++ .../recipes-extended/ostree/ostree_2023.3.bb | 1 + 2 files changed, 36 insertions(+) create mode 100644 meta-oe/recipes-extended/ostree/ostree/0001-libostree-Link-with-libgpg-error-for-gpg_strerror_r-.patch
meta-oe/recipes-extended/ostree/ostree/0001-libostree-Link-with-libgpg-error-for-gpg_strerror_r-.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 597120777ff9410b715c19298df824ce3170d6d7 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 12 Jun 2023 14:04:44 -0700 +Subject: [PATCH] libostree: Link with libgpg-error for gpg_strerror_r API + +With f461c02bb55bf2853a3b81ed5c8618040ab54e98 use of gpg_strerror_r +was added this symbol comes from libgpg-error however, therefore its +needed to add -lgpg-error to cmdline to resolve this symbol especially +with gold and lld linker. Fixes + +aarch64-yoe-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: gpg_strerror_r +>>> referenced by ./.libs/libostree-1.so + +Upstream-Status: Submitted [https://github.com/ostreedev/ostree/pull/2880] +Signed-off-by: Khem Raj <[email protected]> +--- + Makefile-libostree.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile-libostree.am b/Makefile-libostree.am +index 8edd7f4d..4ad1eed5 100644 +--- a/Makefile-libostree.am ++++ b/Makefile-libostree.am +@@ -191,7 +191,7 @@ libostree_1_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/bsdiff -I$(srcdir)/libglnx -I$( + -DPKGLIBEXECDIR=\"$(pkglibexecdir)\" + libostree_1_la_LDFLAGS = -version-number 1:0:0 -Bsymbolic-functions $(addprefix $(wl_versionscript_arg),$(symbol_files)) + libostree_1_la_LIBADD = libotutil.la libglnx.la libbsdiff.la $(OT_INTERNAL_GIO_UNIX_LIBS) $(OT_INTERNAL_GPGME_LIBS) \ +- $(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS) ++ $(OT_DEP_LZMA_LIBS) $(OT_DEP_ZLIB_LIBS) $(OT_DEP_CRYPTO_LIBS) $(OT_DEP_GPG_ERROR_LIBS) + # Some change between rust-1.21.0-1.fc27 and rust-1.22.1-1.fc27.x86_64 + libostree_1_la_LIBADD += $(bupsplitpath) + EXTRA_libostree_1_la_DEPENDENCIES = $(symbol_files) +-- +2.41.0 +
meta-oe/recipes-extended/ostree/ostree_2023.3.bb +1 -0
@@ -21,6 +21,7 @@ DEPENDS = " \ GITHUB_BASE_URI = "https://github.com/ostreedev/ostree/releases" SRC_URI = " \ ${GITHUB_BASE_URI}/download/v${PV}/libostree-${PV}.tar.xz \ + file://0001-libostree-Link-with-libgpg-error-for-gpg_strerror_r-.patch \ file://run-ptest \ " SRC_URI[sha256sum] = "9c575a094da2c307769f0aee15de95470c3b5550cbff211fbbc4f6fc75f333b1"
Signature · 1 line
2.41.0
PATCH 2/3 spice-gtk: Fix build with lld linker
lld flags errors when checking for --version-script linker option since the export file specifies symbols which do not exist during link, so in a way it is right, however bfd linker works fine and ignores this error.
perhaps the meson check should be improved but until them lets add --undefined-version option to linker when using lld
Fixes
aarch64-yoe-linux-ld.lld: error: TOPDIR/build/tmp/work/cortexa72-cortexa53-crypto-mx8-yoe-linux/spice-gtk/0.42-r0/git/src/spice-glib-sym-file:1: unknown directive: spice_audio_get
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
spice_audio_get
^
Signed-off-by Khem Raj <[email protected]>
--- meta-networking/recipes-support/spice/spice-gtk_0.42.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-networking/recipes-support/spice/spice-gtk_0.42.bb +2 -0
@@ -55,4 +55,6 @@ PACKAGECONFIG[vapi] = "-Dvapi=enabled,-Dvapi=disabled" EXTRA_OEMESON = "-Dpie=true" EXTRA_OEMESON:append:libc-musl = " -Dcoroutine=libucontext" +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}" + FILES:${PN} += "${datadir}"
Signature · 1 line
2.41.0
PATCH 3/3 sblim-sfcb: Fix build with lld linker
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
--- meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb +1 -0
@@ -46,6 +46,7 @@ SYSTEMD_SERVICE:${PN} = "sblim-sfcb.service" SYSTEMD_AUTO_ENABLE = "enable" LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" +LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--allow-shlib-undefined ', '', d)}" EXTRA_OECONF = '--enable-debug \ --enable-ssl \
Signature · 1 line
2.41.0