All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] gobject-introspection: fix default search path for girdir
@ 2021-08-02  6:25 Chen Qi
  2021-08-02 12:57 ` Alexander Kanavin
  0 siblings, 1 reply; 5+ messages in thread
From: Chen Qi @ 2021-08-02  6:25 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 ...-ir-tool-template.in-fix-girdir-path.patch | 33 +++++++++++++++++++
 .../gobject-introspection_1.68.0.bb           |  1 +
 2 files changed, 34 insertions(+)
 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..c0d263946b
--- /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: Pending
+
+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.68.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.68.0.bb
index 048deabe64..647511f7ad 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.68.0.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.68.0.bb
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \
 
 SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \
            file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \
+           file://0001-g-ir-tool-template.in-fix-girdir-path.patch \
            "
 
 SRC_URI[sha256sum] = "d229242481a201b84a0c66716de1752bca41db4133672cfcfb37c93eb6e54a27"
-- 
2.30.2


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

* Re: [OE-core][PATCH] gobject-introspection: fix default search path for girdir
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2021-08-02 12:57 UTC (permalink / raw)
  To: Chen Qi; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 3643 bytes --]

The concerns are the same as the previous time this patch was submitted:

This is not seen in the autobuilder, how can it be reproduced?

Also, please submit upstream first.


Alex

On Mon, 2 Aug 2021 at 08:25, Chen Qi <Qi.Chen@windriver.com> wrote:

> 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.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  ...-ir-tool-template.in-fix-girdir-path.patch | 33 +++++++++++++++++++
>  .../gobject-introspection_1.68.0.bb           |  1 +
>  2 files changed, 34 insertions(+)
>  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..c0d263946b
> --- /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: Pending
> +
> +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.68.0.bb
> b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.68.0.bb
> index 048deabe64..647511f7ad 100644
> --- a/meta/recipes-gnome/gobject-introspection/
> gobject-introspection_1.68.0.bb
> +++ b/meta/recipes-gnome/gobject-introspection/
> gobject-introspection_1.68.0.bb
> @@ -15,6 +15,7 @@ LIC_FILES_CHKSUM =
> "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \
>
>  SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}",
> 2)}/${BPN}-${PV}.tar.xz \
>
> file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \
> +           file://0001-g-ir-tool-template.in-fix-girdir-path.patch \
>             "
>
>  SRC_URI[sha256sum] =
> "d229242481a201b84a0c66716de1752bca41db4133672cfcfb37c93eb6e54a27"
> --
> 2.30.2
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 5596 bytes --]

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

* Re: [OE-core][PATCH] gobject-introspection: fix default search path for girdir
  2021-08-02 12:57 ` Alexander Kanavin
@ 2021-08-03  4:51   ` Chen Qi
  2021-08-03  9:34     ` Alexander Kanavin
  0 siblings, 1 reply; 5+ messages in thread
From: Chen Qi @ 2021-08-03  4:51 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 5907 bytes --]

I didn't notice the previous email.
The reason that it's not seen on autobuilder is that it's runtime error.
At build time, it uses a wrapper which adds extra parameters including the correct path. That's why we didn't see any error at build time.

Regards,
Qi
________________________________
From: Alexander Kanavin <alex.kanavin@gmail.com>
Sent: Monday, August 2, 2021 20:57
To: Chen, Qi <Qi.Chen@windriver.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][PATCH] gobject-introspection: fix default search path for girdir

The concerns are the same as the previous time this patch was submitted:

This is not seen in the autobuilder, how can it be reproduced?

Also, please submit upstream first.


Alex

On Mon, 2 Aug 2021 at 08:25, Chen Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>> wrote:
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<https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$> is not setting girdir correctly.
It's using the prefix instead of the actual girdir.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>>
---
 ...-ir-tool-template.in-fix-girdir-path.patch | 33 +++++++++++++++++++
 .../gobject-introspection_1.68.0.bb<https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$>           |  1 +
 2 files changed, 34 insertions(+)
 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..c0d263946b
--- /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<mailto:Qi.Chen@windriver.com>>
+Date: Tue, 13 Jul 2021 02:05:11 -0700
+Subject: [PATCH] g-ir-tool-template.in<https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>: 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: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>>
+---
+ tools/g-ir-tool-template.in<https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$> | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/g-ir-tool-template.in<https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$> b/tools/g-ir-tool-template.in<https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>
+index 6e98f52e..62c07c31 100755
+--- a/tools/g-ir-tool-template.in<https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>
++++ b/tools/g-ir-tool-template.in<https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>
+@@ -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.68.0.bb<https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$> b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.68.0.bb<https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$>
index 048deabe64..647511f7ad 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.68.0.bb<https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$>
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.68.0.bb<https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$>
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \

 SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}", 2)}/${BPN}-${PV}.tar.xz \
            file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \
+           file://0001-g-ir-tool-template.in-fix-girdir-path.patch \
            "

 SRC_URI[sha256sum] = "d229242481a201b84a0c66716de1752bca41db4133672cfcfb37c93eb6e54a27"
--
2.30.2





[-- Attachment #2: Type: text/html, Size: 8641 bytes --]

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

* Re: [OE-core][PATCH] gobject-introspection: fix default search path for girdir
  2021-08-03  4:51   ` Chen Qi
@ 2021-08-03  9:34     ` Alexander Kanavin
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Kanavin @ 2021-08-03  9:34 UTC (permalink / raw)
  To: Chen, Qi; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 6503 bytes --]

Can you please provide the steps needed to reproduce the error? Can they be
automated and added to the AB? Otherwise, I cannot meaningfully review the
patch.

Also, the second concern is still not addressed: please submit upstream
first, and include the link to the oe-core submission. It's only a merge
request on gnome gitlab.

Alex

On Tue, 3 Aug 2021 at 06:51, Chen, Qi <Qi.Chen@windriver.com> wrote:

> I didn't notice the previous email.
> The reason that it's not seen on autobuilder is that it's runtime error.
> At build time, it uses a wrapper which adds extra parameters including the
> correct path. That's why we didn't see any error at build time.
>
> Regards,
> Qi
> ------------------------------
> *From:* Alexander Kanavin <alex.kanavin@gmail.com>
> *Sent:* Monday, August 2, 2021 20:57
> *To:* Chen, Qi <Qi.Chen@windriver.com>
> *Cc:* OE-core <openembedded-core@lists.openembedded.org>
> *Subject:* Re: [OE-core][PATCH] gobject-introspection: fix default search
> path for girdir
>
> The concerns are the same as the previous time this patch was submitted:
>
> This is not seen in the autobuilder, how can it be reproduced?
>
> Also, please submit upstream first.
>
>
> Alex
>
> On Mon, 2 Aug 2021 at 08:25, Chen Qi <Qi.Chen@windriver.com> wrote:
>
> 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
> <https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>
> is not setting girdir correctly.
> It's using the prefix instead of the actual girdir.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  ...-ir-tool-template.in-fix-girdir-path.patch | 33 +++++++++++++++++++
>  .../gobject-introspection_1.68.0.bb
> <https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$>
>          |  1 +
>  2 files changed, 34 insertions(+)
>  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..c0d263946b
> --- /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
> <https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>:
> 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: Pending
> +
> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> +---
> + tools/g-ir-tool-template.in
> <https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>
> | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/tools/g-ir-tool-template.in
> <https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>
> b/tools/g-ir-tool-template.in
> <https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>
> +index 6e98f52e..62c07c31 100755
> +--- a/tools/g-ir-tool-template.in
> <https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>
> ++++ b/tools/g-ir-tool-template.in
> <https://urldefense.com/v3/__http://g-ir-tool-template.in__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVyKRXwDEQ$>
> +@@ -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.68.0.bb
> <https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$>
> b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.68.0.bb
> <https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$>
> index 048deabe64..647511f7ad 100644
> --- a/meta/recipes-gnome/gobject-introspection/
> gobject-introspection_1.68.0.bb
> <https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$>
> +++ b/meta/recipes-gnome/gobject-introspection/
> gobject-introspection_1.68.0.bb
> <https://urldefense.com/v3/__http://gobject-introspection_1.68.0.bb__;!!AjveYdw8EvQ!J_A1otd5YXy92u0Rt13BFCPh2oDkkoD52jcpckk63XwzQq-riVTsPB7qUVzZmyFvTA$>
> @@ -15,6 +15,7 @@ LIC_FILES_CHKSUM =
> "file://COPYING;md5=c434e8128a68bedd59b80b2ac1eb1c4a \
>
>  SRC_URI = "${GNOME_MIRROR}/${BPN}/${@oe.utils.trim_version("${PV}",
> 2)}/${BPN}-${PV}.tar.xz \
>
> file://0001-giscanner-ignore-error-return-codes-from-ldd-wrapper.patch \
> +           file://0001-g-ir-tool-template.in-fix-girdir-path.patch \
>             "
>
>  SRC_URI[sha256sum] =
> "d229242481a201b84a0c66716de1752bca41db4133672cfcfb37c93eb6e54a27"
> --
> 2.30.2
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 9349 bytes --]

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

* [OE-core][PATCH] gobject-introspection: fix default search path for girdir
@ 2022-03-30  3:08 Chen Qi
  0 siblings, 0 replies; 5+ messages in thread
From: Chen Qi @ 2022-03-30  3:08 UTC (permalink / raw)
  To: openembedded-core

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



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

end of thread, other threads:[~2022-03-30  3:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-03-30  3:08 Chen Qi

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.