* [PATCH 1/4] linux-libc-headers: Add inherit of pkgconfig
2017-02-28 13:35 [PATCH 0/4] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
@ 2017-02-28 13:35 ` Peter Kjellerstedt
2017-02-28 13:35 ` [PATCH 2/4] scripts/dbus-binding-tool: Add a dummy version that always fails Peter Kjellerstedt
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-02-28 13:35 UTC (permalink / raw)
To: openembedded-core
pkg-config is used by the kernel build system when creating the
configuration tools.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 30d2243..653a470 100644
--- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -42,7 +42,7 @@ python __anonymous () {
d.setVar("HEADER_FETCH_VER", "2.6")
}
-inherit kernel-arch
+inherit kernel-arch pkgconfig
KORG_ARCHIVE_COMPRESSION ?= "xz"
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/4] scripts/dbus-binding-tool: Add a dummy version that always fails
2017-02-28 13:35 [PATCH 0/4] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
2017-02-28 13:35 ` [PATCH 1/4] linux-libc-headers: Add inherit of pkgconfig Peter Kjellerstedt
@ 2017-02-28 13:35 ` Peter Kjellerstedt
2017-02-28 13:35 ` [PATCH 3/4] scripts/gdbus-codegen: " Peter Kjellerstedt
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-02-28 13:35 UTC (permalink / raw)
To: openembedded-core
This is intended to catch missing dependencies on the real version.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
scripts/dbus-binding-tool | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100755 scripts/dbus-binding-tool
diff --git a/scripts/dbus-binding-tool b/scripts/dbus-binding-tool
new file mode 100755
index 0000000..2e85987
--- /dev/null
+++ b/scripts/dbus-binding-tool
@@ -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
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 3/4] scripts/gdbus-codegen: Add a dummy version that always fails
2017-02-28 13:35 [PATCH 0/4] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
2017-02-28 13:35 ` [PATCH 1/4] linux-libc-headers: Add inherit of pkgconfig Peter Kjellerstedt
2017-02-28 13:35 ` [PATCH 2/4] scripts/dbus-binding-tool: Add a dummy version that always fails Peter Kjellerstedt
@ 2017-02-28 13:35 ` Peter Kjellerstedt
2017-02-28 13:35 ` [PATCH 4/4] scripts/pkg-config: " Peter Kjellerstedt
2017-02-28 15:56 ` [PATCH 0/4] Add dummy tools to help identify needed dependencies Patrick Ohly
4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-02-28 13:35 UTC (permalink / raw)
To: openembedded-core
This is intended to catch missing dependencies on the real version.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
scripts/gdbus-codegen | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100755 scripts/gdbus-codegen
diff --git a/scripts/gdbus-codegen b/scripts/gdbus-codegen
new file mode 100755
index 0000000..d91386b
--- /dev/null
+++ b/scripts/gdbus-codegen
@@ -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
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 4/4] scripts/pkg-config: Add a dummy version that always fails
2017-02-28 13:35 [PATCH 0/4] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
` (2 preceding siblings ...)
2017-02-28 13:35 ` [PATCH 3/4] scripts/gdbus-codegen: " Peter Kjellerstedt
@ 2017-02-28 13:35 ` Peter Kjellerstedt
2017-02-28 15:56 ` [PATCH 0/4] Add dummy tools to help identify needed dependencies Patrick Ohly
4 siblings, 0 replies; 6+ messages in thread
From: Peter Kjellerstedt @ 2017-02-28 13:35 UTC (permalink / raw)
To: openembedded-core
This is intended to catch missing dependencies on the real version.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
scripts/pkg-config | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100755 scripts/pkg-config
diff --git a/scripts/pkg-config b/scripts/pkg-config
new file mode 100755
index 0000000..c6376ec
--- /dev/null
+++ b/scripts/pkg-config
@@ -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
--
2.9.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/4] Add dummy tools to help identify needed dependencies
2017-02-28 13:35 [PATCH 0/4] Add dummy tools to help identify needed dependencies Peter Kjellerstedt
` (3 preceding siblings ...)
2017-02-28 13:35 ` [PATCH 4/4] scripts/pkg-config: " Peter Kjellerstedt
@ 2017-02-28 15:56 ` Patrick Ohly
4 siblings, 0 replies; 6+ messages in thread
From: Patrick Ohly @ 2017-02-28 15:56 UTC (permalink / raw)
To: Peter Kjellerstedt; +Cc: openembedded-core
On Tue, 2017-02-28 at 14:35 +0100, Peter Kjellerstedt wrote:
> 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.
This is indeed still a problem.
I had also discussed this briefly with Richard. We both had the same
idea: manipulate the PATH so that instead of the initial paths it only
contains a directory with symlinks to tools which are okay to inherit
from the build host. In other words, the basic approach would be to
whitelist acceptable tools.
> 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.
This is the other approach: blacklisting tools which are known to be
problematic.
I suspect the blacklisting approach is going a long way towards solving
the problem, but it'll remain uncertain how complete it is. As it is
fairly simple, it's probably worth merging until someone has the time to
investigate the whitelisting approach further.
Richard had some code for it in some of his experimental branches.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
^ permalink raw reply [flat|nested] 6+ messages in thread