Skip to contentSkip to conversation

gobject-introspection: new series

PATCH Superseded Adam Duskett 5 participants 15 messages Mar 18, 2018 – Mar 26, 2018 Kbuild

v5 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

v5 cover gobject-introspection: new series

For official submission to mainline Buildroot:

This new series has the following upgrades:
- It now works on all architectures supported by qemu-host.
- Gstreamer1 can now compile gir files properly. (for real this time).
- General makefile cleanups.
- New patches that make cross-compiling a bit nicer (thanks, yocto!)
- Removed a patch that was yocto specific and not needed with buildroot.
- Added a PKG_GIR_EXTRA_LIBS variable in pkg-autotools.mk

What I could use help with:

- Package updates: I will get around to updating python-gobject as it's needed for GStreamer-python (the entire reason I started this venture)
- Comments on the patches themselves would also be appreciated!.
- More testing!

Thanks!

Adam Duskett

Adam Duskett (5):
qemu-host: remove support for some powerpc processors.
qemu: add qemu_user_opts
gstreamer1 packages: explicitly disable introspection
gobject-introspection: new package
gstreamer1 packages: add support for introspection

 DEVELOPERS                                         |   1 +
 Makefile                                           |   2 +
 package/Config.in                                  |   1 +
 ...ncomplete-upstream-attempt-at-cross-compi.patch |  50 +++
 ...c-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch | 203 ++++++++++++
 ...3-giscanner-add-use-binary-wrapper-option.patch |  52 +++
 ...04-giscanner-add-a-use-ldd-wrapper-option.patch |  48 +++
 .../0005-add-PYTHON_INCLUDES-override.patch        |  39 +++
 ...06-giscanner-add-a-lib-dirs-envvar-option.patch |  73 +++++
 .../0007-Add-rpath-links-to-ccompiler.patch        |  29 ++
 .../gobject-introspection/0008-add-Float128.patch  |  28 ++
 package/gobject-introspection/Config.in            |  30 ++
 package/gobject-introspection/cross-ldd            | 362 +++++++++++++++++++++
 package/gobject-introspection/g-ir-compiler.in     |   2 +
 .../g-ir-scanner-lddwrapper.in                     |   2 +
 .../g-ir-scanner-qemuwrapper.in                    |  10 +
 package/gobject-introspection/g-ir-scanner.in      |   3 +
 .../gobject-introspection.hash                     |   4 +
 .../gobject-introspection/gobject-introspection.mk |  90 +++++
 .../gst1-plugins-bad/gst1-plugins-bad.mk           |   8 +-
 ...ncorrect-reference-to-gstreamer-sdp-in-Ma.patch |  28 ++
 .../gst1-plugins-base/gst1-plugins-base.mk         |   8 +-
 package/gstreamer1/gstreamer1/gstreamer1.mk        |   7 +
 package/pkg-autotools.mk                           |   3 +
 package/qemu/Config.in.host                        |   1 +
 package/qemu/qemu.mk                               |  33 +-
 26 files changed, 1114 insertions(+), 3 deletions(-)
 create mode 100644 package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
 create mode 100644 package/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
 create mode 100644 package/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
 create mode 100644 package/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
 create mode 100644 package/gobject-introspection/0005-add-PYTHON_INCLUDES-override.patch
 create mode 100644 package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch
 create mode 100644 package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch
 create mode 100644 package/gobject-introspection/0008-add-Float128.patch
 create mode 100644 package/gobject-introspection/Config.in
 create mode 100644 package/gobject-introspection/cross-ldd
 create mode 100644 package/gobject-introspection/g-ir-compiler.in
 create mode 100644 package/gobject-introspection/g-ir-scanner-lddwrapper.in
 create mode 100644 package/gobject-introspection/g-ir-scanner-qemuwrapper.in
 create mode 100644 package/gobject-introspection/g-ir-scanner.in
 create mode 100644 package/gobject-introspection/gobject-introspection.hash
 create mode 100644 package/gobject-introspection/gobject-introspection.mk
 create mode 100644 package/gstreamer1/gst1-plugins-base/0001-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
Signature · 1 line
2.14.3
#1 lore raw

PATCH v5 1/5 qemu-host: remove support for some powerpc processors.

The 620, 630, and 970 are not supported at this time by qemu.

---
Changes v1 -> v4:
- Add patch to series.

Changes v4 -> v5:
- Seperate this patch into it's own patch.

 package/qemu/Config.in.host | 1 +
 1 file changed, 1 insertion(+)
package/qemu/Config.in.host +1 -0
index 78fe54a85c..bbc2aa27c5 100644
@@ -6,6 +6,7 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
 		BR2_mips64       || BR2_mips64el    || BR2_powerpc      || \
 		BR2_powerpc64    || BR2_powerpc64le || BR2_sh           || \
 		BR2_sparc        || BR2_x86_64
+		depends on !BR2_powerpc_620 && !BR2_powerpc_630 && !BR2_powerpc_970
 
 config BR2_PACKAGE_HOST_QEMU
 	bool "host qemu"
Signature · 1 line
2.14.3
#2 lore raw

PATCH v5 1/5 qemu-host: remove support for some powerpc processors.

Adma, All,

On 2018-03-18 15:01 -0400, Adam Duskett spake thusly:

Quoted 3 lines

The 620, 630, and 970 are not supported at this time by qemu.

Regards,
Yann E. MORIN.

Quoted 29 lines

---
Changes v1 -> v4:
- Add patch to series.

Changes v4 -> v5:
- Seperate this patch into it's own patch.

 package/qemu/Config.in.host | 1 +
 1 file changed, 1 insertion(+)
package/qemu/Config.in.host +1 -0
index 78fe54a85c..bbc2aa27c5 100644
@@ -6,6 +6,7 @@ config BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
 		BR2_mips64       || BR2_mips64el    || BR2_powerpc      || \
 		BR2_powerpc64    || BR2_powerpc64le || BR2_sh           || \
 		BR2_sparc        || BR2_x86_64
+		depends on !BR2_powerpc_620 && !BR2_powerpc_630 && !BR2_powerpc_970
 
 config BR2_PACKAGE_HOST_QEMU
 	bool "host qemu"
Signature · 6 lines
2.14.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH v5 1/5 qemu-host: remove support for some powerpc processors.

In reply to Adam Duskett

Hello,

Quoted 6 lines · Adam Duskett

The 620, 630, and 970 are not supported at this time by qemu.

---
Changes v1 -> v4:
- Add patch to series.

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH v5 2/5 qemu: add qemu_user_opts

In reply to Adam Duskett

Add a new variable in qemu.mk: QEMU_USER_OPTS. When qemu-$(ARCH) is called, some architectures require a -cpu flag to be passed, or else a segfault may occure when building introspection files.
For PowerPC, many of these cpu's need a specific CPU flag to be passed via the command line.

---
Changes v1 -> v4:
- Add patch to series.

Changes v4 -> v5:
- Change HOST_QEMU_CPU_TUNE to QEMU_USER_OPTS. (Yann)
- Add $(QEMU_USER_OPTS) to end of QEMU_USER (Yann)

 package/qemu/qemu.mk | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)
package/qemu/qemu.mk +32 -1
index 345ef52668..6a0fcabbce 100644
@@ -70,6 +70,37 @@ endif
 ifeq ($(HOST_QEMU_ARCH),sh4aeb)
 HOST_QEMU_ARCH = sh4eb
 endif
+
+# Add cpu specific callouts for qemu.
+# In some cases (e.g. ppc) simply being arch specific (apparently) isn't good
+# enough and a PACKAGE_ARCH specific -cpu option is needed 
+# For others (e.g. arm) a -cpu option is not necessary, since the
+# qemu-arm default CPU supports all required architecture levels.
+ifeq ($(BR2_x86_64),y)
+QEMU_USER_OPTS = -cpu Nehalem,check=false
+endif
+
+# PowerPC architecture. Currently, the 620, 630, and 970 are not supported.
+ifeq ($(BR2_powerpc_e5500),y)
+QEMU_USER_OPTS = -cpu e5500
+endif
+
+ifeq ($(BR2_powerpc_e6500),y)
+QEMU_USER_OPTS = -cpu e6500
+endif
+
+ifeq ($(BR2_powerpc_power7),y)
+QEMU_USER_OPTS = -cpu 7400
+endif
+
+ifeq ($(BR2_powerpc64)$(BR2_powerpc_e5500),yy)
+QEMU_USER_OPTS = -cpu e500mc
+endif
+
+ifeq ($(BR2_powerpc64)$(BR2_powerpc_e6500),yy)
+QEMU_USER_OPTS = -cpu e500mc
+endif
+
 HOST_QEMU_SYS_ARCH ?= $(HOST_QEMU_ARCH)
 
 ifeq ($(BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE),y)
@@ -147,7 +178,7 @@ endef
 $(eval $(host-generic-package))
 
 # variable used by other packages
-QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH)
+QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH) $(QEMU_USER_OPTS)
 
 #-------------------------------------------------------------
 # Target-qemu
Signature · 1 line
2.14.3
#5 lore raw

PATCH v5 2/5 qemu: add qemu_user_opts

Adam, all,

On 2018-03-18 15:01 -0400, Adam Duskett spake thusly:

Quoted 7 lines

Add a new variable in qemu.mk: QEMU_USER_OPTS. When qemu-$(ARCH) is called, some architectures require a -cpu flag to be passed, or else a segfault may occure when building introspection files.
For PowerPC, many of these cpu's need a specific CPU flag to be passed via the command line.

However, see a little comment below...

Quoted 16 lines

---
Changes v1 -> v4:
- Add patch to series.

Changes v4 -> v5:
- Change HOST_QEMU_CPU_TUNE to QEMU_USER_OPTS. (Yann)
- Add $(QEMU_USER_OPTS) to end of QEMU_USER (Yann)

 package/qemu/qemu.mk | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)
package/qemu/qemu.mk +0 -0
index 345ef52668..6a0fcabbce 100644

package/qemu/qemu.mk endif · line 76

Quoted 7 lines
package/qemu/qemu.mk +4 -0
@@ -70,6 +70,37 @@ endif
 ifeq ($(HOST_QEMU_ARCH),sh4aeb)
 HOST_QEMU_ARCH = sh4eb
 endif
+
+# Add cpu specific callouts for qemu.
+# In some cases (e.g. ppc) simply being arch specific (apparently) isn't good
+# enough and a PACKAGE_ARCH specific -cpu option is needed 

What did you meant with "PACKAGE_ARCH"? I guess it's a leftover from the previous iteration, right?

Just removing it looks like the correct phrasing to me, right?

Regards,
Yann E. MORIN.

Quoted 46 lines
package/qemu/qemu.mk +28 -1
+# For others (e.g. arm) a -cpu option is not necessary, since the
+# qemu-arm default CPU supports all required architecture levels.
+ifeq ($(BR2_x86_64),y)
+QEMU_USER_OPTS = -cpu Nehalem,check=false
+endif
+
+# PowerPC architecture. Currently, the 620, 630, and 970 are not supported.
+ifeq ($(BR2_powerpc_e5500),y)
+QEMU_USER_OPTS = -cpu e5500
+endif
+
+ifeq ($(BR2_powerpc_e6500),y)
+QEMU_USER_OPTS = -cpu e6500
+endif
+
+ifeq ($(BR2_powerpc_power7),y)
+QEMU_USER_OPTS = -cpu 7400
+endif
+
+ifeq ($(BR2_powerpc64)$(BR2_powerpc_e5500),yy)
+QEMU_USER_OPTS = -cpu e500mc
+endif
+
+ifeq ($(BR2_powerpc64)$(BR2_powerpc_e6500),yy)
+QEMU_USER_OPTS = -cpu e500mc
+endif
+
 HOST_QEMU_SYS_ARCH ?= $(HOST_QEMU_ARCH)
 
 ifeq ($(BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE),y)
@@ -147,7 +178,7 @@ endef
 $(eval $(host-generic-package))
 
 # variable used by other packages
-QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH)
+QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH) $(QEMU_USER_OPTS)
 
 #-------------------------------------------------------------
 # Target-qemu
Signature · 6 lines
2.14.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH v5 2/5 qemu: add qemu_user_opts

All;

Quoted 42 lines · Yann E. MORIN

Adam, all,

On 2018-03-18 15:01 -0400, Adam Duskett spake thusly:

Quoted 7 lines

Add a new variable in qemu.mk: QEMU_USER_OPTS. When qemu-$(ARCH) is called, some architectures require a -cpu flag to be passed, or else a segfault may occure when building introspection files.
For PowerPC, many of these cpu's need a specific CPU flag to be passed via the command line.

However, see a little comment below...

Quoted 16 lines

---
Changes v1 -> v4:
- Add patch to series.

Changes v4 -> v5:
- Change HOST_QEMU_CPU_TUNE to QEMU_USER_OPTS. (Yann)
- Add $(QEMU_USER_OPTS) to end of QEMU_USER (Yann)

 package/qemu/qemu.mk | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)
package/qemu/qemu.mk +0 -0
index 345ef52668..6a0fcabbce 100644

package/qemu/qemu.mk endif · line 76

Quoted 7 lines
package/qemu/qemu.mk +4 -0
@@ -70,6 +70,37 @@ endif
 ifeq ($(HOST_QEMU_ARCH),sh4aeb)
 HOST_QEMU_ARCH = sh4eb
 endif
+
+# Add cpu specific callouts for qemu.
+# In some cases (e.g. ppc) simply being arch specific (apparently) isn't good
+# enough and a PACKAGE_ARCH specific -cpu option is needed

What did you meant with "PACKAGE_ARCH"? I guess it's a leftover from the previous iteration, right?

Quoted 2 lines

Just removing it looks like the correct phrasing to me, right?

Correct, sorry about that!

Adam

Quoted 57 lines

Regards,
Yann E. MORIN.

Quoted 42 lines
package/qemu/qemu.mk +28 -2
+# For others (e.g. arm) a -cpu option is not necessary, since the
+# qemu-arm default CPU supports all required architecture levels.
+ifeq ($(BR2_x86_64),y)
+QEMU_USER_OPTS = -cpu Nehalem,check=false
+endif
+
+# PowerPC architecture. Currently, the 620, 630, and 970 are not supported.
+ifeq ($(BR2_powerpc_e5500),y)
+QEMU_USER_OPTS = -cpu e5500
+endif
+
+ifeq ($(BR2_powerpc_e6500),y)
+QEMU_USER_OPTS = -cpu e6500
+endif
+
+ifeq ($(BR2_powerpc_power7),y)
+QEMU_USER_OPTS = -cpu 7400
+endif
+
+ifeq ($(BR2_powerpc64)$(BR2_powerpc_e5500),yy)
+QEMU_USER_OPTS = -cpu e500mc
+endif
+
+ifeq ($(BR2_powerpc64)$(BR2_powerpc_e6500),yy)
+QEMU_USER_OPTS = -cpu e500mc
+endif
+
 HOST_QEMU_SYS_ARCH ?= $(HOST_QEMU_ARCH)
 
 ifeq ($(BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE),y)
@@ -147,7 +178,7 @@ endef
 $(eval $(host-generic-package))
 
 # variable used by other packages
-QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH)
+QEMU_USER = $(HOST_DIR)/bin/qemu-$(HOST_QEMU_ARCH) $(QEMU_USER_OPTS)
 
 #-------------------------------------------------------------
 # Target-qemu
--

2.14.3

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

#7 lore raw

PATCH v5 3/5 gstreamer1 packages: explicitly disable introspection

In reply to Adam Duskett

To get GStreamer ready for introspection, we must first explicitly disable gstreamer1, plugins base and plugins bad from using introspection. If not, adding the gobject-introspection will result in these packages failing to build because setting the _GIR_EXTRA_LIBS_PATH variable is required.

The other gstreamer1 packages do not require setting the _GIR_EXTRA_LIBS_PATH variable.

---
Changes v1 -> v4:
- Add patch to series.
- Change TARGET_MAKE_ENV += GIR_EXTRA_LIBS_PATH to PACKAGE_GIR_EXTRA_LIBS_PATH.

Changes v4 -> v5:
- Change --enable-introspection=no to --disable-introspection (Yann)

 package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk   | 3 ++-
 package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk | 3 ++-
 package/gstreamer1/gstreamer1/gstreamer1.mk               | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)
package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +2 -1
index 83cb94be81..a4adc0e49e 100644
@@ -21,7 +21,8 @@ GST1_PLUGINS_BAD_CONF_OPTS = \
 	--disable-winks \
 	--disable-android_media \
 	--disable-apple_media \
-	--disable-acm
+	--disable-acm \
+	--disable-introspection
 
 # Options which require currently unpackaged libraries
 GST1_PLUGINS_BAD_CONF_OPTS += \
package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk +2 -1
index 10361ee3c6..2d183ce572 100644
@@ -14,7 +14,8 @@ GST1_PLUGINS_BASE_LICENSE = LGPL-2.0+, LGPL-2.1+
 # gio_unix_2_0 is only used for tests
 GST1_PLUGINS_BASE_CONF_OPTS = \
 	--disable-examples \
-	--disable-valgrind
+	--disable-valgrind \
+	--disable-introspection
 
 # Options which require currently unpackaged libraries
 GST1_PLUGINS_BASE_CONF_OPTS += \
package/gstreamer1/gstreamer1/gstreamer1.mk +1 -0
index ea9f29a4f3..b00057a374 100644
@@ -17,6 +17,7 @@ GSTREAMER1_CONF_OPTS = \
 	--disable-failing-tests \
 	--disable-valgrind \
 	--disable-benchmarks \
+	--disable-introspection \
 	$(if $(BR2_PACKAGE_GSTREAMER1_CHECK),,--disable-check) \
 	$(if $(BR2_PACKAGE_GSTREAMER1_TRACE),,--disable-trace) \
 	$(if $(BR2_PACKAGE_GSTREAMER1_PARSE),,--disable-parse) \
Signature · 1 line
2.14.3
#8 lore raw

PATCH v5 3/5 gstreamer1 packages: explicitly disable introspection

Adma, All,

On 2018-03-18 15:01 -0400, Adam Duskett spake thusly:

Quoted 9 lines

To get GStreamer ready for introspection, we must first explicitly disable gstreamer1, plugins base and plugins bad from using introspection. If not, adding the gobject-introspection will result in these packages failing to build because setting the _GIR_EXTRA_LIBS_PATH variable is required.

The other gstreamer1 packages do not require setting the _GIR_EXTRA_LIBS_PATH variable.

If there are other packages that may support GIR, we can add that option later on as we discover them.

Regards,
Yann E. MORIN.

Quoted 61 lines

---
Changes v1 -> v4:
- Add patch to series.
- Change TARGET_MAKE_ENV += GIR_EXTRA_LIBS_PATH to PACKAGE_GIR_EXTRA_LIBS_PATH.

Changes v4 -> v5:
- Change --enable-introspection=no to --disable-introspection (Yann)

 package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk   | 3 ++-
 package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk | 3 ++-
 package/gstreamer1/gstreamer1/gstreamer1.mk               | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)
package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +2 -1
index 83cb94be81..a4adc0e49e 100644
@@ -21,7 +21,8 @@ GST1_PLUGINS_BAD_CONF_OPTS = \
 	--disable-winks \
 	--disable-android_media \
 	--disable-apple_media \
-	--disable-acm
+	--disable-acm \
+	--disable-introspection
 
 # Options which require currently unpackaged libraries
 GST1_PLUGINS_BAD_CONF_OPTS += \
package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk +2 -1
index 10361ee3c6..2d183ce572 100644
@@ -14,7 +14,8 @@ GST1_PLUGINS_BASE_LICENSE = LGPL-2.0+, LGPL-2.1+
 # gio_unix_2_0 is only used for tests
 GST1_PLUGINS_BASE_CONF_OPTS = \
 	--disable-examples \
-	--disable-valgrind
+	--disable-valgrind \
+	--disable-introspection
 
 # Options which require currently unpackaged libraries
 GST1_PLUGINS_BASE_CONF_OPTS += \
package/gstreamer1/gstreamer1/gstreamer1.mk +1 -0
index ea9f29a4f3..b00057a374 100644
@@ -17,6 +17,7 @@ GSTREAMER1_CONF_OPTS = \
 	--disable-failing-tests \
 	--disable-valgrind \
 	--disable-benchmarks \
+	--disable-introspection \
 	$(if $(BR2_PACKAGE_GSTREAMER1_CHECK),,--disable-check) \
 	$(if $(BR2_PACKAGE_GSTREAMER1_TRACE),,--disable-trace) \
 	$(if $(BR2_PACKAGE_GSTREAMER1_PARSE),,--disable-parse) \
Signature · 6 lines
2.14.3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH v5 1/1 gobject-introspection: new package

In reply to Adam Duskett

GObject introspection is a middleware layer between C libraries (using GObject) and language bindings. The C library can be scanned at compile time and generate a metadata file, in addition to the actual native C library. Then at runtime, language bindings can read this metadata and automatically provide bindings to call into the C library.

There's an XML format called GIR used by GObject-Introspection. The purpose of it is to provide a standard structure to access the complete available API that a library or other unit of code exports. It is meant to be language agnostic using namespaces to separate core, language or library specific functionality.

Cross-compiling gobject-introspection is not an easy task. The main issue is that in the process of creating the XML files, gobject-introspection must first run and scan the binary, which, if the binary is cross-compiled, would not typically be possible from the host system.

Because of this limitation, several wrappers are used to call instead first out qemu which will then run the native scanner to create the binaries.

There are eight total patches and four different wrapper files needed to successfully cross-compile and run this package, many of them are from open-embedded, but two of them are of my own doing.

1) Revert a previous, incomplete attempt at adding cross-compiling support.

2) Add support for the various wrappers. (See patch for details.)

3) Add an option to use a binary wrapper; this patch will force giscanner to use a wrapper executable to run binaries it's producing, instead of attempting to run them from the host.

4) Add an option to use an LDD wrapper, again, useful for cross-compiled environments.

5) Overwrite python includes during the initial configure stage.

6) Add a --lib-dirs-envar option to pass to giscanner. (See patch for details.)

7) Add rpath-links to ccompiler: when passing the PACKAGE_GIR_EXTRA_LIBS_PATH to the ccompiler.py script, ccompiler.py needs to add -Wl,-rpath-link to the environment for the package to correctly link against the passed on paths.

8) Add Float128 patch: Newer versions of the GNU C library started exposing _Float128 in the headers, which means we need to add this type to the known tokens, to avoid warnings.

---
Changes v1 -> v2:
- Fixed wrappers
- Added 0007-giscanner-add-a-lib-dirs-envvar-option.patch
- Added 0008-add-Float128.patch

Changes v2 -> v3:
- Removed Linux kernel dependency (baruch)
- Changed $(LINUX_VERSION) to $(BR2_TOOLCHAIN_HEADERS_AT_LEAST) (baruch)
- Changed @LINUX_VERSION@ in g-ir-scanner-qemuwrapper.in to @TOOLCHAIN_HEADERS_VERSION@ to match the above variable change.
- Added BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET in Config.in with only BR2_arm selected for now.
- Removed BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS in favor of the above change.
- Added two new lines in the base Makefile which removes any remaining .gir or .rnc files from the target filing system, as these are not needed for runtime, only compile time.

Changes v3 -> v4:
- Removed RFC tag.
- Added 0007-Add-rpath-links-to-ccompiler.patch
- Removed config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch as it is not Yocto specific.
- Added the _GIR_EXTRA_LIBS_PATH to pkg-autotools.mk. This allows package specific Gir libraries to be passed on to g-ir-scanner-qemuwrapper.
- Fixed a typo in g-ir-scanner-qemuwrapper.in.
- Remove BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET in favor of BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS

Changes v4 -> v5:
- Added a more detailed commit message (Yann)
- Removed $HOST_DIR/bin/qemu- at HOST_QEMU_ARCH@ @HOST_QEMU_CPU_TUNE@ in favor of @QEMU_USER@ (Thanks Yann)

 DEVELOPERS                                         |   1 +
 Makefile                                           |   2 +
 package/Config.in                                  |   1 +
 ...ncomplete-upstream-attempt-at-cross-compi.patch |  50 +++
 ...c-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch | 203 ++++++++++++
 ...3-giscanner-add-use-binary-wrapper-option.patch |  52 +++
 ...04-giscanner-add-a-use-ldd-wrapper-option.patch |  48 +++
 .../0005-add-PYTHON_INCLUDES-override.patch        |  39 +++
 ...06-giscanner-add-a-lib-dirs-envvar-option.patch |  73 +++++
 .../0007-Add-rpath-links-to-ccompiler.patch        |  29 ++
 .../gobject-introspection/0008-add-Float128.patch  |  28 ++
 package/gobject-introspection/Config.in            |  30 ++
 package/gobject-introspection/cross-ldd            | 362 +++++++++++++++++++++
 package/gobject-introspection/g-ir-compiler.in     |   2 +
 .../g-ir-scanner-lddwrapper.in                     |   2 +
 .../g-ir-scanner-qemuwrapper.in                    |  10 +
 package/gobject-introspection/g-ir-scanner.in      |   3 +
 .../gobject-introspection.hash                     |   4 +
 .../gobject-introspection/gobject-introspection.mk |  89 +++++
 package/pkg-autotools.mk                           |   3 +
 20 files changed, 1031 insertions(+)
 create mode 100644 package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch
 create mode 100644 package/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch
 create mode 100644 package/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch
 create mode 100644 package/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch
 create mode 100644 package/gobject-introspection/0005-add-PYTHON_INCLUDES-override.patch
 create mode 100644 package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch
 create mode 100644 package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch
 create mode 100644 package/gobject-introspection/0008-add-Float128.patch
 create mode 100644 package/gobject-introspection/Config.in
 create mode 100644 package/gobject-introspection/cross-ldd
 create mode 100644 package/gobject-introspection/g-ir-compiler.in
 create mode 100644 package/gobject-introspection/g-ir-scanner-lddwrapper.in
 create mode 100644 package/gobject-introspection/g-ir-scanner-qemuwrapper.in
 create mode 100644 package/gobject-introspection/g-ir-scanner.in
 create mode 100644 package/gobject-introspection/gobject-introspection.hash
 create mode 100644 package/gobject-introspection/gobject-introspection.mk
DEVELOPERS +1 -0
index 3df820e712..46ea8230b6 100644
@@ -34,6 +34,7 @@ F:	package/audit/
 F:	package/busybox/
 F:	package/checkpolicy/
 F:	package/cppdb/
+F:	package/gobject-introspection/
 F:	package/gstreamer1/gstreamer1/
 F:	package/gstreamer1/gstreamer1-mm/
 F:	package/gstreamer1/gst1-plugins-bad/
Makefile +2 -0
index 1b34818fc8..6a507d050a 100644
@@ -704,6 +704,8 @@ target-finalize: $(PACKAGES)
 		$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
 		$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
 	find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
+	find $(TARGET_DIR)/usr/share/ -name '*.gir' -print0 | xargs -0 rm -f
+	find $(TARGET_DIR)/usr/share/ -name '*.rnc' -print0 | xargs -0 rm -f
 	find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \
 		\( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
 ifneq ($(BR2_PACKAGE_GDB),y)
package/Config.in +1 -0
index 449ffcc47b..63752ed04c 100644
@@ -1486,6 +1486,7 @@ menu "Other"
 	source "package/glibmm/Config.in"
 	source "package/glm/Config.in"
 	source "package/gmp/Config.in"
+	source "package/gobject-introspection/Config.in"
 	source "package/gsl/Config.in"
 	source "package/gtest/Config.in"
 	source "package/jemalloc/Config.in"
package/gobject-introspection/0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch new file +50 -0

50 lines not on this page · raw message

package/gobject-introspection/0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch new file +203 -0

203 lines not on this page · raw message

package/gobject-introspection/0003-giscanner-add-use-binary-wrapper-option.patch new file +52 -0

52 lines not on this page · raw message

package/gobject-introspection/0004-giscanner-add-a-use-ldd-wrapper-option.patch new file +48 -0

48 lines not on this page · raw message

package/gobject-introspection/0005-add-PYTHON_INCLUDES-override.patch new file +39 -0
new file mode 100644
index 0000000000..5539b467a9
@@ -0,0 +1,39 @@
+From 08ee7e704d3ebbb783e26768074a5969d6843204 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Wed, 18 Oct 2017 17:31:19 -0400
+Subject: [PATCH] add PYTHON_INCLUDES override
+
+As the configure script mixes up host/target python. Equivalent to the
+similar code in dbus-python.
+
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ m4/python.m4 | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/m4/python.m4 b/m4/python.m4
+index ed5559d..9853263 100644
+--- a/m4/python.m4
++++ b/m4/python.m4
+@@ -43,7 +43,17 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
+ [AC_REQUIRE([AM_PATH_PYTHON])
+ AC_MSG_CHECKING(for headers required to compile python extensions)
+ dnl deduce PYTHON_INCLUDES
+-PYTHON_INCLUDES=`$PYTHON-config --includes`
++if test "${PYTHON_INCLUDES+set}" = set; then
++  AC_MSG_NOTICE([PYTHON_INCLUDES overridden to: $PYTHON_INCLUDES])
++else
++  if test -x "$PYTHON_CONFIG"; then
++    PYTHON_INCLUDES=`$PYTHON_CONFIG --includes 2>/dev/null`
++  else
++    PYTHON_INCLUDES=`$PYTHON -c "import distutils.sysconfig, sys; sys.stdout.write(distutils.sysconfig.get_python_inc(True))"`
++    PYTHON_INCLUDES="-I$PYTHON_INCLUDES"
++  fi
++fi
++
+ AC_SUBST(PYTHON_INCLUDES)
+ dnl check if the headers exist:
+ save_CPPFLAGS="$CPPFLAGS"
+-- 
+2.13.6
+
package/gobject-introspection/0006-giscanner-add-a-lib-dirs-envvar-option.patch new file +73 -0

73 lines not on this page · raw message

package/gobject-introspection/0007-Add-rpath-links-to-ccompiler.patch new file +29 -0
new file mode 100644
index 0000000000..02fcdbeb25
@@ -0,0 +1,29 @@
+From 72a427bc50daee8f1ded0e9221e53dbbf2a80f08 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <[email protected]>
+Date: Wed, 14 Mar 2018 12:07:10 -0400
+Subject: [PATCH] Add rpath links to ccompiler
+
+This patch allows gobject-introspection to process extra paths passed to the
+compiler via the GIR_EXTRA_LIBS_PATH variable.
+
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ giscanner/ccompiler.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
+index a8bd5b1..51bb9bc 100644
+--- a/giscanner/ccompiler.py
++++ b/giscanner/ccompiler.py
+@@ -163,6 +163,8 @@ class CCompiler(object):
+ 
+         for envvar in runtime_path_envvar:
+             if envvar in os.environ:
++                for envvar_path in os.environ[envvar].split(':'):
++                    args.append("-Wl,-rpath-link," + envvar_path)
+                 os.environ[envvar] = \
+                     os.pathsep.join(runtime_paths + [os.environ[envvar]])
+             else:
+-- 
+2.14.3
+
package/gobject-introspection/0008-add-Float128.patch new file +28 -0
new file mode 100644
index 0000000000..661affda34
@@ -0,0 +1,28 @@
+scanner: Add _Float128
+
+The ISO/IEC TS 18661-3:2015 standard added new floating point types to
+the C standard.
+
+Newer versions of the GNU C library started exposing `_Float128` in the
+headers, which means we need to add this type to the known tokens, to
+avoid warnings.
+
+original commit:
+https://github.com/GNOME/gobject-introspection/commit/8cf3e8e5cf6d0d49db359f50c6eb0bc9ca22fbef
+
+Signed-off-by: Adam Duskett <[email protected]>
+---
+
+diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
+index 7dbab5c8..218024e9 100644
+--- a/giscanner/scannerlexer.l
++++ b/giscanner/scannerlexer.l
+@@ -192,7 +192,7 @@ stringtext				([^\\\"])|(\\.)
+ "__stdcall" 			        { /* ignore */ }
+ "__w64"					{ /* ignore */ }
+ "__int64"				{ return INT; }
+-
++"_Float128"                             { return FLOAT; }
+ 
+ "G_GINT64_CONSTANT"			{ return INTL_CONST; }
+ "G_GUINT64_CONSTANT"			{ return INTUL_CONST; }
package/gobject-introspection/Config.in new file +30 -0
new file mode 100644
index 0000000000..fccdc0a936
@@ -0,0 +1,30 @@
+config BR2_PACKAGE_GOBJECT_INTROSPECTION
+	bool "gobject-introspection"
+	depends on BR2_PACKAGE_HOST_QEMU_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libffi, libglib2
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_USE_MMU # python3, libglib2
+	depends on BR2_USE_WCHAR # python3, libglib2 -> gettext
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_MIPS_NABI32
+	select BR2_PACKAGE_LIBFFI
+	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_HOST_QEMU
+	select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
+	select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON
+	help
+	  GObject introspection is a middleware layer between C
+	  libraries (using GObject) and language bindings. The C library
+	  can be scanned at compile time and generate a metadata file,
+	  in addition to the actual native C library. Then at runtime,
+	  language bindings can read this metadata and automatically
+	  provide bindings to call into the C library.
+
+	  https://wiki.gnome.org/action/show/Projects/GObjectIntrospection
+
+comment "gobject-introspection needs a glibc toolchain w/ wchar, threads, dynamic library"
+	depends on BR2_USE_MMU
+	depends on BR2_PACKAGE_GOBJECT_INTROSPECTION_ARCH_SUPPORTS_TARGET
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		BR2_STATIC_LIBS || !BR2_TOOLCHAIN_USES_GLIBC
package/gobject-introspection/cross-ldd new file +362 -0

362 lines not on this page · raw message

package/gobject-introspection/g-ir-compiler.in new file +2 -0
new file mode 100644
index 0000000000..b2f97ea870
@@ -0,0 +1,2 @@
+#!/bin/sh
+$STAGING_DIR/usr/bin/g-ir-scanner-qemuwrapper $STAGING_DIR/usr/bin/g-ir-compiler.real "$@"
package/gobject-introspection/g-ir-scanner-lddwrapper.in new file +2 -0
new file mode 100644
index 0000000000..3313c877f8
@@ -0,0 +1,2 @@
+#!/bin/sh
+${TARGET_CROSS}ldd "$@"
package/gobject-introspection/g-ir-scanner-qemuwrapper.in new file +10 -0
new file mode 100644
index 0000000000..e793ce193f
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Use a modules directory which does not exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=$STAGING_DIR/usr/lib/gio/modules-dummy
+PSEUDO_UNLOAD=1 @QEMU_USER@ -r @TOOLCHAIN_HEADERS_VERSION@ -L $STAGING_DIR -E LD_LIBRARY_PATH=$GIR_EXTRA_LIBS_PATH:.libs:$STAGING_DIR/usr/lib:$STAGING_DIR/lib "$@"
+if [[ $? -ne 0 ]]; then
+    echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help."
+    echo '(typically like this: GIR_EXTRA_LIBS_PATH="$(@D)/.libs")'
+    exit 1
+fi
package/gobject-introspection/g-ir-scanner.in new file +3 -0
new file mode 100644
index 0000000000..71b1871cfd
@@ -0,0 +1,3 @@
+#!/bin/sh
+export GI_SCANNER_DISABLE_CACHE=1
+$HOST_DIR/bin/g-ir-scanner --lib-dirs-envvar=GIR_EXTRA_LIBS_PATH --use-binary-wrapper=$STAGING_DIR/usr/bin/g-ir-scanner-qemuwrapper --use-ldd-wrapper=$STAGING_DIR/usr/bin/g-ir-scanner-lddwrapper --add-include-path=$STAGING_DIR/usr/share/gir-1.0 "$@"
package/gobject-introspection/gobject-introspection.hash new file +4 -0
new file mode 100644
index 0000000000..a41fb58a5f
@@ -0,0 +1,4 @@
+#From http://ftp.gnome.org/pub/GNOME/sources/gobject-introspection/1.54/gobject-introspection-1.54.1.sha256sum
+sha256 b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c63807d4f9a7bb877e gobject-introspection-1.54.1.tar.xz
+sha256 d245807f90032872d1438d741ed21e2490e1175dc8aa3afa5ddb6c8e529b58e5 COPYING.LGPL
+sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING.GPL
package/gobject-introspection/gobject-introspection.mk new file +89 -0

89 lines not on this page · raw message

package/pkg-autotools.mk +3 -0
index 45de99356f..06021f95c1 100644
@@ -162,6 +162,7 @@ endif
 
 $(2)_CONF_ENV			?=
 $(2)_CONF_OPTS			?=
+$(2)_GIR_EXTRA_LIBS_PATH	?=
 $(2)_MAKE_ENV			?=
 $(2)_MAKE_OPTS			?=
 $(2)_INSTALL_OPTS                ?= install
@@ -239,6 +240,8 @@ endef
 endif
 endif
 
+export GIR_EXTRA_LIBS_PATH=$$($$(PKG)_GIR_EXTRA_LIBS_PATH)
+
 $(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
 
 ifeq ($$($(2)_AUTORECONF),YES)
Signature · 1 line
2.14.3
#10 lore raw

PATCH v5 1/1 gobject-introspection: new package

Adam,

Quoted 20 lines · Adam Duskett

GObject introspection is a middleware layer between C libraries (using GObject) and language bindings. The C library can be scanned at compile time and generate a metadata file, in addition to the actual native C library. Then at runtime, language bindings can read this metadata and automatically provide bindings to call into the C library.

There's an XML format called GIR used by GObject-Introspection. The purpose of it is to provide a standard structure to access the complete available API that a library or other unit of code exports. It is meant to be language agnostic using namespaces to separate core, language or library specific functionality.

Cross-compiling gobject-introspection is not an easy task. The main issue is that in the process of creating the XML files, gobject-introspection must first run and scan the binary, which, if the binary is cross-compiled, would not typically be possible from the host system.

Quoted 3 lines

Because of this limitation, several wrappers are used to call instead first out qemu which will then run the native scanner to create the binaries.

Wondering if anyone has a concern with the wrappers being relocatable?
The use case would be a developer builds their own library and wants
to generate GIR using the SDK.

I believe it would just require the wrappers to use full paths so that the support/misc/relocate-sdk.sh as part of "make sdk" can fixup the
wrappers. However, the sdk make target and the relocate-sdk.sh would
need to be updated to handle fixing up the staging directory paths... Unsure if the staging fixup would be a good thing though, as other files in that folder may not like that (nothing else really should have absolute paths, right? so maybe it's transparent). Another approach would be to make the wrappers relative pathed but that gets tricky with HOST_DIR and STAGING_DIR having the option of being custom locations and not in the same output folder.

Quoted 18 lines
package/gobject-introspection/gobject-introspection.mk new file +18 -0
+
+GOBJECT_INTROSPECTION_CONF_OPTS = \
+       --enable-host-gi \
+       --disable-static \
+       --enable-gi-cross-wrapper=$(STAGING_DIR)/usr/bin/g-ir-scanner-qemuwrapper \
+       --enable-gi-ldd-wrapper=$(STAGING_DIR)/usr/bin/g-ir-scanner-lddwrapper \
+       --disable-introspection-data
+
+ifeq ($(BR2_PACKAGE_CAIRO),y)
+GOBJECT_INTROSPECTION_DEPENDENCIES += cairo
+endif
+ifeq ($(BR2_PACKAGE_LIBFFI),y)
+GOBJECT_INTROSPECTION_DEPENDENCIES += libffi
+endif
+
+ifeq ($(BR2_PACKAGE_PYTHON),y)
+GOBJECT_INTROSPECTION_DEPENDENCIES += python
+HOST_GOBJECT_INTROSPECTION_DEPENDENCIES += host-python

package/gobject-introspection/gobject-introspection.mk line 44

Quoted 10 lines
package/gobject-introspection/gobject-introspection.mk new file +10 -0
+GOBJECT_INTROSPECTION_PYTHON_PATH="$(STAGING_DIR)/usr/bin/python2"
+else
+GOBJECT_INTROSPECTION_DEPENDENCIES += python3
+HOST_GOBJECT_INTROSPECTION_DEPENDENCIES += host-python3
+GOBJECT_INTROSPECTION_PYTHON_PATH="$(STAGING_DIR)/usr/bin/python3"
+endif
+
+# GI_SCANNER_DISABLE_CACHE=1 prevents g-ir-scanner from writing cache data to $HOME
+GOBJECT_INTROSPECTION_CONF_ENV = \
+       GI_SCANNER_DISABLE_CACHE=1 \

Does the GI_SCANNER_DISABLE_CACHE stick if a SDK was relocated? Assuming it's a default which is captured as part of the tool build.

Matt

#11 lore raw

PATCH v5 1/1 gobject-introspection: new package

Quoted 8 lines · Matthew Weber

However, the sdk make target and the relocate-sdk.sh would need to be updated to handle fixing up the staging directory paths... Unsure if the staging fixup would be a good thing though, as other files in that folder may not like that (nothing else really should have absolute paths, right? so maybe it's transparent). Another approach would be to make the wrappers relative pathed but that gets tricky with HOST_DIR and STAGING_DIR having the option of being custom locations and not in the same output folder.

Only HOST_DIR has the option of being in a custom location. STAGING_DIR is
always $(HOST_DIR)/$(GNU_TARGET_NAME)/sysroot.

And in fact, relocate-sdk.sh is already going through STAGING_DIR: it does a
grep -r on HOST_DIR so it *will* also recurse into STAGING_DIR.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#12 lore raw

PATCH v5 5/5 gstreamer1 packages: add support for introspection

In reply to Adam Duskett

Now that there is support for gobject-introspection, we can add the appropriate configuration options to support compiling against gobject-introspection.

In addition: gst1-plugins-base requires a patch to drop a incorrect reference to sdp when compiling the rtsp gir file.

---
Changes v1 -> v4:
- Add patch to series.

Changes v4 -> v5:
- Changed --enable-introspection=yes to --enable-introspection (Yann)
- Changed += GIR_EXTRA_LIBS_PATH="$(@D)/gst/.libs:$(@D)/libs/gst/base/.libs"

    to GSTREAMER1_GIR_EXTRA_LIBS_PATH=$(@D)/gst/.libs:$(@D)/libs/gst/base/.libs
 .../gst1-plugins-bad/gst1-plugins-bad.mk           |  5 ++++
 ...ncorrect-reference-to-gstreamer-sdp-in-Ma.patch | 28 ++++++++++++++++++++++
 .../gst1-plugins-base/gst1-plugins-base.mk         |  5 ++++
 package/gstreamer1/gstreamer1/gstreamer1.mk        |  6 +++++
 4 files changed, 44 insertions(+)
 create mode 100644 package/gstreamer1/gst1-plugins-base/0001-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk +5 -0
index a4adc0e49e..1f645c6a7c 100644
@@ -64,6 +64,11 @@ GST1_PLUGINS_BAD_CONF_OPTS += \
 
 GST1_PLUGINS_BAD_DEPENDENCIES = gst1-plugins-base gstreamer1
 
+ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
+GST1_PLUGINS_BAD_CONF_OPTS += --enable-introspection
+GST1_PLUGINS_BAD_GIR_EXTRA_LIBS_PATH=$(@D)/gst-libs/gst/allocators/.libs
+endif
+
 ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
 # RPI has odd locations for several required headers.
 GST1_PLUGINS_BAD_CONF_ENV += \
package/gstreamer1/gst1-plugins-base/0001-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch new file +28 -0
new file mode 100644
index 0000000000..71d9732604
@@ -0,0 +1,28 @@
+From 4330915d88dc4dd46eb4c28d756482b767c2747f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Mon, 26 Oct 2015 17:30:14 +0200
+Subject: [PATCH] rtsp: drop incorrect reference to gstreamer-sdp in
+ Makefile.am
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <[email protected]>
+Signed-off-by: Adam Duskett <[email protected]>
+---
+ gst-libs/gst/rtsp/Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
+index 4f6d9f8..0afa370 100644
+--- a/gst-libs/gst/rtsp/Makefile.am
++++ b/gst-libs/gst/rtsp/Makefile.am
+@@ -75,7 +75,6 @@ GstRtsp- at [email protected]: $(INTROSPECTION_SCANNER) libgstrtsp- at GST_API_VERS
+ 		--libtool="$(LIBTOOL)" \
+ 		--pkg gio-2.0 \
+ 		--pkg gstreamer- at GST_API_VERSION@ \
+-		--pkg gstreamer-sdp- at GST_API_VERSION@ \
+ 		--pkg-export gstreamer-rtsp- at GST_API_VERSION@ \
+ 		--add-init-section="$(INTROSPECTION_INIT)" \
+ 		--output $@ \
+-- 
+2.6.2
+
package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk +5 -0
index 2d183ce572..dd93ea5255 100644
@@ -25,6 +25,11 @@ GST1_PLUGINS_BASE_CONF_OPTS += \
 
 GST1_PLUGINS_BASE_DEPENDENCIES = gstreamer1
 
+ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
+GST1_PLUGINS_BASE_CONF_OPTS += --enable-introspection
+GST1_PLUGINS_BASE_GIR_EXTRA_LIBS_PATH=$(@D)/gst-libs/gst/tag/.libs:$(@D)/gst-libs/gst/video/.libs:$(@D)/gst-libs/gst/audio/.libs:$(@D)/gst-libs/gst/rtp/.libs
+endif
+
 # These plugins are liste in the order from ./configure --help
 
 ifeq ($(BR2_PACKAGE_ORC),y)
package/gstreamer1/gstreamer1/gstreamer1.mk +6 -0
index b00057a374..7715ccbbff 100644
@@ -32,4 +32,10 @@ GSTREAMER1_DEPENDENCIES = \
 	libglib2 \
 	$(if $(BR2_PACKAGE_LIBUNWIND),libunwind)
 
+ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
+GSTREAMER1_DEPENDENCIES += gobject-introspection
+GSTREAMER1_CONF_OPTS += --enable-introspection
+GSTREAMER1_GIR_EXTRA_LIBS_PATH=$(@D)/gst/.libs:$(@D)/libs/gst/base/.libs
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.14.3
#13 lore raw

v5 cover gobject-introspection: new series

In reply to Adam Duskett

Adam,

Quoted 8 lines · Adam Duskett

For official submission to mainline Buildroot:

This new series has the following upgrades:
- It now works on all architectures supported by qemu-host.
- Gstreamer1 can now compile gir files properly. (for real this time).
- General makefile cleanups.
- New patches that make cross-compiling a bit nicer (thanks, yocto!)

Suggest updating those patches to all have links to upstream submissions as the string provided with the "Upstream: " comment in the description of the patch.

Quoted 2 lines

- Removed a patch that was yocto specific and not needed with buildroot.
- Added a PKG_GIR_EXTRA_LIBS variable in pkg-autotools.mk

Should the pkg-autotools.mk changes for this option, be a separate patch added before the others that use it?

Matt

#14 lore raw

v5 cover gobject-introspection: new series

Matthew;

First off; I want to personally say thank you again for taking the time to review this huge patch.

Quoted 12 lines · Matthew Weber

Adam,

Quoted 8 lines · Adam Duskett

For official submission to mainline Buildroot:

This new series has the following upgrades:
- It now works on all architectures supported by qemu-host.
- Gstreamer1 can now compile gir files properly. (for real this time).
- General makefile cleanups.
- New patches that make cross-compiling a bit nicer (thanks, yocto!)

Quoted 4 lines

Suggest updating those patches to all have links to upstream submissions as the string provided with the "Upstream: " comment in the description of the patch.

Can do! I found went and hunted them down.

Quoted 7 lines
Quoted 2 lines

- Removed a patch that was yocto specific and not needed with buildroot.
- Added a PKG_GIR_EXTRA_LIBS variable in pkg-autotools.mk

Should the pkg-autotools.mk changes for this option, be a separate patch added before the others that use it?

Matt

I can live with that.