All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libgtk4: enable introspection when gobject-introspection is enabled
@ 2026-08-04 10:47 Alsey Coleman Miller
  2026-08-04 12:55 ` Fiona Klute via buildroot
  2026-08-14 14:07 ` Titouan Christophe via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Alsey Coleman Miller @ 2026-08-04 10:47 UTC (permalink / raw)
  To: buildroot; +Cc: Alsey Coleman Miller

libgtk4 passes -Dintrospection=disabled unconditionally, so Gtk-4.0.gir is
never installed. webkitgtk depends on gobject-introspection and generates
WebKit-6.0.gir, which includes Gtk-4.0.gir, so building both fails:

  FAILED: WebKit-6.0.gir
  Couldn't find include 'Gtk-4.0.gir' (search path:
  '['.../usr/share/gir-1.0', ...]')

Tie the option to BR2_PACKAGE_GOBJECT_INTROSPECTION and add the dependency,
the way package/libgtk3 already does. Systems without introspection keep the
previous behaviour.

Signed-off-by: Alsey Coleman Miller <alseycmiller@gmail.com>
---
 package/libgtk4/libgtk4.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/libgtk4/libgtk4.mk b/package/libgtk4/libgtk4.mk
index 0d86835609..9a5ed651a8 100644
--- a/package/libgtk4/libgtk4.mk
+++ b/package/libgtk4/libgtk4.mk
@@ -34,11 +34,17 @@ LIBGTK4_CONF_OPTS = \
 	-Dsysprof=disabled \
 	-Dtracker=disabled \
 	-Dcolord=disabled \
-	-Dintrospection=disabled \
 	-Ddocumentation=false \
 	-Dscreenshots=false \
 	-Dman-pages=false
 
+ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
+LIBGTK4_CONF_OPTS += -Dintrospection=enabled
+LIBGTK4_DEPENDENCIES += gobject-introspection
+else
+LIBGTK4_CONF_OPTS += -Dintrospection=disabled
+endif
+
 ifeq ($(BR2_PACKAGE_LIBGTK4_X11),y)
 LIBGTK4_DEPENDENCIES += xlib_libXcursor xlib_libXi xlib_libXinerama
 LIBGTK4_CONF_OPTS += -Dx11-backend=true
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libgtk4: enable introspection when gobject-introspection is enabled
  2026-08-04 10:47 [Buildroot] [PATCH 1/1] package/libgtk4: enable introspection when gobject-introspection is enabled Alsey Coleman Miller
@ 2026-08-04 12:55 ` Fiona Klute via buildroot
  2026-08-14 14:07 ` Titouan Christophe via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Fiona Klute via buildroot @ 2026-08-04 12:55 UTC (permalink / raw)
  To: Alsey Coleman Miller, buildroot, Fabrice Fontaine

Am 04.08.26 um 12:47 schrieb Alsey Coleman Miller:
> libgtk4 passes -Dintrospection=disabled unconditionally, so Gtk-4.0.gir is
> never installed. webkitgtk depends on gobject-introspection and generates
> WebKit-6.0.gir, which includes Gtk-4.0.gir, so building both fails:
> 
>    FAILED: WebKit-6.0.gir
>    Couldn't find include 'Gtk-4.0.gir' (search path:
>    '['.../usr/share/gir-1.0', ...]')
> 
> Tie the option to BR2_PACKAGE_GOBJECT_INTROSPECTION and add the dependency,
> the way package/libgtk3 already does. Systems without introspection keep the
> previous behaviour.
> 
> Signed-off-by: Alsey Coleman Miller <alseycmiller@gmail.com>

Applied to master, thank you!

@Fabrice, while testing this patch with utils/test-pkg I noticed 
package/librsvg (pulled in as dependency of libgtk4) fails to build 
using bootlin-x86-64-musl toolchain with introspection enabled. Maybe 
you could look into that?

Command:
./utils/test-pkg -T bootlin-x86-64-musl -c libgtk4.config

libgtk4.config:
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_GOBJECT_INTROSPECTION=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_LIBGLVND=y
BR2_PACKAGE_LIBGLVND_DISPATCH_EGL=y
BR2_PACKAGE_LIBGTK4=y

Error:
   CCLD     rsvg-convert
   GISCAN   Rsvg-2.0.gir
/home/fiona/br-test-pkg/bootlin-x86-64-musl/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-musl/14.3.0/../../../../x86_64-buildroot-linux-musl/bin/ld: 
./.libs/librsvg-2.so: undefined reference to `open64'
collect2: error: ld returned 1 exit status

Best regards,
Fiona

> ---
>   package/libgtk4/libgtk4.mk | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/package/libgtk4/libgtk4.mk b/package/libgtk4/libgtk4.mk
> index 0d86835609..9a5ed651a8 100644
> --- a/package/libgtk4/libgtk4.mk
> +++ b/package/libgtk4/libgtk4.mk
> @@ -34,11 +34,17 @@ LIBGTK4_CONF_OPTS = \
>   	-Dsysprof=disabled \
>   	-Dtracker=disabled \
>   	-Dcolord=disabled \
> -	-Dintrospection=disabled \
>   	-Ddocumentation=false \
>   	-Dscreenshots=false \
>   	-Dman-pages=false
>   
> +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
> +LIBGTK4_CONF_OPTS += -Dintrospection=enabled
> +LIBGTK4_DEPENDENCIES += gobject-introspection
> +else
> +LIBGTK4_CONF_OPTS += -Dintrospection=disabled
> +endif
> +
>   ifeq ($(BR2_PACKAGE_LIBGTK4_X11),y)
>   LIBGTK4_DEPENDENCIES += xlib_libXcursor xlib_libXi xlib_libXinerama
>   LIBGTK4_CONF_OPTS += -Dx11-backend=true

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libgtk4: enable introspection when gobject-introspection is enabled
  2026-08-04 10:47 [Buildroot] [PATCH 1/1] package/libgtk4: enable introspection when gobject-introspection is enabled Alsey Coleman Miller
  2026-08-04 12:55 ` Fiona Klute via buildroot
@ 2026-08-14 14:07 ` Titouan Christophe via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Titouan Christophe via buildroot @ 2026-08-14 14:07 UTC (permalink / raw)
  To: Alsey Coleman Miller, buildroot

On 4/08/26 12:47, Alsey Coleman Miller wrote:
> libgtk4 passes -Dintrospection=disabled unconditionally, so Gtk-4.0.gir is
> never installed. webkitgtk depends on gobject-introspection and generates
> WebKit-6.0.gir, which includes Gtk-4.0.gir, so building both fails:
>
>    FAILED: WebKit-6.0.gir
>    Couldn't find include 'Gtk-4.0.gir' (search path:
>    '['.../usr/share/gir-1.0', ...]')
>
> Tie the option to BR2_PACKAGE_GOBJECT_INTROSPECTION and add the dependency,
> the way package/libgtk3 already does. Systems without introspection keep the
> previous behaviour.
>
> Signed-off-by: Alsey Coleman Miller <alseycmiller@gmail.com>

Applied to 2025.02.x and 2026.05.x, thanks !
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-14 14:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 10:47 [Buildroot] [PATCH 1/1] package/libgtk4: enable introspection when gobject-introspection is enabled Alsey Coleman Miller
2026-08-04 12:55 ` Fiona Klute via buildroot
2026-08-14 14:07 ` Titouan Christophe via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.