Skip to contentSkip to conversation

librsvg: Only enable the Vala bindings if GObject Introspection is enabled

PATCH Superseded Peter Kjellerstedt 4 participants 9 messages Jan 18, 2023 – Jan 20, 2023 1 message not in the archive

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 librsvg: Only enable the Vala bindings if GObject Introspection is enabled

This avoids the following error:

configure: error: Vala bindings require GObject Introspection

---
 meta/recipes-gnome/librsvg/librsvg_2.54.5.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/recipes-gnome/librsvg/librsvg_2.54.5.bb +2 -3
index b2e93a2684..c55aa250e9 100644
@@ -42,8 +42,6 @@ do_configure[postfuncs] += "cargo_common_do_configure"
 
 inherit rust-target-config
 
-EXTRA_OECONF:class-target = "--enable-vala"
-
 # rust-cross writes the target linker binary into target json definition without any flags.
 # This breaks here because the linker isn't going to work without at least knowing where
 # the sysroot is. So copy the json to workdir, and patch in the path to wrapper from rust class
@@ -57,9 +55,10 @@ CVE_CHECK_IGNORE += "CVE-2018-1000041"
 
 CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
 
-PACKAGECONFIG ??= "gdkpixbuf"
+PACKAGECONFIG ??= "gdkpixbuf ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'vala', '', d)}"
 # The gdk-pixbuf loader
 PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
+PACKAGECONFIG[vala] = "--enable-vala,--disable-vala"
 
 do_install:append() {
 	# Loadable modules don't need .a or .la on Linux
#1 lore raw

Hi Peter,

Peter Kjellerstedt <[email protected]> escreveu no dia quarta, 18/01/2023 à(s) 11:28:

Quoted 33 lines

This avoids the following error:

configure: error: Vala bindings require GObject Introspection

---
 meta/recipes-gnome/librsvg/librsvg_2.54.5.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/recipes-gnome/librsvg/librsvg_2.54.5.bb +0 -2
index b2e93a2684..c55aa250e9 100644
@@ -42,8 +42,6 @@ do_configure[postfuncs] += "cargo_common_do_configure"
 
 inherit rust-target-config
 
-EXTRA_OECONF:class-target = "--enable-vala"
-
 # rust-cross writes the target linker binary into target json definition

without any flags.
# This breaks here because the linker isn't going to work without at
least knowing where

 # the sysroot is. So copy the json to workdir, and patch in the path to
wrapper from rust class
meta/recipes-gnome/librsvg/librsvg_2.54.5.bb +0 -0
@@ -57,9 +55,10 @@ CVE_CHECK_IGNORE += "CVE-2018-1000041"
 
 CACHED_CONFIGUREVARS =

"ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"

meta/recipes-gnome/librsvg/librsvg_2.54.5.bb +1 -1
-PACKAGECONFIG ??= "gdkpixbuf"
+PACKAGECONFIG ??= "gdkpixbuf ${@bb.utils.contains('GI_DATA_ENABLED',
Quoted 6 lines

'True', 'vala', '', d)}"
# The gdk-pixbuf loader
PACKAGECONFIG[gdkpixbuf] =
"--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native" +PACKAGECONFIG[vala] = "--enable-vala,--disable-vala"

This will be enabled in the native builds too and before it is only defined for target.

Jose

Quoted 15 lines

do_install:append() {
# Loadable modules don't need .a or .la on Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#176086):
https://lists.openembedded.org/g/openembedded-core/message/176086
Mute This Topic: https://lists.openembedded.org/mt/96351645/5052612
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Best regards,

José Quaresma
#2 lore raw

gobject-instrospection is not enabled by default in DISTRO_FEATURES_NATIVE and DISTRO_FEATURES_NATIVESDK so unless you explicitly enable it yourself (which seems unlikely to me), it will not be enabled in the native/nativesdk cases.

//Peter

From: Jose Quaresma <[email protected]>
Sent: den 18 januari 2023 13:13
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core] [PATCH] librsvg: Only enable the Vala bindings if GObject Introspection is enabled

Hi Peter,

Peter Kjellerstedt <[email protected]<mailto:[email protected]>> escreveu no dia quarta, 18/01/2023 à(s) 11:28:
This avoids the following error:

configure: error: Vala bindings require GObject Introspection

---
 meta/recipes-gnome/librsvg/librsvg_2.54.5.bb<http://librsvg_2.54.5.bb> | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/recipes-gnome/librsvg/librsvg_2.54.5.bb<http://librsvg_2.54.5.bb> +2 -3
index b2e93a2684..c55aa250e9 100644
@@ -42,8 +42,6 @@ do_configure[postfuncs] += "cargo_common_do_configure"
 
 inherit rust-target-config
 
-EXTRA_OECONF:class-target = "--enable-vala"
-
 # rust-cross writes the target linker binary into target json definition without any flags.
 # This breaks here because the linker isn't going to work without at least knowing where
 # the sysroot is. So copy the json to workdir, and patch in the path to wrapper from rust class
@@ -57,9 +55,10 @@ CVE_CHECK_IGNORE += "CVE-2018-1000041"
 
 CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
 
-PACKAGECONFIG ??= "gdkpixbuf"
+PACKAGECONFIG ??= "gdkpixbuf ${@bb.utils.contains('GI_DATA_ENABLED<mailto:$%[email protected]('GI_DATA_ENABLED>', 'True', 'vala', '', d)}"
 # The gdk-pixbuf loader
 PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
+PACKAGECONFIG[vala] = "--enable-vala,--disable-vala"
 

This will be enabled in the native builds too and before it is only defined for target.

Jose

do_install:append() {
# Loadable modules don't need .a or .la on Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176086): https://lists.openembedded.org/g/openembedded-core/message/176086
Mute This Topic: https://lists.openembedded.org/mt/96351645/5052612
Group Owner: [email protected]<mailto:openembedded-core%[email protected]>
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]<mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-

--
Best regards,

José Quaresma

#3 lore raw

Peter Kjellerstedt <[email protected]> escreveu no dia quarta, 18/01/2023 à(s) 14:44:

Quoted 5 lines

gobject-instrospection is not enabled by default in DISTRO_FEATURES_NATIVE and DISTRO_FEATURES_NATIVESDK so unless you explicitly enable it yourself (which seems unlikely to me), it will not be enabled in the native/nativesdk cases.

Right, makes sense.
Thanks for explaining.

Jose

Quoted 96 lines

//Peter

*From:* Jose Quaresma <[email protected]>
*Sent:* den 18 januari 2023 13:13
*To:* Peter Kjellerstedt <[email protected]>
*Cc:* [email protected]
*Subject:* Re: [OE-core] [PATCH] librsvg: Only enable the Vala bindings if GObject Introspection is enabled

Hi Peter,

Peter Kjellerstedt <[email protected]> escreveu no dia quarta, 18/01/2023 à(s) 11:28:

This avoids the following error:

configure: error: Vala bindings require GObject Introspection

---
 meta/recipes-gnome/librsvg/librsvg_2.54.5.bb | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
meta/recipes-gnome/librsvg/librsvg_2.54.5.bb +0 -2
index b2e93a2684..c55aa250e9 100644
@@ -42,8 +42,6 @@ do_configure[postfuncs] += "cargo_common_do_configure"
 
 inherit rust-target-config
 
-EXTRA_OECONF:class-target = "--enable-vala"
-
 # rust-cross writes the target linker binary into target json definition

without any flags.
# This breaks here because the linker isn't going to work without at
least knowing where

 # the sysroot is. So copy the json to workdir, and patch in the path to
wrapper from rust class
meta/recipes-gnome/librsvg/librsvg_2.54.5.bb +0 -0
@@ -57,9 +55,10 @@ CVE_CHECK_IGNORE += "CVE-2018-1000041"
 
 CACHED_CONFIGUREVARS =

"ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"

meta/recipes-gnome/librsvg/librsvg_2.54.5.bb +1 -1
-PACKAGECONFIG ??= "gdkpixbuf"
+PACKAGECONFIG ??= "gdkpixbuf ${@bb.utils.contains('GI_DATA_ENABLED',

'True', 'vala', '', d)}"
# The gdk-pixbuf loader
PACKAGECONFIG[gdkpixbuf] =
"--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native" +PACKAGECONFIG[vala] = "--enable-vala,--disable-vala"

This will be enabled in the native builds too and before it is only defined for target.

Jose

do_install:append() {
# Loadable modules don't need .a or .la on Linux

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#176086):
https://lists.openembedded.org/g/openembedded-core/message/176086
Mute This Topic: https://lists.openembedded.org/mt/96351645/5052612
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--

Best regards,

José Quaresma

Signature · 3 lines
Best regards,

José Quaresma
#4 lore raw
In reply to Peter Kjellerstedt

Hello Peter,

Quoted 5 lines · On Wed, 18 Jan 2023 12:27:59 +0100 "Peter Kjellerstedt"…

This avoids the following error:

configure: error: Vala bindings require GObject Introspection

A different patch [0] to address the same bug is already in my testing branch and is possibly being merged soon on master by Richard. Can you please check whether your think your patch is better and let us know?

[0]
https://git.openembedded.org/openembedded-core-contrib/commit/?h=lucaceresoli/master-next-success&id=e9e761146b52658c06aae150332db666ce2f25a8

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw
Quoted 16 lines

-----Original Message-----
From: Luca Ceresoli <[email protected]>
Sent: den 18 januari 2023 17:22
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]; Richard Purdie <[email protected]>
Subject: Re: [OE-core] [PATCH] librsvg: Only enable the Vala bindings if GObject Introspection is enabled

Hello Peter,

Quoted 2 lines · On Wed, 18 Jan 2023 12:27:59 +0100 "Peter Kjellerstedt"…

This avoids the following error:

Quoted 7 lines
Quoted 3 lines

configure: error: Vala bindings require GObject Introspection

A different patch [0] to address the same bug is already in my testing branch and is possibly being merged soon on master by Richard. Can you please check whether your think your patch is better and let us know?

I had not seen that patch when I sent mine. I think mine is a little better since it defines and uses a PACKAGECONFIG for the vala support, which should make it easier for anyone wanting to, e.g., disable the vala support even if it is enabled by default.

Quoted 7 lines

[0] https://git.openembedded.org/openembedded-core-contrib/commit/?h=lucaceresoli/master-next-success&id=e9e761146b52658c06aae150332db666ce2f25a8

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

//Peter

#6 lore raw

Hello Peter,

Quoted 20 lines · On Wed, 18 Jan 2023 22:22:22 +0000 "Peter Kjellerstedt"…
Quoted 20 lines

-----Original Message-----
From: Luca Ceresoli <[email protected]>
Sent: den 18 januari 2023 17:22
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]; Richard Purdie <[email protected]>
Subject: Re: [OE-core] [PATCH] librsvg: Only enable the Vala bindings if GObject Introspection is enabled

Hello Peter,

Quoted 5 lines · On Wed, 18 Jan 2023 12:27:59 +0100 "Peter Kjellerstedt"…

This avoids the following error:

configure: error: Vala bindings require GObject Introspection

Quoted 8 lines
Quoted 3 lines

A different patch [0] to address the same bug is already in my testing branch and is possibly being merged soon on master by Richard. Can you please check whether your think your patch is better and let us know?

I had not seen that patch when I sent mine. I think mine is a little better since it defines and uses a PACKAGECONFIG for the vala support, which should make it easier for anyone wanting to, e.g., disable the vala support even if it is enabled by default.

Indeed. I'm replacing Alex's patch with yours in my testing branch in order to have both tested. None is on master at the moment.

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

Hi Peter,

Quoted 29 lines · On Thu, 19 Jan 2023 10:29:26 +0100 "Luca Ceresoli via lists.openembedded.org"…

Hello Peter,

Quoted 24 lines · On Wed, 18 Jan 2023 22:22:22 +0000 "Peter Kjellerstedt"…
Quoted 23 lines

-----Original Message-----
From: Luca Ceresoli <[email protected]>
Sent: den 18 januari 2023 17:22
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]; Richard Purdie <[email protected]>
Subject: Re: [OE-core] [PATCH] librsvg: Only enable the Vala bindings if GObject Introspection is enabled

Hello Peter,

Quoted 5 lines · On Wed, 18 Jan 2023 12:27:59 +0100 "Peter Kjellerstedt"…

This avoids the following error:

configure: error: Vala bindings require GObject Introspection

A different patch [0] to address the same bug is already in my testing branch and is possibly being merged soon on master by Richard. Can you please check whether your think your patch is better and let us know?

Quoted 8 lines
Quoted 4 lines

I had not seen that patch when I sent mine. I think mine is a little better since it defines and uses a PACKAGECONFIG for the vala support, which should make it easier for anyone wanting to, e.g., disable the vala support even if it is enabled by default.

Indeed. I'm replacing Alex's patch with yours in my testing branch in order to have both tested. None is on master at the moment.

I'm afraid testing with this patch applied caused lots of autobuilder failures:

https://autobuilder.yoctoproject.org/typhoon/#/builders/62/builds/6553/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/6551/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/6443/steps/12/logs/stdio
...and more

So I removed it from my testing branch and got the patch by Alex again. You'd be welcome to send a fixed version of your patch.

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#9 lore raw
Quoted 58 lines

-----Original Message-----
From: Luca Ceresoli <[email protected]>
Sent: den 20 januari 2023 00:09
To: Luca Ceresoli via lists.openembedded.org <[email protected]>
Cc: [email protected]; Peter Kjellerstedt <[email protected]>; [email protected]; Richard Purdie <[email protected]>
Subject: Re: [OE-core] [PATCH] librsvg: Only enable the Vala bindings if GObject Introspection is enabled

Hi Peter,

Quoted 12 lines · On Thu, 19 Jan 2023 10:29:26 +0100 "Luca Ceresoli via lists.openembedded.org"…

Hello Peter,

Quoted 7 lines · On Wed, 18 Jan 2023 22:22:22 +0000 "Peter Kjellerstedt"…
Quoted 7 lines

-----Original Message-----
From: Luca Ceresoli <[email protected]>
Sent: den 18 januari 2023 17:22
To: Peter Kjellerstedt <[email protected]>
Cc: [email protected]; Richard Purdie <[email protected]>
Subject: Re: [OE-core] [PATCH] librsvg: Only enable the Vala

bindings if

Quoted 17 lines
Quoted 17 lines
Quoted 16 lines

GObject Introspection is enabled

Hello Peter,

Quoted 5 lines · On Wed, 18 Jan 2023 12:27:59 +0100 "Peter Kjellerstedt"…

This avoids the following error:

configure: error: Vala bindings require GObject Introspection

A different patch [0] to address the same bug is already in my testing branch and is possibly being merged soon on master by Richard. Can you please check whether your think your patch is better and let us know?

Quoted 7 lines
Quoted 4 lines

I had not seen that patch when I sent mine. I think mine is a little better since it defines and uses a PACKAGECONFIG for the vala support, which should make it easier for anyone wanting to, e.g., disable the vala support even if it is enabled by default.

Indeed. I'm replacing Alex's patch with yours in my testing branch in order to have both tested. None is on master at the moment.

I'm afraid testing with this patch applied caused lots of autobuilder failures:

Quoted 7 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/62/builds/6553/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/6551/steps/11/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/52/builds/6443/steps/12/logs/stdio
...and more

So I removed it from my testing branch and got the patch by Alex again. You'd be welcome to send a fixed version of your patch.

Meh. After having taken a closer look at gobject-introspection.bbclass, it appears it only adds --enable-introspection for target, so my patch needs to do the same. I'll send a v2.

Quoted 5 lines

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

//Peter