diff mbox series

[1/1] package/gdk-pixbuf: fix static build

Message ID 20240211154401.5516-1-fontaine.fabrice@gmail.com
State New
Headers show
Series [1/1] package/gdk-pixbuf: fix static build | expand

Commit Message

Fabrice Fontaine Feb. 11, 2024, 3:44 p.m. UTC
Fix the following static build failure raised, at least, since bump to
version 2.42.10 in commit cd2757bd76d2bc2411e67a27a25b8ab55d40bdb7:

FAILED: gdk-pixbuf/gdk-pixbuf-csource
/home/autobuild/autobuild/instance-9/output-1/host/bin/mips-buildroot-linux-musl-gcc  -o gdk-pixbuf/gdk-pixbuf-csource gdk-pixbuf/gdk-pixbuf-csource.p/gdk-pixbuf-csource.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -static -Wl,--start-group gdk-pixbuf/libgdk_pixbuf-2.0.a -lm /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libglib-2.0.a -pthread /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libpcre2-8.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libgobject-2.0.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libffi.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libgmodule-2.0.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libgio-2.0.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linu
 x-musl/sysroot/usr/lib/libz.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libmount.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libblkid.a -Wl,--end-group
/home/autobuild/autobuild/instance-9/output-1/host/lib/gcc/mips-buildroot-linux-musl/12.3.0/../../../../mips-buildroot-linux-musl/bin/ld: gdk-pixbuf/libgdk_pixbuf-2.0.a(io-png.c.o): in function `png_simple_error_callback':
io-png.c:(.text+0xf8): undefined reference to `png_get_error_ptr'

Fixes:
 - http://autobuild.buildroot.org/results/e194d8f90caed7ceefd200d4e40d5fa5b3567d03

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-pixbuf-meson.build-fix-static-build.patch | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/gdk-pixbuf/0001-gdk-pixbuf-meson.build-fix-static-build.patch

+

Comments

Thomas Petazzoni Feb. 11, 2024, 9:39 p.m. UTC | #1
On Sun, 11 Feb 2024 16:44:01 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Fix the following static build failure raised, at least, since bump to
> version 2.42.10 in commit cd2757bd76d2bc2411e67a27a25b8ab55d40bdb7:
> 

[...]

> Fixes:
>  - http://autobuild.buildroot.org/results/e194d8f90caed7ceefd200d4e40d5fa5b3567d03
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...-pixbuf-meson.build-fix-static-build.patch | 38 +++++++++++++++++++
>  1 file changed, 38 insertions(+)
>  create mode 100644 package/gdk-pixbuf/0001-gdk-pixbuf-meson.build-fix-static-build.patch

I am not sure to fully grasp the issue and the fix, so I was planning
on waiting to get some feedback from upstream (hopefully).

Thomas
diff mbox series

Patch

diff --git a/package/gdk-pixbuf/0001-gdk-pixbuf-meson.build-fix-static-build.patch b/package/gdk-pixbuf/0001-gdk-pixbuf-meson.build-fix-static-build.patch
new file mode 100644
index 0000000000..44fff9b66d
--- /dev/null
+++ b/package/gdk-pixbuf/0001-gdk-pixbuf-meson.build-fix-static-build.patch
@@ -0,0 +1,38 @@ 
+From 02cb9c96528a756c346aae59facb8bb7a18463c4 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 10 Feb 2024 18:32:06 +0100
+Subject: [PATCH] gdk-pixbuf/meson.build: fix static build
+
+Add included_loaders_deps to dependencies of gdkpixbuf_dep to avoid the
+following build failure when building statically:
+
+FAILED: gdk-pixbuf/gdk-pixbuf-csource
+/home/autobuild/autobuild/instance-9/output-1/host/bin/mips-buildroot-linux-musl-gcc  -o gdk-pixbuf/gdk-pixbuf-csource gdk-pixbuf/gdk-pixbuf-csource.p/gdk-pixbuf-csource.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -static -Wl,--start-group gdk-pixbuf/libgdk_pixbuf-2.0.a -lm /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libglib-2.0.a -pthread /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libpcre2-8.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libgobject-2.0.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libffi.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libgmodule-2.0.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libgio-2.0.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-lin
 ux-musl/sysroot/usr/lib/libz.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libmount.a /home/autobuild/autobuild/instance-9/output-1/host/mips-buildroot-linux-musl/sysroot/usr/lib/libblkid.a -Wl,--end-group
+/home/autobuild/autobuild/instance-9/output-1/host/lib/gcc/mips-buildroot-linux-musl/12.3.0/../../../../mips-buildroot-linux-musl/bin/ld: gdk-pixbuf/libgdk_pixbuf-2.0.a(io-png.c.o): in function `png_simple_error_callback':
+io-png.c:(.text+0xf8): undefined reference to `png_get_error_ptr'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/e194d8f90caed7ceefd200d4e40d5fa5b3567d03
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/162
+---
+ gdk-pixbuf/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
+index a11926eee..450484d68 100644
+--- a/gdk-pixbuf/meson.build
++++ b/gdk-pixbuf/meson.build
+@@ -269,7 +269,7 @@ endif
+ gdkpixbuf_dep = declare_dependency(
+   link_with: gdkpixbuf,
+   include_directories: root_inc,
+-  dependencies: gdk_pixbuf_deps,
++  dependencies: [ gdk_pixbuf_deps, included_loaders_deps ],
+   sources: [ gdkpixbuf_enum_h, built_girs ],
+ )
+ meson.override_dependency('gdk-pixbuf-2.0', gdkpixbuf_dep)
+-- 
+2.43.0