From 72154f38fc5384729ef3a42eb7c4ca0afaf1664b Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Thu, 21 May 2026 17:31:23 +0200 Subject: [PATCH] kmscon: fix zlib cross-compiling errors zlib compression was introduced in version 9.3.3. However, when cross-compiling kmscon for an architecture other than x86_64, the genunifont executable tries to use the build-systems zlib instead of the hosts zlib. This leads to the following error during compiling: libz.so: error adding symbols: file in wrong format Fix this by adding a new native zlib dependency specifically for the genunifont executable. Signed-off-by: Adam Duskett Signed-off-by: Khem Raj --- ...0001-fix-zlib-cross-compiling-errors.patch | 51 +++++++++++++++++++ .../recipes-graphics/kmscon/kmscon_9.3.5.bb | 5 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-graphics/kmscon/files/0001-fix-zlib-cross-compiling-errors.patch diff --git a/meta-oe/recipes-graphics/kmscon/files/0001-fix-zlib-cross-compiling-errors.patch b/meta-oe/recipes-graphics/kmscon/files/0001-fix-zlib-cross-compiling-errors.patch new file mode 100644 index 0000000000..c720aa6dde --- /dev/null +++ b/meta-oe/recipes-graphics/kmscon/files/0001-fix-zlib-cross-compiling-errors.patch @@ -0,0 +1,51 @@ +From 0ff9beddd959ec9afc99f64789fdfb959842ba52 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Thu, 21 May 2026 16:30:27 +0200 +Subject: [PATCH 1/1] fix zlib cross-compiling errors + +zlib compression was introduced in version 9.3.3. However, when +cross-compiling kmscon for an architecture other than x86_64, the +genunifont executable tries to use the build-systems zlib instead +of the hosts zlib. + +This leads to the following error during compiling: +libz.so: error adding symbols: file in wrong format + +Fix this by adding a new native zlib dependency specifically for the +genunifont executable. + +Upstream-Status: Submitted [https://github.com/kmscon/kmscon/pull/402] +Signed-off-by: Adam Duskett +--- + meson.build | 1 + + src/meson.build | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index f7c0858..74cf595 100644 +--- a/meson.build ++++ b/meson.build +@@ -52,6 +52,7 @@ libudev_deps = dependency('libudev', version: '>=172') + dl_deps = dependency('dl') + threads_deps = dependency('threads') + zlib_deps = dependency('zlib') ++zlib_deps_native = dependency('zlib', native: true) + + python = find_program('python3') + +diff --git a/src/meson.build b/src/meson.build +index 63d38ca..070e2a4 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -159,7 +159,7 @@ endif + # Unifont Generator + # This generates the unifont sources from raw hex-encoded font data. + # +-genunifont = executable('genunifont', 'genunifont.c', dependencies: [zlib_deps], native: true) ++genunifont = executable('genunifont', 'genunifont.c', dependencies: [zlib_deps_native], native: true) + + unifont_bin = custom_target('unifont-bin', + input: ['font_unifont_data.hex'], +-- +2.54.0 + diff --git a/meta-oe/recipes-graphics/kmscon/kmscon_9.3.5.bb b/meta-oe/recipes-graphics/kmscon/kmscon_9.3.5.bb index b730faf414..83256480ee 100644 --- a/meta-oe/recipes-graphics/kmscon/kmscon_9.3.5.bb +++ b/meta-oe/recipes-graphics/kmscon/kmscon_9.3.5.bb @@ -20,7 +20,10 @@ DEPENDS = "\ zlib \ " -SRC_URI = "git://github.com/kmscon/kmscon;protocol=https;branch=main;tag=v${PV}" +SRC_URI = "\ + git://github.com/kmscon/kmscon;protocol=https;branch=main;tag=v${PV} \ + file://0001-fix-zlib-cross-compiling-errors.patch \ +" SRCREV = "a8832afb1dcca5bb4c0476d4c13c7239fecbd93a" inherit meson pkgconfig systemd