lttng-modules: Make it build when CONFIG_TRACEPOINTS is not enabled again
PATCH 1/1 lttng-modules: Make it build when CONFIG_TRACEPOINTS is not enabled again
Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch was updated with the 2.13.0 update (commit 5dad15af), but unfortunately it no longer did what it was intended to do.
--- ...fail-if-CONFIG_TRACEPOINTS-is-not-en.patch | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-)
meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch +25 -17
@@ -1,8 +1,7 @@ -From 1b0e574d680101105a6c1e8931c78824f5a97a42 Mon Sep 17 00:00:00 2001 +From 885926e62f32a29b185dcfe738e61a2358a6b615 Mon Sep 17 00:00:00 2001 From: Otavio Salvador <[email protected]> Date: Mon, 5 Sep 2016 17:08:56 +0000 Subject: [PATCH] Makefile: Do not fail if CONFIG_TRACEPOINTS is not enabled -Organization: O.S. Systems Software LTDA. The lttng-modules are being pulled by the tools-profile image feature, however, not every kernel has the CONFIG_TRACEPOINTS feature enabled.
@@ -16,22 +15,31 @@ Signed-off-by: Otavio Salvador <[email protected]> [bva: modified for lttng-modules 2.13+ context] Signed-off-by: Bruce Ashfield <[email protected]> --- - Makefile | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) + src/Kbuild | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) -Index: lttng-modules-2.13.0/Makefile -=================================================================== ---- lttng-modules-2.13.0.orig/Makefile -+++ lttng-modules-2.13.0/Makefile -@@ -7,6 +7,11 @@ +diff --git a/src/Kbuild b/src/Kbuild +index 7137874..04eb5c9 100644 +--- a/src/Kbuild ++++ b/src/Kbuild +@@ -2,10 +2,13 @@ - obj-$(CONFIG_LTTNG) += src/ + ifdef CONFIG_LOCALVERSION # Check if dot-config is included. + ifeq ($(CONFIG_TRACEPOINTS),) +- $(error The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration) ++ $(warning The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration) ++ DISABLE_MODULE = y + endif # CONFIG_TRACEPOINTS + endif # ifdef CONFIG_LOCALVERSION -+ ifdef CONFIG_LOCALVERSION # Check if dot-config is included. -+ ifneq ($(CONFIG_TRACEPOINTS),) -+ $(warning The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration) -+ endif # CONFIG_TRACEPOINTS -+ endif # ifdef CONFIG_LOCALVERSION - else # KERNELRELEASE ++ifneq ($(DISABLE_MODULE),y) ++ + TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))/.. - # This part of the Makefile is used when the 'make' command is runned in the + lttng_check_linux_version = $(shell pwd)/include/linux/version.h +@@ -150,3 +153,5 @@ lttng-statedump-objs := lttng-statedump-impl.o + obj-$(CONFIG_LTTNG) += probes/ + obj-$(CONFIG_LTTNG) += lib/ + obj-$(CONFIG_LTTNG) += tests/ ++ ++endif # DISABLE_MODULE
Hello Peter,
meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch
Quoted 11 lines · Peter Kjellerstedt
Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch was updated with the 2.13.0 update (commit
5dad15af), but unfortunately it no longer did what it was intended to do.Signed-off-by Peter Kjellerstedt <[email protected]>--- ...fail-if-CONFIG_TRACEPOINTS-is-not-en.patch | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-)meta/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch +0
-0
I guess the patch you've refreshed is not a correct one...
There is another patch introduced by Bruce in the commit 18bf7b0 ("lttng-modules: update devupstream to v2.13-rc "), namely 0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch
It make sense to refresh rather that one instead of the Makefile one, and have it included in the SRC_URI (see discussion in
https://lists.openembedded.org/g/openembedded-core/topic/84950303#154888).
--
Regards,
Andrey.
Quoted 34 lines
-----Original Message-----
From: Andrey Zhizhikin <[email protected]>
Sent: den 25 augusti 2021 12:20
To: Peter Kjellerstedt <[email protected]>
Cc: Bruce Ashfield <[email protected]>; OE Core mailing list <[email protected]>
Subject: Re: [OE-core] [PATCH] lttng-modules: Make it build whenCONFIG_TRACEPOINTSis not enabled againHello Peter,
Review
Quoted 11 lines · Peter Kjellerstedt
Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch was updated with the 2.13.0 update (commit
5dad15af), but unfortunately it no longer did what it was intended to do.Signed-off-by Peter Kjellerstedt <[email protected]>--- ...fail-if-CONFIG_TRACEPOINTS-is-not-en.patch | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-)(quoted diff) +0
-0fail-if-CONFIG_TRACEPOINTS-is-not-en.patch b/meta/recipes-
kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patchI guess the patch you've refreshed is not a correct one...
There is another patch introduced by Bruce in the commit 18bf7b0 ("lttng-modules: update devupstream to v2.13-rc "), namely 0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch
Quoted 7 lines
It make sense to refresh rather that one instead of the
Makefileone, and have it included in theSRC_URI(see discussion in
https://lists.openembedded.org/g/openembedded-core/topic/84950303#154888).--
Regards,
Andrey.
Right, I had missed that there were two patches doing the same thing (though neither actually solved the problem after the update to 2.13.0). I will send an updated review unifying the patches and adding my solution to disable building the module when CONFIG_TRACEPOINTS is not enabled.
//Peter
Quoted 39 lines · Peter Kjellerstedt
Quoted 39 lines
-----Original Message-----
From: Andrey Zhizhikin <[email protected]>
Sent: den 25 augusti 2021 12:20
To: Peter Kjellerstedt <[email protected]>
Cc: Bruce Ashfield <[email protected]>; OE Core mailing list <[email protected]>
Subject: Re: [OE-core] [PATCH] lttng-modules: Make it build whenCONFIG_TRACEPOINTSis not enabled againHello Peter,
Review
Quoted 11 lines · Peter Kjellerstedt
Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch was updated with the 2.13.0 update (commit
5dad15af), but unfortunately it no longer did what it was intended to do.Signed-off-by Peter Kjellerstedt <[email protected]>--- ...fail-if-CONFIG_TRACEPOINTS-is-not-en.patch | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-)(quoted diff) +0
-0fail-if-CONFIG_TRACEPOINTS-is-not-en.patch b/meta/recipes-
kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patchI guess the patch you've refreshed is not a correct one...
There is another patch introduced by Bruce in the commit 18bf7b0 ("lttng-modules: update devupstream to v2.13-rc "), namely 0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch
It make sense to refresh rather that one instead of the
Makefileone, and have it included in theSRC_URI(see discussion in
https://lists.openembedded.org/g/openembedded-core/topic/84950303#154888).
Quoted 9 lines
Quoted 3 lines
--
Regards,
Andrey.Right, I had missed that there were two patches doing the same thing (though neither actually solved the problem after the update to 2.13.0). I will send an updated review unifying the patches and adding my solution to disable building the module when
CONFIG_TRACEPOINTSis not enabled.
We really should stop dragging these patches along at all.
I have a unified set of patches here as well, but continuing to allow lttng modules to build in configurations like these, just doesn't make sense (which is why I haven't sent them).
We should have a distro feature, and simply drop it from package lists when appropriate.
Bruce
Quoted 2 lines
//Peter
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 69 lines
-----Original Message-----
From: Bruce Ashfield <[email protected]>
Sent: den 25 augusti 2021 15:18
To: Peter Kjellerstedt <[email protected]>
Cc: Andrey Zhizhikin <[email protected]>; OE Core mailing list <[email protected]>
Subject: Re: [OE-core] [PATCH] lttng-modules: Make it build whenCONFIG_TRACEPOINTSis not enabled againQuoted 10 lines · Peter Kjellerstedt
Quoted 10 lines
-----Original Message-----
From: Andrey Zhizhikin <[email protected]>
Sent: den 25 augusti 2021 12:20
To: Peter Kjellerstedt <[email protected]>
Cc: Bruce Ashfield <[email protected]>; OE Core mailing list <[email protected]>
Subject: Re: [OE-core] [PATCH] lttng-modules: Make it build whenCONFIG_TRACEPOINTSis not enabled againQuoted 6 lines
Quoted 6 lines
Hello Peter,
Quoted 2 lines · Peter Kjellerstedt
Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch was
updated
Quoted 1 line
Quoted 1 line
Quoted 1 line
with the 2.13.0 update (commit
5dad15af), but unfortunately it nolonger
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
did what it was intended to do.
Signed-off-by Peter Kjellerstedt <[email protected]>--- ...fail-if-CONFIG_TRACEPOINTS-is-not-en.patch | 42 +++++++++++--------
Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
1 file changed, 25 insertions(+), 17 deletions(-)(quoted diff) +0
-0not-
Quoted 2 lines
Quoted 2 lines
fail-if-CONFIG_TRACEPOINTS-is-not-en.patch b/meta/recipes-
kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-
Quoted 11 lines
Quoted 11 lines
not-en.patch
I guess the patch you've refreshed is not a correct one...
There is another patch introduced by Bruce in the commit 18bf7b0 ("lttng-modules: update devupstream to v2.13-rc "), namely 0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch
It make sense to refresh rather that one instead of the
Makefileone, and have it included in theSRC_URI(see discussion in
https://lists.openembedded.org/g/openembedded-core/topic/84950303#154888).
Quoted 8 lines
Quoted 4 lines
--
Regards,
Andrey.Right, I had missed that there were two patches doing the same thing (though neither actually solved the problem after the update to 2.13.0). I will send an updated review unifying the patches and adding my
solution
Quoted 2 lines
to disable building the module when
CONFIG_TRACEPOINTSis not enabled.We really should stop dragging these patches along at all.
Quoted 10 lines
I have a unified set of patches here as well, but continuing to allow lttng modules to build in configurations like these, just doesn't make sense (which is why I haven't sent them).
We should have a distro feature, and simply drop it from package lists when appropriate.
Bruce
Quoted 1 line
//Peter
I know nothing about lttng myself, but has passed on your concerns to our maintainer for the functionality. Unfortunately he is on vacation for a couple of weeks more, so I do not know when I can expect an answer from him.
So for now I hope we can update the recipe per my patches so that it continues to work as before, and then we can take the discussion of whether it should be possible to build lttng-modules without CONFIG_TRACEPOINTS enabled separately.
//Peter
Quoted 77 lines · Peter Kjellerstedt
Quoted 77 lines
-----Original Message-----
From: Bruce Ashfield <[email protected]>
Sent: den 25 augusti 2021 15:18
To: Peter Kjellerstedt <[email protected]>
Cc: Andrey Zhizhikin <[email protected]>; OE Core mailing list <[email protected]>
Subject: Re: [OE-core] [PATCH] lttng-modules: Make it build whenCONFIG_TRACEPOINTSis not enabled againQuoted 10 lines · Peter Kjellerstedt
Quoted 10 lines
-----Original Message-----
From: Andrey Zhizhikin <[email protected]>
Sent: den 25 augusti 2021 12:20
To: Peter Kjellerstedt <[email protected]>
Cc: Bruce Ashfield <[email protected]>; OE Core mailing list <[email protected]>
Subject: Re: [OE-core] [PATCH] lttng-modules: Make it build whenCONFIG_TRACEPOINTSis not enabled againQuoted 6 lines
Quoted 6 lines
Hello Peter,
Quoted 2 lines · Peter Kjellerstedt
Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch was
updated
Quoted 1 line
Quoted 1 line
Quoted 1 line
with the 2.13.0 update (commit
5dad15af), but unfortunately it nolonger
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
did what it was intended to do.
Signed-off-by Peter Kjellerstedt <[email protected]>--- ...fail-if-CONFIG_TRACEPOINTS-is-not-en.patch | 42 +++++++++++--------
Quoted 3 lines
Quoted 3 lines
Review
Quoted 3 lines
1 file changed, 25 insertions(+), 17 deletions(-)(quoted diff) +0
-0not-
Quoted 2 lines
Quoted 2 lines
fail-if-CONFIG_TRACEPOINTS-is-not-en.patch b/meta/recipes-
kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-
Quoted 11 lines
Quoted 11 lines
not-en.patch
I guess the patch you've refreshed is not a correct one...
There is another patch introduced by Bruce in the commit 18bf7b0 ("lttng-modules: update devupstream to v2.13-rc "), namely 0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch
It make sense to refresh rather that one instead of the
Makefileone, and have it included in theSRC_URI(see discussion in
https://lists.openembedded.org/g/openembedded-core/topic/84950303#154888).
Quoted 8 lines
Quoted 4 lines
--
Regards,
Andrey.Right, I had missed that there were two patches doing the same thing (though neither actually solved the problem after the update to 2.13.0). I will send an updated review unifying the patches and adding my
solution
Quoted 2 lines
to disable building the module when
CONFIG_TRACEPOINTSis not enabled.We really should stop dragging these patches along at all.
I have a unified set of patches here as well, but continuing to allow lttng modules to build in configurations like these, just doesn't make sense (which is why I haven't sent them).
We should have a distro feature, and simply drop it from package lists when appropriate.
Quoted 9 lines
Quoted 3 lines
Bruce
Quoted 1 line
//Peter
I know nothing about lttng myself, but has passed on your concerns to our maintainer for the functionality. Unfortunately he is on vacation for a couple of weeks more, so I do not know when I can expect an answer from him.
No worries.
Quoted 4 lines
So for now I hope we can update the recipe per my patches so that it continues to work as before, and then we can take the discussion of whether it should be possible to build lttng-modules without
CONFIG_TRACEPOINTSenabled separately.
Agreed.
I've chucked my patches that fixed the build here as well, since they were very similar to yours.
I'll continue creating a dummy package / distro feature option here, since pulling those patches along is a particular pain point for me, as I continually hit lttng issues as I work through new kernels :D
Bruce
Quoted 3 lines
//Peter
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II