Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF782C3ABBE for ; Tue, 6 May 2025 20:56:48 +0000 (UTC) Subject: [oe] glib-2.0 Introspection Data Question #poky To: openembedded-core@lists.openembedded.org From: "Eric Meyers" X-Originating-Location: Lincolnwood, Illinois, US (73.168.239.54) X-Originating-Platform: Windows Chrome 136 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 06 May 2025 13:56:40 -0700 Message-ID: Content-Type: multipart/alternative; boundary="REKuAZ1ttJ2rkXW3XEtW" List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 06 May 2025 20:56:48 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216083 --REKuAZ1ttJ2rkXW3XEtW Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Was wondering if someone can help me with an issue I'm seeing with my workf= low after upgrading to styhead/master on poky - specifically related to gob= ject-introspection data for the GLib-2.0 recipe. In particular, I see that = the gobject-introspection/glib recipes were updated in this patch/mailing l= ist discussion: https://lists.openembedded.org/g/openembedded-core/topic/105860089 But it is unclear to me if this patch still supports producing native GLib-= 2.0/Gio/GObject .typelib files in a recipe's sysroot? It looks suspect to me that the PACKAGECONFIG for the native class is wiped= in this line: https://github.com/yoctoproject/poky/blob/master/meta/recipes-core/glib-2.0= /glib.inc#L40 Which would lead me to believe that glib-2.0-native does not produce any .t= ypelib files? However, when digging, I noticed that the missing .typelib file existed in = the gobject-introspection-native build directory, but was just not being sh= ipped to the sysroot-destdir. I needed to add the following do_install:appe= nd to gobject-introspection_%.bbappend: do_install:append:class-native() { cp -f ${B}/gir/GLib-2.0.typelib ${D}${RECIPE_SYSROOT_NATIVE}/usr/lib/girepo= sitory-1.0/GLib-2.0.typelib cp -f ${B}/gir/GObject-2.0.typelib ${D}${RECIPE_SYSROOT_NATIVE}/usr/lib/gir= epository-1.0/GObject-2.0.typelib cp -f ${B}/gir/Gio-2.0.typelib ${D}${RECIPE_SYSROOT_NATIVE}/usr/lib/girepos= itory-1.0/Gio-2.0.typelib } (OR this patch will also accomplish similar behavior): gobject-introspection_%.bbappend: SRC_URI:append:class-native =3D " ${@bb.utils.contains('GI_DATA_ENABLED', '= True', 'file://0001-Install-typelib-files-if-native-build.patch', '', d)}" 0001-Install-typelib-files-if-native-build.patch: +--- + gir/meson.build | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gir/meson.build b/gir/meson.build +index e5a7a13..e8100fd 100644 +--- a/gir/meson.build ++++ b/gir/meson.build +@@ -541,6 +541,8 @@ foreach gir: uninstalled_gir_files + =C2=A0 =C2=A0 output: '@BASENAME@.typelib', + =C2=A0 =C2=A0 depends: [gobject_gir, gircompiler, ], + =C2=A0 =C2=A0 command: gircompiler_command, ++ =C2=A0 =C2=A0install: true, ++ =C2=A0 =C2=A0install_dir: typelibdir, + =C2=A0 ) + endforeach I'm hesitant to submit either patch due to the fear that I'm (1) missing so= mething/not understanding something right and (2) doing something completel= y wrong. I've verified that GI_DATA_ENABLED is set to True on my system, according t= o this page: https://docs.yoctoproject.org/dev/dev-manual/gobject-introspection.html And I've tried to remove the PACKAGECONFIG:class-native =3D "" line in glib= .inc without any luck - this just introduces a bunch of circular dependenci= es. For context, we are running with a workflow that executes python unit tests= on the native host environment and these *.typelib files are required for = certain functionality. Ideally, we would migrate to ptest which would probably solve this issue, b= ut this unfortunately isn't an option at the time for us due to the integra= tion effort it would require. Any help is appreciated in advance. Thanks! --REKuAZ1ttJ2rkXW3XEtW Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
Was wondering if someone can help me with an issue I'm seeing with my = workflow after upgrading to styhead/master on poky - specifically related t= o gobject-introspection data for the GLib-2.0 recipe. In particular, I see = that the gobject-introspection/glib recipes were updated in this patch/mail= ing list discussion: 
 
 
But it is unclear to me if this patch still supports producing nat= ive GLib-2.0/Gio/GObject .typelib files in a recipe's sysroot?
 
It looks suspect to me that the PACKAGECONFIG for the native class is = wiped in this line: 
 
 
Which would lead me to believe that glib-2.0-native does not produce a= ny .typelib files?
 
However, when digging, I noticed that the missing .typelib file existe= d in the gobject-introspection-native build directory, but was just not bei= ng shipped to the sysroot-destdir. I needed to add the following do_install= :append to gobject-introspection_%.bbappend: 
 
do_install:append:class-native() {
        cp= -f ${B}/gir/GLib-2.0.typelib ${D}${RECIPE_SYSROOT_NATIVE}/usr/lib/gireposi= tory-1.0/GLib-2.0.typelib
        cp -f ${B}/gir/G= Object-2.0.typelib ${D}${RECIPE_SYSROOT_NATIVE}/usr/lib/girepository-1.0/GO= bject-2.0.typelib
        cp -f ${B}/gir/Gio-2.0.t= ypelib ${D}${RECIPE_SYSROOT_NATIVE}/usr/lib/girepository-1.0/Gio-2.0.typeli= b
} 
 
(OR this patch will also accomplish similar behavior): <= /div>
 
gobject-introspection_%.bbappend: 
 
SRC_URI:append:class-native =3D " ${@bb.utils.contains('GI_DATA_ENABLE= D', 'True', 'file://0001-Install-typelib-files-if-native-build.patch', '', = d)}"
 
0001-Install-typelib-files-if-native-build.patch:
+---
+ gir= /meson.build | 2 ++
+ 1 file changed, 2 insertions(+)
+
+dif= f --git a/gir/meson.build b/gir/meson.build
+index e5a7a13..e8100fd 10= 0644
+--- a/gir/meson.build
++++ b/gir/meson.build
+@@ -541,= 6 +541,8 @@ foreach gir: uninstalled_gir_files
+     output:= '@BASENAME@.typelib',
+     depends: [gobject_gir, gircompi= ler, ],
+     command: gircompiler_command,
++   &= nbsp;install: true,
++    install_dir: typelibdir,
+ &n= bsp; )
+ endforeach
 
I'm hesitant to submit either patch due to the fear that I'm (1) missi= ng something/not understanding something right and (2) doing something comp= letely wrong. 
 
I've verified that GI_DATA_ENABLED is set to True on my system, accord= ing to this page: 
 
 
And I've tried to remove the PACKAGECONFIG:class-native =3D "" line in= glib.inc without any luck - this just introduces a bunch of circular depen= dencies.  
 
For context, we are running with a workflow that executes python unit = tests on the native host environment and these *.typelib files are required= for certain functionality.
 
Ideally, we would migrate to ptest which would probably solve this iss= ue, but this unfortunately isn't an option at the time for us due to the in= tegration effort it would require. 
 
Any help is appreciated in advance.
 
Thanks!
--REKuAZ1ttJ2rkXW3XEtW--