Skip to contentSkip to conversation

gobject introspection fixes

PATCH In review Andre McCurdy 5 participants 22 messages Mar 17, 2016 – Mar 21, 2016

lore
Share & tools
lore
#0 lore raw

cover gobject introspection fixes

Main change to avoid use of DISTRO/MACHINE_FEATURES_BACKFILL for gobject-introspection-data (it's not appropriate, since gobject introspection was not previously enabled by default).

http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#ref-features-backfill

Andre McCurdy (8):
bitbake.conf: remove 'gobject-introspection-data' from DISTRO/MACHINE_FEATURES_BACKFILL default-distrovars.inc: add gobject-introspection-data to DISTRO_FEATURES_DEFAULT qemu.inc: add gobject-introspection-data to MACHINE_FEATURES arch-x86.inc: disable gobject introspection for x86-64 x32 builds qemuarm64.conf: don't clear MACHINE_FEATURES gobject-introspection.bbclass: wrap comments at 80 columns gobject-introspection.bbclass: make additional DEPENDS conditional gobject-introspection.bbclass: mark as machine specific due to COMBINED_FEATURES

 meta/classes/gobject-introspection.bbclass      | 29 +++++++++++++------------
 meta/conf/bitbake.conf                          |  4 ++--
 meta/conf/distro/include/default-distrovars.inc |  2 +-
 meta/conf/machine/include/qemu.inc              |  2 +-
 meta/conf/machine/include/x86/arch-x86.inc      |  2 +-
 meta/conf/machine/qemuarm64.conf                |  2 --
 6 files changed, 20 insertions(+), 21 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/8 bitbake.conf: remove 'gobject-introspection-data' from DISTRO/MACHINE_FEATURES_BACKFILL

Support for gobject introspection was not previously enabled by default, therefore it's not appropriate to backfill into existing distro or machine configurations.

http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#ref-features-backfill

---
 meta/conf/bitbake.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/bitbake.conf +2 -2
index 7ed5ffb..9cec7dd 100644
@@ -761,8 +761,8 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
 EXTRA_IMAGE_FEATURES ??= ""
 IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
 
-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"
-MACHINE_FEATURES_BACKFILL = "rtc gobject-introspection-data"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5"
+MACHINE_FEATURES_BACKFILL = "rtc"
 
 COMBINED_FEATURES = "${@oe.utils.set_intersect('DISTRO_FEATURES', 'MACHINE_FEATURES', d)}"
 COMBINED_FEATURES[vardeps] += "DISTRO_FEATURES MACHINE_FEATURES"
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH 1/8] bitbake.conf: remove 'gobject-introspection-data' from DISTRO/MACHINE_FEATURES_BACKFILL

meta/conf/bitbake.conf MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" · line 765

Quoted 6 lines · Andre McCurdy

-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"

meta/conf/bitbake.conf +2 -1
-MACHINE_FEATURES_BACKFILL = "rtc gobject-introspection-data"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5"
+MACHINE_FEATURES_BACKFILL = "rtc"

So every BSP (apart from the qemu ones) would need to add the feature to MACHINE_FEATURES?

Maybe we should remove from DISTRO backfill but keep backfilling for MACHINE features?

Ross

#3 lore raw

Re: [PATCH 1/8] bitbake.conf: remove 'gobject-introspection-data' from DISTRO/MACHINE_FEATURES_BACKFILL

Quoted 12 lines · Ross

meta/conf/bitbake.conf MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" · line 765

Quoted 6 lines · Andre McCurdy

-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"

meta/conf/bitbake.conf +2 -1
-MACHINE_FEATURES_BACKFILL = "rtc gobject-introspection-data"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5"
+MACHINE_FEATURES_BACKFILL = "rtc"

So every BSP (apart from the qemu ones) would need to add the feature to MACHINE_FEATURES?

Quoted 2 lines

Maybe we should remove from DISTRO backfill but keep backfilling for MACHINE features?

Or don't control via a MACHINE feature at all (which would also solve the package PACKAGE_ARCH issue) ?

Each CPU tuning file would then instead need to somehow express "this tuning target creates binaries which can / can't be run with qemu", but maybe that's an improvement too - isn't it better to define and maintain that information centrally in files controlled by oe-core rather than leave it up to BSPs to get right?

Quoted 1 line

Ross

#4 lore raw

Re: [PATCH 1/8] bitbake.conf: remove 'gobject-introspection-data' from DISTRO/MACHINE_FEATURES_BACKFILL

Quoted 20 lines · Andre McCurdy

On Thu, Mar 17, 2016 at 10:31 AM, Burton, Ross <[email protected]

Quoted 15 lines

wrote:

meta/conf/bitbake.conf MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" · line 765

Quoted 6 lines · Andre McCurdy

-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"

meta/conf/bitbake.conf +2 -1
-MACHINE_FEATURES_BACKFILL = "rtc gobject-introspection-data"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5"
+MACHINE_FEATURES_BACKFILL = "rtc"

So every BSP (apart from the qemu ones) would need to add the feature to
MACHINE_FEATURES?

Quoted 3 lines

Maybe we should remove from DISTRO backfill but keep backfilling for MACHINE
features?

Quoted 8 lines

Or don't control via a MACHINE feature at all (which would also solve the package PACKAGE_ARCH issue) ?

Each CPU tuning file would then instead need to somehow express "this tuning target creates binaries which can / can't be run with qemu", but maybe that's an improvement too - isn't it better to define and maintain that information centrally in files controlled by oe-core rather than leave it up to BSPs to get right?

MACHINE_FEATURES is a variable which represents the features the target hardware has. There is nothing which says "this must be set in MACHINE.conf". In fact there is significant precedent for setting up common include files which define the hardware properties.

If you look at one of my patches, it alters a core common include file to exclude introspection in a case where we can't use it (x32).

So I think we actually want the same thing which is for the common tune files to setup the right data.

We have made a decision to defaulting to introspection, rightly or wrongly. I'm also quite happy to disable it where we know qemu can't work and tune files are likely the right place to that.

I don't think this patchset is right.

Cheers,

Richard

#5 lore raw

Re: [PATCH 1/8] bitbake.conf: remove 'gobject-introspection-data' from DISTRO/MACHINE_FEATURES_BACKFILL

Quoted 35 lines · Richard Purdie
Quoted 20 lines · Andre McCurdy

On Thu, Mar 17, 2016 at 10:31 AM, Burton, Ross <[email protected]

Quoted 15 lines

wrote:

meta/conf/bitbake.conf MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" · line 765

Quoted 6 lines · Andre McCurdy

-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"

meta/conf/bitbake.conf +2 -1
-MACHINE_FEATURES_BACKFILL = "rtc gobject-introspection-data"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5"
+MACHINE_FEATURES_BACKFILL = "rtc"

So every BSP (apart from the qemu ones) would need to add the feature to
MACHINE_FEATURES?

Quoted 3 lines

Maybe we should remove from DISTRO backfill but keep backfilling for MACHINE
features?

Quoted 8 lines

Or don't control via a MACHINE feature at all (which would also solve the package PACKAGE_ARCH issue) ?

Each CPU tuning file would then instead need to somehow express "this tuning target creates binaries which can / can't be run with qemu", but maybe that's an improvement too - isn't it better to define and maintain that information centrally in files controlled by oe-core rather than leave it up to BSPs to get right?

MACHINE_FEATURES is a variable which represents the features the target hardware has. There is nothing which says "this must be set in MACHINE.conf". In fact there is significant precedent for setting up common include files which define the hardware properties.

Quoted 5 lines

If you look at one of my patches, it alters a core common include file to exclude introspection in a case where we can't use it (x32).

So I think we actually want the same thing which is for the common tune files to setup the right data.

Yes, I think so.

Deciding if/how qemu can run binaries for each tuning target is already partially addressed by the QEMU_EXTRAOPTIONS logic in qemu.bbclass. My suggestion would be to somehow generalise that existing logic, so (at least for machines using one of the standard oe-core tuning files) the question "can qemu run binaries created for ${MACHINE}?" could be answered automatically.

Quoted 10 lines

We have made a decision to defaulting to introspection, rightly or wrongly. I'm also quite happy to disable it where we know qemu can't work and tune files are likely the right place to that.

I don't think this patchset is right.

Cheers,

Richard

#6 lore raw

Re: [PATCH 1/8] bitbake.conf: remove 'gobject-introspection-data' from DISTRO/MACHINE_FEATURES_BACKFILL

Quoted 6 lines · Andre McCurdy

Deciding if/how qemu can run binaries for each tuning target is already partially addressed by the QEMU_EXTRAOPTIONS logic in qemu.bbclass. My suggestion would be to somehow generalise that existing logic, so (at least for machines using one of the standard oe-core tuning files) the question "can qemu run binaries created for ${MACHINE}?" could be answered automatically.

I agree: machine features should specify the capabilities of a machine, and 'generate of gobject introspection data' is only a specific application of 'machine has qemu usermode support' feature. We might have other uses for qemu userspace in the future, for example gtkdoc generation.

So I'm thinking of having a machine feature called 'qemu-usermode', which is turned on by default, and can be disabled in specific machine configurations. And then a distro feature called 'gobject introspection data', which is on or off depending on whether the machine supports it, but can also be turned off explicitly. And then the recipes and recipe classes do the right thing. How's that?

Alex

#7 lore raw

Re: [PATCH 1/8] bitbake.conf: remove 'gobject-introspection-data' from DISTRO/MACHINE_FEATURES_BACKFILL

In reply to Andre McCurdy
Quoted 54 lines · Andre McCurdy
Quoted 44 lines · Richard Purdie
Quoted 26 lines · Andre McCurdy

On Thu, Mar 17, 2016 at 10:31 AM, Burton, Ross <
[email protected]

Quoted 15 lines

wrote:

meta/conf/bitbake.conf MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= "" · line 765

Quoted 6 lines · Andre McCurdy

-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"

meta/conf/bitbake.conf +2 -1
-MACHINE_FEATURES_BACKFILL = "rtc gobject-introspection-data"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5"
+MACHINE_FEATURES_BACKFILL = "rtc"

So every BSP (apart from the qemu ones) would need to add the feature to
MACHINE_FEATURES?

Quoted 4 lines

Maybe we should remove from DISTRO backfill but keep backfilling
for MACHINE
features?

Or don't control via a MACHINE feature at all (which would also solve
the package PACKAGE_ARCH issue) ?

Quoted 9 lines

Each CPU tuning file would then instead need to somehow express "this
tuning target creates binaries which can / can't be run with qemu",
but maybe that's an improvement too - isn't it better to define and
maintain that information centrally in files controlled by oe -core
rather than leave it up to BSPs to get right?

MACHINE_FEATURES is a variable which represents the features the target
hardware has. There is nothing which says "this must be set in MACHINE.conf". In fact there is significant precedent for setting up
common include files which define the hardware properties.

Quoted 7 lines

If you look at one of my patches, it alters a core common include file
to exclude introspection in a case where we can't use it (x32).

So I think we actually want the same thing which is for the common tune
files to setup the right data.

Quoted 8 lines

Yes, I think so.

Deciding if/how qemu can run binaries for each tuning target is already partially addressed by the QEMU_EXTRAOPTIONS logic in qemu.bbclass. My suggestion would be to somehow generalise that existing logic, so (at least for machines using one of the standard oe-core tuning files) the question "can qemu run binaries created for ${MACHINE}?" could be answered automatically.

I think the "correct" way to do this is through MACHINE_FEATURES with QEMU_EXTRAOPTIONS being used at the class level to sort out the flags for qemu. The naming of the option within MACHINE_FEATURES is obviously suboptimal at the moment though as Alex mentions.

I guess we did it this way since it meant we could easily use COMBINED_FEATURES but we could have differently named options in there at the cost of a bit of extra code.

Cheers,

Richard

#8 lore raw

PATCH 2/8 default-distrovars.inc: add gobject-introspection-data to DISTRO_FEATURES_DEFAULT

In reply to Andre McCurdy

Enable gobject introspection by default for all distros which respect DISTRO_FEATURES_DEFAULT.

---
 meta/conf/distro/include/default-distrovars.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/distro/include/default-distrovars.inc +1 -1
index ce42bde..8c9c5c1 100644
@@ -9,7 +9,7 @@ ENABLE_BINARY_LOCALE_GENERATION ?= "1"
 LOCALE_UTF8_ONLY ?= "0"
 LOCALE_UTF8_IS_DEFAULT ?= "1"
 
-DISTRO_FEATURES_DEFAULT ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11"
+DISTRO_FEATURES_DEFAULT ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 gobject-introspection-data"
 DISTRO_FEATURES_LIBC_DEFAULT ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
 					libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
 					libc-getlogin libc-idn libc-inet-anl libc-libm libc-locales libc-locale-code \
Signature · 1 line
1.9.1
#9 lore raw

PATCH 3/8 qemu.inc: add gobject-introspection-data to MACHINE_FEATURES

In reply to Andre McCurdy

Enable gobject-introspection-data by default for all qemu machines.

---
 meta/conf/machine/include/qemu.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/machine/include/qemu.inc +1 -1
index f44dbe6..70879bb 100644
@@ -11,7 +11,7 @@ XSERVER ?= "xserver-xorg \
             xf86-video-fbdev \
             xf86-input-keyboard"
 
-MACHINE_FEATURES = "alsa bluetooth usbgadget screen"
+MACHINE_FEATURES = "alsa bluetooth gobject-introspection-data screen usbgadget"
 
 MACHINEOVERRIDES =. "qemuall:"
 
Signature · 1 line
1.9.1
#10 lore raw

PATCH 4/8 arch-x86.inc: disable gobject introspection for x86-64 x32 builds

In reply to Andre McCurdy

Since gobject introspection is no longer backfilled into existing machine configurations, it needs to be removed from MACHINE_FEATURES directly when building for x86-64 x32.

---
 meta/conf/machine/include/x86/arch-x86.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/machine/include/x86/arch-x86.inc +1 -1
index ba7be8a..665da89 100644
@@ -25,7 +25,7 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', ' -mx32', '', d)}"
 TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-m elf32_x86_64', '', d)}"
 TUNE_ASARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-x32', '', d)}"
 # user mode qemu doesn't support x32
-MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'gobject-introspection-data', '', d)}"
+MACHINE_FEATURES_remove = "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'gobject-introspection-data', '', d)}"
 
 # ELF64 ABI
 TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
Signature · 1 line
1.9.1
#11 lore raw

PATCH 5/8 qemuarm64.conf: don't clear MACHINE_FEATURES

In reply to Andre McCurdy

Accept the default MACHINE_FEATURES from qemu.inc (qemuarm64 shouldn't need to be a special case).

---
 meta/conf/machine/qemuarm64.conf | 2 --
 1 file changed, 2 deletions(-)
meta/conf/machine/qemuarm64.conf +0 -2
index 8459d0f..f59fb15 100644
@@ -5,8 +5,6 @@
 require conf/machine/include/arm/arch-armv8.inc
 require conf/machine/include/qemu.inc
 
-MACHINE_FEATURES = ""
-
 KERNEL_IMAGETYPE = "Image"
 
 SERIAL_CONSOLES = "38400;ttyAMA0 38400;hvc0"
Signature · 1 line
1.9.1
#12 lore raw

PATCH 6/8 gobject-introspection.bbclass: wrap comments at 80 columns

In reply to Andre McCurdy

Whitespace and comment updates only, no functional changes.

---
 meta/classes/gobject-introspection.bbclass | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)
meta/classes/gobject-introspection.bbclass +12 -14
index ef51629..d8b8b3e 100644
@@ -1,22 +1,22 @@
 # Inherit this class in recipes to enable building their introspection files
 
-# This allows disabling introspection support in recipes
-# (and therefore avoiding the use of qemu)
-# if gobject-introspection-data is omitted from DISTRO_FEATURES and MACHINE_FEATURES.
+# This allows disabling introspection support (and therefore avoiding the use
+# of qemu) in recipes if gobject-introspection-data is omitted from
+# DISTRO_FEATURES or MACHINE_FEATURES.
 EXTRA_OECONF_prepend = "${@bb.utils.contains('COMBINED_FEATURES', 'gobject-introspection-data', '--enable-introspection', '--disable-introspection', d)} "
 
 UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection"
 
-# Generating introspection data depends on a combination of native and target introspection tools,
-# and qemu to run the target tools.
+# Generating introspection data depends on a combination of native and target
+# introspection tools, and qemu to run the target tools.
 DEPENDS_append = " gobject-introspection gobject-introspection-native qemu-native"
 
-# This is necessary for python scripts to succeed - distutils
-# failes if these are not set
+# This is necessary for python scripts to succeed - distutils fails if these
+# are not set
 export BUILD_SYS
 export HOST_SYS
-export STAGING_LIBDIR
 export STAGING_INCDIR
+export STAGING_LIBDIR
 
 # This is used by introspection tools to find .gir includes
 export XDG_DATA_DIRS = "${STAGING_DATADIR}"
@@ -28,12 +28,10 @@ do_configure_prepend_class-target () {
     cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4
 }
 
-
-# .typelib files are needed at runtime and so they go to the main package
-# (so they'll be together with libraries they support).
+# .typelib files are needed at runtime and so they go to the main package (so
+# they'll be together with libraries they support).
 FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" 
     
-# .gir files go to dev package, as they're needed for developing (but not for running)
-# things that depends on introspection.
+# .gir files go to dev package, as they're needed for developing (but not for
+# running) things that depends on introspection.
 FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
-
Signature · 1 line
1.9.1
#13 lore raw

PATCH 7/8 gobject-introspection.bbclass: make additional DEPENDS conditional

In reply to Andre McCurdy

Make gobject introspection specific dependencies conditional on gobject introspection being enabled.

---
 meta/classes/gobject-introspection.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/gobject-introspection.bbclass +1 -1
index d8b8b3e..eb0e7ad 100644
@@ -9,7 +9,7 @@ UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspe
 
 # Generating introspection data depends on a combination of native and target
 # introspection tools, and qemu to run the target tools.
-DEPENDS_append = " gobject-introspection gobject-introspection-native qemu-native"
+DEPENDS_append = " ${@bb.utils.contains('COMBINED_FEATURES', 'gobject-introspection-data', 'gobject-introspection gobject-introspection-native qemu-native', '', d)}"
 
 # This is necessary for python scripts to succeed - distutils fails if these
 # are not set
Signature · 1 line
1.9.1
#14 lore raw

Re: [PATCH 7/8] gobject-introspection.bbclass: make additional DEPENDS conditional

Quoted 9 lines · Andre McCurdy

# Generating introspection data depends on a combination of native and
target

 # introspection tools, and qemu to run the target tools.
-DEPENDS_append = " gobject-introspection gobject-introspection-native
qemu-native"
+DEPENDS_append = " ${@bb.utils.contains('COMBINED_FEATURES',
'gobject-introspection-data', 'gobject-introspection
gobject-introspection-native qemu-native', '', d)}"

Have you verified this works with g-i disabled and a clean sysroot? I'm thinking builds will still need at least some of this to provide the m4 macros.

Ross

#15 lore raw

Re: [PATCH 7/8] gobject-introspection.bbclass: make additional DEPENDS conditional

Quoted 16 lines · Ross
Quoted 9 lines · Andre McCurdy

# Generating introspection data depends on a combination of native and
target

 # introspection tools, and qemu to run the target tools.
-DEPENDS_append = " gobject-introspection gobject-introspection-native
qemu-native"
+DEPENDS_append = " ${@bb.utils.contains('COMBINED_FEATURES',
'gobject-introspection-data', 'gobject-introspection
gobject-introspection-native qemu-native', '', d)}"

Have you verified this works with g-i disabled and a clean sysroot? I'm thinking builds will still need at least some of this to provide the m4 macros.

I'm travelling at the moment, without access to any kind of reasonable build machine... so I have to confess that I didn't test the patch set at all. Please treat everything as RFC.

Quoted 1 line

Ross

#16 lore raw

Re: [PATCH 7/8] gobject-introspection.bbclass: make additional DEPENDS conditional

In reply to Burton, Ross
Quoted 15 lines · Ross
Quoted 9 lines · Andre McCurdy

# Generating introspection data depends on a combination of native and
target

 # introspection tools, and qemu to run the target tools.
-DEPENDS_append = " gobject-introspection gobject-introspection-native
qemu-native"
+DEPENDS_append = " ${@bb.utils.contains('COMBINED_FEATURES',
'gobject-introspection-data', 'gobject-introspection
gobject-introspection-native qemu-native', '', d)}"

Have you verified this works with g-i disabled and a clean sysroot? I'm thinking builds will still need at least some of this to provide the m4 macros.

Even with gobject-introspection-data removed from DISTRO_FEATURES I'm seeing couple recipes (our version of gst-*) failing with:

| configure:22282: error: possibly undefined macro: PKG_CONFIG_SYSROOT_DIR
|       If this token and others are legitimate, please use m4_pattern_allow.
|       See the Autoconf documentation.

and PKG_CONFIG_SYSROOT_DIR is added by introspection.m4 from g-i patchset.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#17 lore raw

Re: [PATCH 7/8] gobject-introspection.bbclass: make additional DEPENDS conditional

Quoted 26 lines · Martin Jansa
Quoted 12 lines · Ross
Quoted 9 lines · Andre McCurdy

# Generating introspection data depends on a combination of
native and
target

 # introspection tools, and qemu to run the target tools.
(quoted diff) +0 -2
-DEPENDS_append = " gobject-introspection gobject-introspection
-native

qemu-native"
+DEPENDS_append = " ${@bb.utils.contains('COMBINED_FEATURES', 'gobject-introspection-data', 'gobject-introspection

Quoted 8 lines
Quoted 2 lines

gobject-introspection-native qemu-native', '', d)}"

Have you verified this works with g-i disabled and a clean sysroot?
I'm
thinking builds will still need at least some of this to provide the m4
macros.

Even with gobject-introspection-data removed from DISTRO_FEATURES I'm seeing
couple recipes (our version of gst-*) failing with:

Quoted 8 lines
Quoted 5 lines

configure:22282: error: possibly undefined macro:
PKG_CONFIG_SYSROOT_DIR
If this token and others are legitimate, please use
m4_pattern_allow.
See the Autoconf documentation.

and PKG_CONFIG_SYSROOT_DIR is added by introspection.m4 from g-i patchset.

Sounds like a missing pkgconfig depends somewhere. Does the g-i class inherit pkgconfig?

Cheers,

Richard

#18 lore raw

Re: [PATCH 7/8] gobject-introspection.bbclass: make additional DEPENDS conditional

In reply to Martin Jansa
Quoted 10 lines

Even with gobject-introspection-data removed from DISTRO_FEATURES I'm seeing
couple recipes (our version of gst-*) failing with:

| configure:22282: error: possibly undefined macro: PKG_CONFIG_SYSROOT_DIR
| If this token and others are legitimate, please use
m4_pattern_allow.
| See the Autoconf documentation.

and PKG_CONFIG_SYSROOT_DIR is added by introspection.m4 from g-i patchset.

Disabling building of introspection data will not guarantee absence of build failures, I'm afraid. Some recipes will work just fine unchanged, but others, including gstreamer, do need custom fixing, usually because they have non-standard locations for m4 macros, or those macros themselves are non-standard. So you need to rebase your recipes on top of those available now in oe-core, and particularly this snippet will fix the immediate problem you have above:

delete_pkg_m4_file() {
# This m4 file is out of date and is missing
PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection

        rm "${S}/common/m4/pkg.m4" || true
}

do_configure[prefuncs] += " delete_pkg_m4_file"

Alex

#19 lore raw

Re: [PATCH 7/8] gobject-introspection.bbclass: make additional DEPENDS conditional

Quoted 19 lines · On Fri, Mar 18, 2016 at 09:22:29PM +0200, [email protected]…
Quoted 10 lines

Even with gobject-introspection-data removed from DISTRO_FEATURES I'm seeing
couple recipes (our version of gst-*) failing with:

| configure:22282: error: possibly undefined macro: PKG_CONFIG_SYSROOT_DIR
| If this token and others are legitimate, please use
m4_pattern_allow.
| See the Autoconf documentation.

and PKG_CONFIG_SYSROOT_DIR is added by introspection.m4 from g-i patchset.

Disabling building of introspection data will not guarantee absence of build failures, I'm afraid. Some recipes will work just fine unchanged, but others, including gstreamer, do need custom fixing, usually because they have non-standard locations for m4 macros, or those macros themselves are non-standard. So you need to rebase your recipes on top of those available now in oe-core, and particularly this snippet will fix the immediate problem you have above:

Quoted 7 lines

delete_pkg_m4_file() {
# This m4 file is out of date and is missing
PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection

        rm "${S}/common/m4/pkg.m4" || true
}

do_configure[prefuncs] += " delete_pkg_m4_file"

Thanks, this did the trick.

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#20 lore raw

PATCH 8/8 gobject-introspection.bbclass: mark as machine specific due to COMBINED_FEATURES

In reply to Andre McCurdy
---
 meta/classes/gobject-introspection.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/gobject-introspection.bbclass +3 -0
index eb0e7ad..8a09e34 100644
@@ -35,3 +35,6 @@ FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
 # .gir files go to dev package, as they're needed for developing (but not for
 # running) things that depends on introspection.
 FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
+
+# Due to use of COMBINED_FEATURES
+PACKAGE_ARCH = "${MACHINE_ARCH}"
Signature · 1 line
1.9.1
#21 lore raw

Re: [PATCH 8/8] gobject-introspection.bbclass: mark as machine specific due to COMBINED_FEATURES

Quoted 10 lines · Andre McCurdy
---
 meta/classes/gobject-introspection.bbclass | 3 +++
 1 file changed, 3 insertions(+)
meta/classes/gobject-introspection.bbclass +0 -0
index eb0e7ad..8a09e34 100644

meta/classes/gobject-introspection.bbclass FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" · line 40

Quoted 6 lines
meta/classes/gobject-introspection.bbclass +3 -0
@@ -35,3 +35,6 @@ FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
 # .gir files go to dev package, as they're needed for developing (but not for
 # running) things that depends on introspection.
 FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
+
+# Due to use of COMBINED_FEATURES
+PACKAGE_ARCH = "${MACHINE_ARCH}"

This was already proposed in:
http://lists.openembedded.org/pipermail/openembedded-core/2016-March/118743.html
thread, but unfortunately rejected :/.

Also this isn't enough, you would need to change all recipes depending on one recipes with this inherit to be MACHINE_ARCH as well.

Regards,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]