Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2, 1/1] package/poppler: fix introspection build
@ 2022-08-12 10:17 Fabrice Fontaine
  2022-08-14 10:37 ` Thomas Petazzoni via buildroot
  2023-04-15 21:29 ` Yann E. MORIN
  0 siblings, 2 replies; 14+ messages in thread
From: Fabrice Fontaine @ 2022-08-12 10:17 UTC (permalink / raw)
  To: buildroot; +Cc: Olivier Schonken, Fabrice Fontaine

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>
---
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

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

end of thread, other threads:[~2023-04-19 19:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox