* [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option
@ 2022-02-20 12:16 Fabrice Fontaine
2022-02-20 12:16 ` [Buildroot] [PATCH v2, 2/2] package/librsvg: fix loaders.cache with with per-package directories Fabrice Fontaine
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2022-02-20 12:16 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
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
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
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(+)
diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk
index cd30d450d5..b22e9568c9 100644
--- a/package/gdk-pixbuf/gdk-pixbuf.mk
+++ b/package/gdk-pixbuf/gdk-pixbuf.mk
@@ -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)
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2, 2/2] package/librsvg: fix loaders.cache with with per-package directories
2022-02-20 12:16 [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option Fabrice Fontaine
@ 2022-02-20 12:16 ` Fabrice Fontaine
2022-02-20 22:11 ` Yann E. MORIN
2022-02-20 20:24 ` [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option Yann E. MORIN
2022-03-10 21:50 ` Peter Korsgaard
2 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2022-02-20 12:16 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
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
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
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
diff --git a/package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch b/package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch
new file mode 100644
index 0000000000..761ff92605
--- /dev/null
+++ b/package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch
@@ -0,0 +1,41 @@
+From 2c472bf55289ccbd7f305aa3e98d6fd70be4e3ab Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+[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
+
diff --git a/package/librsvg/librsvg.mk b/package/librsvg/librsvg.mk
index e4b1942b79..07a14b4366 100644
--- a/package/librsvg/librsvg.mk
+++ b/package/librsvg/librsvg.mk
@@ -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
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option
2022-02-20 12:16 [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option Fabrice Fontaine
2022-02-20 12:16 ` [Buildroot] [PATCH v2, 2/2] package/librsvg: fix loaders.cache with with per-package directories Fabrice Fontaine
@ 2022-02-20 20:24 ` Yann E. MORIN
2022-03-10 21:50 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2022-02-20 20:24 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
Fabrice, All,
On 2022-02-20 13:16 +0100, Fabrice Fontaine spake thusly:
> 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
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.
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> 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(+)
>
> diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk
> index cd30d450d5..b22e9568c9 100644
> --- a/package/gdk-pixbuf/gdk-pixbuf.mk
> +++ b/package/gdk-pixbuf/gdk-pixbuf.mk
> @@ -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)
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH v2, 2/2] package/librsvg: fix loaders.cache with with per-package directories
2022-02-20 12:16 ` [Buildroot] [PATCH v2, 2/2] package/librsvg: fix loaders.cache with with per-package directories Fabrice Fontaine
@ 2022-02-20 22:11 ` Yann E. MORIN
0 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2022-02-20 22:11 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
Fabrice, All,
On 2022-02-20 13:16 +0100, Fabrice Fontaine spake thusly:
> 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
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
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.
> ---
> 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
>
> diff --git a/package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch b/package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch
> new file mode 100644
> index 0000000000..761ff92605
> --- /dev/null
> +++ b/package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch
> @@ -0,0 +1,41 @@
> +From 2c472bf55289ccbd7f305aa3e98d6fd70be4e3ab Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +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 <fontaine.fabrice@gmail.com>
> +[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
> +
> diff --git a/package/librsvg/librsvg.mk b/package/librsvg/librsvg.mk
> index e4b1942b79..07a14b4366 100644
> --- a/package/librsvg/librsvg.mk
> +++ b/package/librsvg/librsvg.mk
> @@ -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
> --
> 2.34.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option
2022-02-20 12:16 [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option Fabrice Fontaine
2022-02-20 12:16 ` [Buildroot] [PATCH v2, 2/2] package/librsvg: fix loaders.cache with with per-package directories Fabrice Fontaine
2022-02-20 20:24 ` [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option Yann E. MORIN
@ 2022-03-10 21:50 ` Peter Korsgaard
2 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2022-03-10 21:50 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> 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_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
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> 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.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-10 21:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-20 12:16 [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option Fabrice Fontaine
2022-02-20 12:16 ` [Buildroot] [PATCH v2, 2/2] package/librsvg: fix loaders.cache with with per-package directories Fabrice Fontaine
2022-02-20 22:11 ` Yann E. MORIN
2022-02-20 20:24 ` [Buildroot] [PATCH v2, 1/2] package/gdk-pixbuf: enable relocatable option Yann E. MORIN
2022-03-10 21:50 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox