Add dummy tools to help identify needed dependencies
PATCH v4 2/6 linux-libc-headers: Add inherit of pkgconfig
In reply to Peter Kjellerstedtpkg-config is used by the kernel build system when creating the configuration tools.
--- meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc +1 -1
@@ -42,7 +42,7 @@ python __anonymous () { d.setVar("HEADER_FETCH_VER", "2.6") } -inherit kernel-arch +inherit kernel-arch pkgconfig KORG_ARCHIVE_COMPRESSION ?= "xz"
Signature · 1 line
2.9.0
PATCH v4 1/6 module.bbclass: Add inherit of pkgconfig
In reply to Peter KjellerstedtThis is needed for the make_scripts task.
--- meta/classes/module.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/module.bbclass +1 -1
@@ -1,4 +1,4 @@ -inherit module-base kernel-module-split +inherit module-base kernel-module-split pkgconfig addtask make_scripts after do_prepare_recipe_sysroot before do_compile do_make_scripts[lockfiles] = "${TMPDIR}/kernel-scripts.lock"
Signature · 1 line
2.9.0
PATCH v4 4/6 blacklisted/gdbus-codegen: Add a dummy version that always fails
In reply to Peter KjellerstedtThis is intended to catch missing dependencies on the real version.
--- scripts/blacklisted/gdbus-codegen | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/blacklisted/gdbus-codegen
scripts/blacklisted/gdbus-codegen new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh + +# This is a dummy version that always fails. It is intended to catch +# missing dependencies on the real version. + +myname=${0##*/} + +echo "The correct version of $myname is not being used!" >&2 +echo "Make sure the recipe DEPENDS on 'glib-2.0-native'." >&2 + +exit 1
Signature · 1 line
2.9.0
PATCH v4 5/6 blacklisted/pkg-config: Add a dummy version that always fails
In reply to Peter KjellerstedtThis is intended to catch missing dependencies on the real version.
--- scripts/blacklisted/pkg-config | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/blacklisted/pkg-config
scripts/blacklisted/pkg-config new file +16 -0
@@ -0,0 +1,16 @@ +#!/bin/sh + +# This is a dummy version that always fails. It is intended to catch +# missing dependencies on the real version. + +myname=${0##*/} + +echo "The correct version of $myname is not being used!" >&2 +echo "Make sure the recipe inherits 'pkgconfig'." >&2 + +# Return something that will make the compiler barf. This is for when +# pkg-config is used directly in a Makefile in a construct like: +# CFLAGS += $(shell pkg-config --cflags glib-2.0) +echo "The-correct-version-of-$myname-is-not-being-used" + +exit 1
Signature · 1 line
2.9.0
PATCH v4 6/6 bitbake.conf: Add ${COREBASE}/scripts/blacklisted to ${PATH}
In reply to Peter KjellerstedtThe scripts/blacklisted directory contains dummy tools that blocks out the corresponding tool from the host installation. It is excpected that the correct version of the tools are instead built and installed to the RSS for recipes that need any of these tools.
--- meta/conf/bitbake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/bitbake.conf +1 -1
@@ -446,7 +446,7 @@ EXTRA_IMAGEDEPENDS = "" # Toolchain info. ################################################################## -PATH_prepend = "${COREBASE}/scripts:${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:" +PATH_prepend = "${COREBASE}/scripts:${STAGING_BINDIR_TOOLCHAIN}:${STAGING_BINDIR_CROSS}:${STAGING_DIR_NATIVE}${sbindir_native}:${STAGING_BINDIR_NATIVE}:${STAGING_DIR_NATIVE}${base_sbindir_native}:${STAGING_DIR_NATIVE}${base_bindir_native}:${COREBASE}/scripts/blacklisted:" export PATH ##################################################################
Signature · 1 line
2.9.0
PATCH v4 3/6 blacklisted/dbus-binding-tool: Add a dummy version that always fails
In reply to Peter KjellerstedtThis is intended to catch missing dependencies on the real version.
--- scripts/blacklisted/dbus-binding-tool | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 scripts/blacklisted/dbus-binding-tool
scripts/blacklisted/dbus-binding-tool new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh + +# This is a dummy version that always fails. It is intended to catch +# missing dependencies on the real version. + +myname=${0##*/} + +echo "The correct version of $myname is not being used!" >&2 +echo "Make sure the recipe DEPENDS on 'dbus-glib-native'." >&2 + +exit 1
Signature · 1 line
2.9.0
v4 cover Add dummy tools to help identify needed dependencies
After the introduction of RSS, I still found it hard to get dependencies on some common tools that are typically installed on the build host correct. Using the wrong version of tools like pkg-config, gdbus-codegen and dbus-binding-tool can cause build failures.
To circumvent this, I created dummy versions of the tools that always fail and placed them in the scripts directory. Thus, if the real tool has not been installed in the RSS, the dummy version is used and the build fails. For good measures I even output a message that says what needs to be corrected in the recipe.
Included is also an update to linux-libc-headers as it apparently needs to inherit pkgconfig, which the introduction of the dummy version of pkg-config showed.
PATCHv2: Also inherit pkgconfig in module.bbclass since pkg-config is needed for the make_scripts task.
PATCHv3: Add a missing Signed-off-by footer.
PATCHv4: Move the dummy scripts to scripts/blacklisted and add it to PATH in bitbake.conf.
//Peter
The following changes since commit 2e5181e510f3fffee53cfeab0380e8ad9b5ae60c:
testsdk: Fix lockfile patch (2017-03-03 12:21:09 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib pkj/dummy_tools
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/dummy_tools
Peter Kjellerstedt (6):
module.bbclass: Add inherit of pkgconfig
linux-libc-headers: Add inherit of pkgconfig blacklisted/dbus-binding-tool: Add a dummy version that always fails blacklisted/gdbus-codegen: Add a dummy version that always fails blacklisted/pkg-config: Add a dummy version that always fails bitbake.conf: Add ${COREBASE}/scripts/blacklisted to ${PATH}
meta/classes/module.bbclass | 2 +- meta/conf/bitbake.conf | 2 +- .../linux-libc-headers/linux-libc-headers.inc | 2 +- scripts/blacklisted/dbus-binding-tool | 11 +++++++++++ scripts/blacklisted/gdbus-codegen | 11 +++++++++++ scripts/blacklisted/pkg-config | 16 ++++++++++++++++ 6 files changed, 41 insertions(+), 3 deletions(-) create mode 100755 scripts/blacklisted/dbus-binding-tool create mode 100755 scripts/blacklisted/gdbus-codegen create mode 100755 scripts/blacklisted/pkg-config
Signature · 1 line
2.9.0