package/gdk-pixbuf: enable relocatable option
PATCH v2 1/2 package/gdk-pixbuf: enable relocatable option
Enable relocatable option to fix the following PPD build failure of adwaita-icon-theme:
Can't load file: Unrecognized image file format
This failure is raised because the SVG library is not found by gtk-encode-symbolic-svg. To find the SVG library, gtk-encode-symbolic-svg depends on libgtk_pixbuf library which reads the loaders.cache file using:
- a hardcoded path (which points to host-gdk-pixbuf per-package directory) if relocatable is disabled. The loaders.cache in this directory doesn't declare SVG support because it has not yet been updated by host-librsvg
- or a dynamic path corresponding to the binary location if relocatable is enabled.
So obviously, we need to set relocatable to true.
Fixes:
- http://autobuild.buildroot.org/results/0e00059b09b4445eaaec1030997883187c6a80d6
---
Changes v1 -> v2 (after review of Yann E. Morin):
- Drop relocatable from target
- Enhance commit message
package/gdk-pixbuf/gdk-pixbuf.mk | 1 + 1 file changed, 1 insertion(+)
package/gdk-pixbuf/gdk-pixbuf.mk +1 -0
@@ -26,6 +26,7 @@ HOST_GDK_PIXBUF_CONF_OPTS = \ -Dgio_sniffing=false \ -Dinstalled_tests=false \ -Dintrospection=disabled \ + -Drelocatable=true \ -Dman=false ifeq ($(BR2_STATIC_LIBS),y)
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/2 package/librsvg: fix loaders.cache with with per-package directories
host-librsvg invokes the gdk-pixbuf-queryloaders to update loaders.cache (which is originally built by host-gdk-pixbuf). loaders.cache contains the list of all the gdk-pixbuf modules; that includes paths to dlopen()ed shared libs. host-librsvg must update this file to add the path to its SVG shared library.
By default, gdk-pixbuf-queryloaders uses a hardcoded path to find the installed shared libs and this path will point to the location of the host-gdk-pixbuf per-package directory. Obviously, this is wrong, the SVG library installed by host-librsvg is installed in its own per-package directory.
So set GDK_PIXBUF_MODULEDIR to gdk_pixbuf_moduledir before calling gdk-pixbuf-query-loaders to build a correct loaders.cache. gdk_pixbuf_moduledir is already retrieved from host-pkgconfig in configure.ac and so will point to the correct location (thanks to PPD_FIXUP_PATHS).
After this update, the loaders.cache will be correctly updated in host-librsvg per-package directory and so the loaders.cache installed in adwaita-icon-theme per-package directory will also be correct (thanks to PPD_FIXUP_PATHS).
This will fix the following PPD build failure of adwaita-icon-theme:
Can't load file: Unrecognized image file format
Fixes:
- http://autobuild.buildroot.org/results/0e00059b09b4445eaaec1030997883187c6a80d6
---
Changes v1 -> v2 (after review of Yann E. Morin):
- Enhance commit message
- Add patch upstream status
...r-Makefile.am-set-GDK_PIXBUF_MODULED.patch | 41 +++++++++++++++++++ package/librsvg/librsvg.mk | 2 + 2 files changed, 43 insertions(+) create mode 100644 package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch
package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch new file +41 -0
@@ -0,0 +1,41 @@ +From 2c472bf55289ccbd7f305aa3e98d6fd70be4e3ab Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sat, 19 Feb 2022 12:02:10 +0100 +Subject: [PATCH] gdk-pixbuf-loader/Makefile.am: set GDK_PIXBUF_MODULEDIR + +Set GDK_PIXBUF_MODULEDIR to gdk_pixbuf_moduledir before calling +gdk-pixbuf-query-loaders to build a correct gdk_pixbuf_cache_file and +gdk-pixbuf.loaders on 'exotic' systems + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: +https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/668] +--- + gdk-pixbuf-loader/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gdk-pixbuf-loader/Makefile.am b/gdk-pixbuf-loader/Makefile.am +index c3493736..de1f9641 100644 +--- a/gdk-pixbuf-loader/Makefile.am ++++ b/gdk-pixbuf-loader/Makefile.am +@@ -49,7 +49,7 @@ rsvg_loader_LDADD = \ + EXTRA_rsvg_loader_DEPENDENCIES = libpixbufloader-svg.la gdk-pixbuf-loaders + + gdk-pixbuf-loaders: Makefile +- $(AM_V_GEN) ( $(GDK_PIXBUF_QUERYLOADERS) ./libpixbufloader-svg.la && $(GDK_PIXBUF_QUERYLOADERS)) > gdk-pixbuf.loaders 2>/dev/null ++ $(AM_V_GEN) ( $(GDK_PIXBUF_QUERYLOADERS) ./libpixbufloader-svg.la && GDK_PIXBUF_MODULEDIR=$(gdk_pixbuf_moduledir) $(GDK_PIXBUF_QUERYLOADERS)) > gdk-pixbuf.loaders 2>/dev/null + + if CROSS_COMPILING + RUN_QUERY_LOADER_TEST=false +@@ -68,7 +68,7 @@ endif + install-data-hook: + @if $(RUN_QUERY_LOADER_TEST) ; then \ + $(mkinstalldirs) $(DESTDIR)$(gdk_pixbuf_binarydir) ; \ +- $(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ; \ ++ GDK_PIXBUF_MODULEDIR=$(gdk_pixbuf_moduledir) $(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ; \ + else \ + echo "***" ; \ + echo "*** Warning: loaders.cache not built" ; \ +-- +2.34.1 +
package/librsvg/librsvg.mk +2 -0
@@ -20,6 +20,8 @@ HOST_LIBRSVG_DEPENDENCIES = host-cairo host-gdk-pixbuf host-libglib2 host-libxml LIBRSVG_LICENSE = LGPL-2.1+ LIBRSVG_LICENSE_FILES = COPYING.LIB LIBRSVG_CPE_ID_VENDOR = gnome +# We're patching gdk-pixbuf-loader/Makefile.am +LIBRSVG_AUTORECONF = YES ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) LIBRSVG_CONF_OPTS += --enable-introspection
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRe: [Buildroot] [PATCH v2, 2/2] package/librsvg: fix loaders.cache with with per-package directories
Fabrice, All,
On 2022-02-20 13:16 +0100, Fabrice Fontaine spake thusly:
Quoted 23 lines
host-librsvg invokes the gdk-pixbuf-queryloaders to update loaders.cache (which is originally built by host-gdk-pixbuf). loaders.cache contains the list of all the gdk-pixbuf modules; that includes paths to dlopen()ed shared libs. host-librsvg must update this file to add the path to its SVG shared library.
By default, gdk-pixbuf-queryloaders uses a hardcoded path to find the installed shared libs and this path will point to the location of the host-gdk-pixbuf per-package directory. Obviously, this is wrong, the SVG library installed by host-librsvg is installed in its own per-package directory.
So set
GDK_PIXBUF_MODULEDIRtogdk_pixbuf_moduledirbefore calling gdk-pixbuf-query-loaders to build a correct loaders.cache.gdk_pixbuf_modulediris already retrieved from host-pkgconfig in configure.ac and so will point to the correct location (thanks toPPD_FIXUP_PATHS).After this update, the loaders.cache will be correctly updated in host-librsvg per-package directory and so the loaders.cache installed in adwaita-icon-theme per-package directory will also be correct (thanks to
PPD_FIXUP_PATHS).
Quoted 8 lines
This will fix the following PPD build failure of adwaita-icon-theme:
Can't load file: Unrecognized image file format
Fixes:
- http://autobuild.buildroot.org/results/0e00059b09b4445eaaec1030997883187c6a80d6Signed-off-by Fabrice Fontaine <[email protected]>
Thank you very much for expanding on your previous commit log. It indeed helps a lot to explain what is happening.
Still, I felt I needed to understand a bit more about the issue: why did we have to fix it at build time for a file that is never isntalled?
Also, since we now configure gdk-pixbuf in a relocatable way, why was the issue still happening?
So I investigated a bit, and substancially rewrote the commit log with my findings.
Still, I must say that your second commit log was already very good, and it really helped me understand the overall issue. Thanks for that! :-)
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 77 lines
---
Changes v1 -> v2 (after review of Yann E. Morin):
- Enhance commit message
- Add patch upstream status...r-Makefile.am-set-GDK_PIXBUF_MODULED.patch | 41 +++++++++++++++++++ package/librsvg/librsvg.mk | 2 + 2 files changed, 43 insertions(+) create mode 100644 package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patchpackage/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch new file +41
-0@@ -0,0 +1,41 @@ +From 2c472bf55289ccbd7f305aa3e98d6fd70be4e3ab Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Sat, 19 Feb 2022 12:02:10 +0100 +Subject: [PATCH] gdk-pixbuf-loader/Makefile.am: set GDK_PIXBUF_MODULEDIR + +Set GDK_PIXBUF_MODULEDIR to gdk_pixbuf_moduledir before calling +gdk-pixbuf-query-loaders to build a correct gdk_pixbuf_cache_file and +gdk-pixbuf.loaders on 'exotic' systems + +Signed-off-by: Fabrice Fontaine <[email protected]> +[Upstream status: +https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/668] +--- + gdk-pixbuf-loader/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gdk-pixbuf-loader/Makefile.am b/gdk-pixbuf-loader/Makefile.am +index c3493736..de1f9641 100644 +--- a/gdk-pixbuf-loader/Makefile.am ++++ b/gdk-pixbuf-loader/Makefile.am +@@ -49,7 +49,7 @@ rsvg_loader_LDADD = \ + EXTRA_rsvg_loader_DEPENDENCIES = libpixbufloader-svg.la gdk-pixbuf-loaders + + gdk-pixbuf-loaders: Makefile +- $(AM_V_GEN) ( $(GDK_PIXBUF_QUERYLOADERS) ./libpixbufloader-svg.la && $(GDK_PIXBUF_QUERYLOADERS)) > gdk-pixbuf.loaders 2>/dev/null ++ $(AM_V_GEN) ( $(GDK_PIXBUF_QUERYLOADERS) ./libpixbufloader-svg.la && GDK_PIXBUF_MODULEDIR=$(gdk_pixbuf_moduledir) $(GDK_PIXBUF_QUERYLOADERS)) > gdk-pixbuf.loaders 2>/dev/null + + if CROSS_COMPILING + RUN_QUERY_LOADER_TEST=false +@@ -68,7 +68,7 @@ endif + install-data-hook: + @if $(RUN_QUERY_LOADER_TEST) ; then \ + $(mkinstalldirs) $(DESTDIR)$(gdk_pixbuf_binarydir) ; \ +- $(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ; \ ++ GDK_PIXBUF_MODULEDIR=$(gdk_pixbuf_moduledir) $(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ; \ + else \ + echo "***" ; \ + echo "*** Warning: loaders.cache not built" ; \ +-- +2.34.1 +package/librsvg/librsvg.mk +2
-0@@ -20,6 +20,8 @@ HOST_LIBRSVG_DEPENDENCIES = host-cairo host-gdk-pixbuf host-libglib2 host-libxml LIBRSVG_LICENSE = LGPL-2.1+ LIBRSVG_LICENSE_FILES = COPYING.LIB LIBRSVG_CPE_ID_VENDOR = gnome +# We're patching gdk-pixbuf-loader/Makefile.am +LIBRSVG_AUTORECONF = YES ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) LIBRSVG_CONF_OPTS += --enable-introspectionSignature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedFabrice, All,
On 2022-02-20 13:16 +0100, Fabrice Fontaine spake thusly:
Quoted 16 lines
Enable relocatable option to fix the following PPD build failure of adwaita-icon-theme:
Can't load file: Unrecognized image file format
This failure is raised because the SVG library is not found by gtk-encode-symbolic-svg. To find the SVG library, gtk-encode-symbolic-svg depends on
libgtk_pixbuflibrary which reads the loaders.cache file using:
- a hardcoded path (which points to host-gdk-pixbuf per-package directory) if relocatable is disabled. The loaders.cache in this directory doesn't declare SVG support because it has not yet been updated by host-librsvg
- or a dynamic path corresponding to the binary location if relocatable is enabled.
Quoted 4 lines
So obviously, we need to set relocatable to true.
Fixes:
- http://autobuild.buildroot.org/results/0e00059b09b4445eaaec1030997883187c6a80d6
Thanks for providing more details, this is much better indeed, thanks! :-)
I've still felt the need to extend the commit log, because I found that it left out some information adn explanations that may b needed in the future.
Applied to master, thanks! :-)
Regards,
Yann E. MORIN.
Quoted 28 lines
Signed-off-by Fabrice Fontaine <[email protected]>---
Changes v1 -> v2 (after review of Yann E. Morin):
- Drop relocatable from target
- Enhance commit messagepackage/gdk-pixbuf/gdk-pixbuf.mk | 1 + 1 file changed, 1 insertion(+)package/gdk-pixbuf/gdk-pixbuf.mk +1
-0@@ -26,6 +26,7 @@ HOST_GDK_PIXBUF_CONF_OPTS = \ -Dgio_sniffing=false \ -Dinstalled_tests=false \ -Dintrospection=disabled \ + -Drelocatable=true \ -Dman=false ifeq ($(BR2_STATIC_LIBS),y)Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
Enable relocatable option to fix the following PPD build failure of adwaita-icon-theme:
Can't load file: Unrecognized image file format
This failure is raised because the SVG library is not found by gtk-encode-symbolic-svg. To find the SVG library, gtk-encode-symbolic-svg depends on
libgtk_pixbuflibrary which reads the loaders.cache file using:
- a hardcoded path (which points to host-gdk-pixbuf per-package directory) if relocatable is disabled. The loaders.cache in this directory doesn't declare SVG support because it has not yet been updated by host-librsvg
- or a dynamic path corresponding to the binary location if relocatable is enabled.So obviously, we need to set relocatable to true.
Quoted 8 lines
Fixes:
- http://autobuild.buildroot.org/results/0e00059b09b4445eaaec1030997883187c6a80d6Signed-off-by Fabrice Fontaine <[email protected]>---
Changes v1 -> v2 (after review of Yann E. Morin):
- Drop relocatable from target
- Enhance commit message
Committed to 2021.02.x and 2021.11.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot