From: Chen Qi <Qi.Chen@windriver.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][PATCH] gobject-introspection: fix default search path for girdir
Date: Tue, 29 Mar 2022 20:08:45 -0700 [thread overview]
Message-ID: <20220330030845.98674-1-Qi.Chen@windriver.com> (raw)
When running g-ir-scanner, we get the following error:
Couldn't find include 'GObject-2.0.gir' (search path:
'['/usr/lib64', 'gir-1.0', '/usr/local/share/gir-1.0', '/usr/share/gir-1.0',
'/usr/share/gir-1.0', '/usr/share/gir-1.0']')
This is because g-ir-tool-template.in is not setting girdir correctly.
It's using the prefix instead of the actual girdir.
Note that we don't get such error at do_rootfs time because the extra
directories are speicified. But we will get such error at runtime when
multilib is enabled.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
...-ir-tool-template.in-fix-girdir-path.patch | 33 +++++++++++++++++++
.../gobject-introspection_1.72.0.bb | 4 ++-
2 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-g-ir-tool-template.in-fix-girdir-path.patch
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-g-ir-tool-template.in-fix-girdir-path.patch b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-g-ir-tool-template.in-fix-girdir-path.patch
new file mode 100644
index 0000000000..5c78649de4
--- /dev/null
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-g-ir-tool-template.in-fix-girdir-path.patch
@@ -0,0 +1,33 @@
+From b01b448613b76f9acefdfd89ee01686dc7a67df4 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 13 Jul 2021 02:05:11 -0700
+Subject: [PATCH] g-ir-tool-template.in: fix girdir path
+
+In case gir_dir_prefix is set, it's possible that g-ir-scanner
+cannot find the .gir files. This is because that the girdir
+is set to gir_dir_prefix, which is wrong. It's not a prefix,
+it the actual gir dir.
+
+Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/329]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ tools/g-ir-tool-template.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/g-ir-tool-template.in b/tools/g-ir-tool-template.in
+index 6e98f52e..62c07c31 100755
+--- a/tools/g-ir-tool-template.in
++++ b/tools/g-ir-tool-template.in
+@@ -55,7 +55,7 @@ builtins.__dict__['DATADIR'] = datadir
+
+ # Respect gir_dir_prefix
+ girdir = ''
+-girdir = os.path.abspath(os.path.join(filedir, '..', '@gir_dir_prefix@'))
++girdir = os.path.abspath(os.path.join(filedir, '..', '@gir_dir_prefix@', 'gir-1.0'))
+ builtins.__dict__['GIRDIR'] = [girdir]
+
+ # Again, relative paths first so that the installation prefix is relocatable
+--
+2.30.2
+
diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.72.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.72.0.bb
index 39475daf2e..355e77d107 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.72.0.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.72.0.bb
@@ -13,7 +13,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \
file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27 \
"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \
+ file://0001-g-ir-tool-template.in-fix-girdir-path.patch \
+ "
SRC_URI[sha256sum] = "02fe8e590861d88f83060dd39cda5ccaa60b2da1d21d0f95499301b186beaabc"
--
2.33.0
next reply other threads:[~2022-03-30 3:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 3:08 Chen Qi [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-08-02 6:25 [OE-core][PATCH] gobject-introspection: fix default search path for girdir Chen Qi
2021-08-02 12:57 ` Alexander Kanavin
2021-08-03 4:51 ` Chen Qi
2021-08-03 9:34 ` Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220330030845.98674-1-Qi.Chen@windriver.com \
--to=qi.chen@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox