Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>,
	Adam Duskett <aduskett@gmail.com>
Cc: Olivier Schonken <olivier.schonken@gmail.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2, 1/1] package/poppler: fix introspection build
Date: Sat, 15 Apr 2023 23:29:33 +0200	[thread overview]
Message-ID: <20230415212933.GU2819@scaer> (raw)
In-Reply-To: <20220812101718.47491-1-fontaine.fabrice@gmail.com>

Fabrice, All,

+Adam for your insight in GOI

On 2022-08-12 12:17 +0200, Fabrice Fontaine spake thusly:
> Fix the following build failure raised since commit
> 9d1d4818c39d97ad7a1cdf6e075b9acae6dfff71:
> 
> [ 98%] Generating Poppler-0.18.typelib
> Could not find GIR file 'GObject-2.0.gir'; check XDG_DATA_DIRS or use --includedir
> error parsing file /home/giuliobenetti/autobuild/run/instance-1/output-1/build/poppler-21.12.0/glib/Poppler-0.18.gir: Failed to parse included gir GObject-2.0
> If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help.
> Typically like this: PKG_MAKE_ENV += GIR_EXTRA_LIBS_PATH="$(@D)/.libs"
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/d2f50aa56410c2fff8a0538c57038104906e747e
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Sorry for the long delay, I had a look tonight...

I could not find the underlying reason why g-ir-compiler (through our
wrapper) could not find the directory with all the gir files.

Given that poppler is so far the only affect package, and since your
patch was accepted upstream, I think it is only reasonable that we do
indeed use this change. So..

Applied to master, thanks.

However, I would really like to understand why we don't have more
packages that are broken. Is it because poppler is the only one with
include directives in his gir file, which means it needs access to the
installed gir files from other packages (those from goi)?

Or is it because it is the only one that already passes an explicit
--includedir option to g-ir-compiler, and that disables searching the
standard directory?

As Thomas also suggested, should we be doing that systematically in our
g-ir-compiler wrapper?

I know Adam said your change was "the simplest solution to the problem".
Still, this is not very satisfying...

Regards,
Yann E. MORIN.

> ---
> Changes v1 -> v2:
>  - Rebase on top of master
>  - Use upstream commit
> 
>  ...txt-allow-the-user-to-configure-INTR.patch | 43 +++++++++++++++++++
>  package/poppler/poppler.mk                    |  3 +-
>  2 files changed, 45 insertions(+), 1 deletion(-)
>  create mode 100644 package/poppler/0002-glib-CMakeLists.txt-allow-the-user-to-configure-INTR.patch
> 
> diff --git a/package/poppler/0002-glib-CMakeLists.txt-allow-the-user-to-configure-INTR.patch b/package/poppler/0002-glib-CMakeLists.txt-allow-the-user-to-configure-INTR.patch
> new file mode 100644
> index 0000000000..079cf7234d
> --- /dev/null
> +++ b/package/poppler/0002-glib-CMakeLists.txt-allow-the-user-to-configure-INTR.patch
> @@ -0,0 +1,43 @@
> +From e9d5731ba254f35e2d94b628c51e48c50a945271 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Mon, 24 Jan 2022 09:28:20 +0100
> +Subject: [PATCH] glib/CMakeLists.txt: allow the user to configure
> + INTROSPECTION_COMPILER_ARGS
> +
> +Allow the user to add its own parameters such as
> +--includedir=$(STAGING_DIR)/usr/share/gir-1.0 to
> +INTROSPECTION_COMPILER_ARGS to avoid the following build failure when
> +cross-compiling with buildroot:
> +
> +[ 98%] Generating Poppler-0.18.typelib
> +Could not find GIR file 'GObject-2.0.gir'; check XDG_DATA_DIRS or use --includedir
> +error parsing file /home/giuliobenetti/autobuild/run/instance-1/output-1/build/poppler-21.12.0/glib/Poppler-0.18.gir: Failed to parse included gir GObject-2.0
> +If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help.
> +Typically like this: PKG_MAKE_ENV += GIR_EXTRA_LIBS_PATH="$(@D)/.libs"
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/d2f50aa56410c2fff8a0538c57038104906e747e
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Retrieved from:
> +https://gitlab.freedesktop.org/poppler/poppler/-/commit/e9d5731ba254f35e2d94b628c51e48c50a945271]
> +---
> + glib/CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
> +index 7510e69ee..f5130e3c9 100644
> +--- a/glib/CMakeLists.txt
> ++++ b/glib/CMakeLists.txt
> +@@ -119,7 +119,7 @@ if (HAVE_INTROSPECTION AND BUILD_SHARED_LIBS)
> +   # General gir: Reset object-list for introspection & load tool args
> +   set(INTROSPECTION_GIRS)
> +   set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}" "--warn-all")
> +-  set(INTROSPECTION_COMPILER_ARGS "--includedir=${CMAKE_CURRENT_SOURCE_DIR}")
> ++  set(INTROSPECTION_COMPILER_ARGS ${INTROSPECTION_COMPILER_ARGS} "--includedir=${CMAKE_CURRENT_SOURCE_DIR}")
> + 
> +   # Poppler: Assign package to gir & export keys
> +   set(Poppler_0_18_gir "poppler-glib")
> +-- 
> +GitLab
> +
> diff --git a/package/poppler/poppler.mk b/package/poppler/poppler.mk
> index b54262e7c4..db6da25d39 100644
> --- a/package/poppler/poppler.mk
> +++ b/package/poppler/poppler.mk
> @@ -47,7 +47,8 @@ POPPLER_DEPENDENCIES += gobject-introspection
>  POPPLER_CONF_OPTS += \
>  	-DENABLE_GOBJECT_INTROSPECTION=ON \
>  	-DINTROSPECTION_SCANNER=$(STAGING_DIR)/usr/bin/g-ir-scanner \
> -	-DINTROSPECTION_COMPILER=$(STAGING_DIR)/usr/bin/g-ir-compiler
> +	-DINTROSPECTION_COMPILER=$(STAGING_DIR)/usr/bin/g-ir-compiler \
> +	-DINTROSPECTION_COMPILER_ARGS="--includedir=$(STAGING_DIR)/usr/share/gir-1.0"
>  else
>  POPPLER_CONF_OPTS += -DENABLE_GOBJECT_INTROSPECTION=OFF
>  endif
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-04-15 21:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 10:17 [Buildroot] [PATCH v2, 1/1] package/poppler: fix introspection build Fabrice Fontaine
2022-08-14 10:37 ` Thomas Petazzoni via buildroot
2022-08-20  9:28   ` Thomas Petazzoni via buildroot
2022-09-21 17:38     ` Adam Duskett
2022-09-21 20:41       ` Fabrice Fontaine
2022-09-27 18:33         ` Adam Duskett
2023-04-15 21:29 ` Yann E. MORIN [this message]
2023-04-16  2:44   ` James Hilliard
2023-04-16  8:25     ` Yann E. MORIN
2023-04-16 11:16       ` Yann E. MORIN
2023-04-18  8:03         ` James Hilliard
2023-04-18 17:44           ` Yann E. MORIN
2023-04-18 21:58             ` James Hilliard
2023-04-19 19:50               ` Yann E. MORIN

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=20230415212933.GU2819@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=aduskett@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=fontaine.fabrice@gmail.com \
    --cc=olivier.schonken@gmail.com \
    /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