Skip to contentSkip to conversation

schroedinger: Fix building tests

PATCH New Khem Raj 1 participant 3 messages Jun 12, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 schroedinger: Fix building tests

lld finds out this error where _orc_code_orc_deinterleave2_s16 is needed but is not linked into a testcase wavelet_max_gain

---
 ...p-orc.c-for-missing-_orc_code_orc_de.patch | 43 +++++++++++++++++++
 .../schroedinger/schroedinger_1.0.11.bb       |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/schroedinger/schroedinger/0001-testsuite-Add-tmp-orc.c-for-missing-_orc_code_orc_de.patch
meta-multimedia/recipes-multimedia/schroedinger/schroedinger/0001-testsuite-Add-tmp-orc.c-for-missing-_orc_code_orc_de.patch new file +43 -0
new file mode 100644
index 0000000000..498630c638
@@ -0,0 +1,43 @@
+From 7c998657c1787fcad8f0a502063adff71d78a140 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 12 Jun 2023 09:37:10 -0700
+Subject: [PATCH] testsuite: Add tmp-orc.c for missing
+ _orc_code_orc_deinterleave2_s16
+
+Fixes
+| aarch64-yoe-linux-ld.lld: error: undefined symbol: _orc_code_orc_deinterleave2_s16
+| >>> referenced by schroorc.h:1312 (../schroedinger/schroorc.h:1312)
+| >>>               wavelet_max_gain.o:(iwt_ref)
+| >>> referenced by schroorc.h:1312 (../schroedinger/schroorc.h:1312)
+| >>>               wavelet_max_gain.o:(iwt_ref)
+|
+| aarch64-yoe-linux-ld.lld: error: undefined symbol: _orc_code_orc_interleave2_s16
+| >>> referenced by wavelet_max_gain.c:281 (/usr/src/debug/schroedinger/1.0.11-r0/testsuite/wavelet_max_gain.c:281)
+| >>>               wavelet_max_gain.o:(iiwt_ref)
+| >>> referenced by wavelet_max_gain.c:281 (/usr/src/debug/schroedinger/1.0.11-r0/testsuite/wavelet_max_gain.c:281)
+| >>>               wavelet_max_gain.o:(iiwt_ref)
+| clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
+| make[3]: *** [Makefile:1147: wavelet_max_gain] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ testsuite/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
+index 6ee1130..762ecf2 100644
+--- a/testsuite/Makefile.am
++++ b/testsuite/Makefile.am
+@@ -100,6 +100,7 @@ wavelet_2d_SOURCES = wavelet_2d.c
+ nodist_wavelet_2d_SOURCES = $(top_srcdir)/schroedinger/tmp-orc.c
+ 
+ wavelet_max_gain_SOURCES = wavelet_max_gain.c
++nodist_wavelet_max_gain_SOURCES = $(top_srcdir)/schroedinger/tmp-orc.c
+ 
+ wavelet_noise_2d_SOURCES = wavelet_noise_2d.c
+ 
+-- 
+2.41.0
+
meta-multimedia/recipes-multimedia/schroedinger/schroedinger_1.0.11.bb +1 -0
index c9d98a2da1..c78e008007 100644
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d91a46405fc074b88c963cc4f2a0aae9 \
 DEPENDS = "orc-native orc"
 
 SRC_URI = "https://download.videolan.org/contrib/${BPN}/${BP}.tar.gz \
+           file://0001-testsuite-Add-tmp-orc.c-for-missing-_orc_code_orc_de.patch \
            file://configure.ac.patch"
 
 SRC_URI[md5sum] = "da6af08e564ca1157348fb8d92efc891"
Signature · 1 line
2.41.0
author
#1 lore raw

PATCH 2/3 fwts: Fix build issues found with lld linker

---
 ...kefile.am-Add-missing-link-with-zlib.patch | 43 +++++++++++++++++++
 meta-oe/recipes-test/fwts/fwts_22.11.00.bb    |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta-oe/recipes-test/fwts/fwts/0001-Makefile.am-Add-missing-link-with-zlib.patch
meta-oe/recipes-test/fwts/fwts/0001-Makefile.am-Add-missing-link-with-zlib.patch new file +43 -0
new file mode 100644
index 0000000000..358f7c424d
@@ -0,0 +1,43 @@
+From dd97e711b13af6f770db27abec316d5c9271c777 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 12 Jun 2023 10:25:55 -0700
+Subject: [PATCH] Makefile.am: Add missing link with zlib
+
+It uses functions e.g. gzopen/gzclone/gzgets which are provided by zlib
+therefore add it to linker flags.
+
+Fixes
+| aarch64-yoe-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: gzgets
+| >>> referenced by ../src/lib/src/.libs/libfwts.so
+|
+| aarch64-yoe-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: gzopen
+| >>> referenced by ../src/lib/src/.libs/libfwts.so
+|
+| aarch64-yoe-linux-ld.lld: error: undefined reference due to --no-allow-shlib-undefined: gzclose
+| >>> referenced by ../src/lib/src/.libs/libfwts.so
+| clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
+| make[3]: *** [Makefile:2301: fwts] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/lib/src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
+index 76c48d4..45eea88 100644
+--- a/src/lib/src/Makefile.am
++++ b/src/lib/src/Makefile.am
+@@ -30,7 +30,7 @@ pkglib_LTLIBRARIES = libfwts.la
+ libfwts_la_LDFLAGS = -version-info 1:0:0
+ 
+ libfwts_la_LIBADD = 				\
+-	-lm -lpthread -lbsd				\
++	-lm -lpthread -lbsd -lz				\
+ 	@GIO_LIBS@					\
+ 	@GLIB_LIBS@
+ 
+-- 
+2.41.0
+
meta-oe/recipes-test/fwts/fwts_22.11.00.bb +1 -0
index f1028074d7..2448082620 100644
@@ -12,6 +12,7 @@ SRC_URI = "http://fwts.ubuntu.com/release/fwts-V${PV}.tar.gz;subdir=${BP} \
            file://0005-Undefine-PAGE_SIZE.patch \
            file://0006-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch \
            file://0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch \
+           file://0001-Makefile.am-Add-missing-link-with-zlib.patch \
            "
 SRC_URI[sha256sum] = "4af4e1e0f1ae9313297af722d744ba47a81c81bc5bdeab3f4f40837a39e4b808"
 
Signature · 1 line
2.41.0
author
#2 lore raw

PATCH 3/3 xfce4-sensors-plugin: Use bfd linker instead of lld

In reply to Khem Raj

lld linking fails

| aarch64-yoe-linux-ld.lld: error: undefined symbol: gtk_sensorstacho_new(GtkOrientation, unsigned int, SensorsTachoStyle)
| >>> referenced by actions.cc:143 (/usr/src/debug/xfce4-sensors-plugin/1.4.4-r0/src/../../xfce4-sensors-plugin-1.4.4/src/actions.cc:143)
| >>>               xfce4_sensors-actions.o:(refresh_tacho_view(xfce4::Ptr<t_sensors_dialog> const&))
|
| aarch64-yoe-linux-ld.lld: error: undefined symbol: gtk_sensorstacho_set_color(_GtkSensorsTacho*, char const*)
| >>> referenced by actions.cc:146 (/usr/src/debug/xfce4-sensors-plugin/1.4.4-r0/src/../../xfce4-sensors-plugin-1.4.4/src/actions.cc:146)
| >>>               xfce4_sensors-actions.o:(refresh_tacho_view(xfce4::Ptr<t_sensors_dialog> const&))
| >>> referenced by callbacks.cc:197 (/usr/src/debug/xfce4-sensors-plugin/1.4.4-r0/src/../../xfce4-sensors-plugin-1.4.4/src/callbacks.cc:197)
| >>>               xfce4_sensors-callbacks.o:(list_cell_color_edited_(_GtkCellRendererText*, char const*, char const*, xfce4::Ptr<t_sensors_dialog> const&))
|
---
 .../recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.4.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-xfce/recipes-panel-plugins/sensors/xfce4-sensors-plugin_1.4.4.bb +2 -0
index 69996d2a3f..eb1165c578 100644
@@ -13,6 +13,8 @@ EXTRA_OECONF = " \
     --disable-xnvctrl \
 "
 
+LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -fuse-ld=bfd', '', d)}"
+
 do_configure:prepend() {
     sed -i 's:LIBSENSORS_CFLAGS=.*:LIBSENSORS_CFLAGS=-I${STAGING_INCDIR}:g' ${S}/configure.ac
 }
Signature · 1 line
2.41.0