-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lttng-modules: Fix compilation with our Android Frankenkernels #721
base: scarthgap
Are you sure you want to change the base?
Conversation
Our Android Frankenkernels have some patches that aren't in mainline kernel or landed in a newer version, so lttng's kernel version check isn't valid. Fixes the following for Mido, Rosy, Sargo and Tissot: In file included from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/define_trace.h:87, from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/instrumentation/events/sched.h:729, from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/lttng-probe-sched.c:28: /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:133:6: error: conflicting types for 'trace_sched_migrate_task'; have 'void(struct task_struct *, int)' 133 | void trace_##_name(_proto); | ^~~~~~ /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:45:9: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP' 45 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:87:9: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_MAP' 87 | LTTNG_TRACEPOINT_EVENT_MAP(name, name, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~ /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/instrumentation/events/sched.h:435:1: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT' 435 | LTTNG_TRACEPOINT_EVENT(sched_migrate_task, | ^~~~~~~~~~~~~~~~~~~~~~ In file included from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/trace/events/sched.h:8, from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/lttng-probe-sched.c:17: /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/linux/tracepoint.h:183:28: note: previous definition of 'trace_sched_migrate_task' with type 'void(struct task_struct *, int, unsigned int)' 183 | static inline void trace_##name(proto) \ | ^~~~~~ /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/linux/tracepoint.h:348:9: note: in expansion of macro '__DECLARE_TRACE' 348 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ | ^~~~~~~~~~~~~~~ /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/linux/tracepoint.h:484:9: note: in expansion of macro 'DECLARE_TRACE' 484 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) | ^~~~~~~~~~~~~ /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/trace/events/sched.h:872:1: note: in expansion of macro 'TRACE_EVENT' 872 | TRACE_EVENT(sched_migrate_task, | ^~~~~~~~~~~ In file included from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/define_trace.h:87, from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/instrumentation/events/mm_vmscan.h:854, from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/lttng-probe-vmscan.c:29: /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:133:6: error: conflicting types for 'trace_mm_vmscan_lru_isolate'; have 'void(int, int, long unsigned int, long unsigned int, long unsigned int, isolate_mode_t, int)' {aka 'void(int, int, long unsigned int, long unsigned int, long unsigned int, unsigned int, int)'} 133 | void trace_##_name(_proto); | ^~~~~~ /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:98:9: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP' 98 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(template, name, name, PARAMS(proto), PARAMS(args)) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/instrumentation/events/mm_vmscan.h:454:1: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE' 454 | LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/trace/events/vmscan.h:8, from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/lttng-probe-vmscan.c:18: /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/linux/tracepoint.h:183:28: note: previous definition of 'trace_mm_vmscan_lru_isolate' with type 'void(int, int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, isolate_mode_t, int)' {aka 'void(int, int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, unsigned int, int)'} Signed-off-by: Herman van Hazendonk <[email protected]>
@shr-project Build tested on Tissot & Sargo. Will test mido-halium and Rosy as well just to be sure, but based on code should work. Though Rosy is on 3.18 still it seems. |
So we don't make it machine specific. Signed-off-by: Herman van Hazendonk <[email protected]>
Rosy has been mainlined, so it's not an issue anymore. |
2024-05-10.log: |
May I propose another, more radical approach to this issue here, after having gone through a build error with tenderloin-halium. In OSE, the webos-lttng class takes charge of adding needed lttng DEPENDS and RDEPENDS to the recipes that include it, based on the WEBOS_LTTNG_ENABLED distro variable. However, in pmtrace.bb, there is both the inherit on webos-lttng, and the DEPENDS and RDEPENDS on lttng harcoded in the recipe. This looks like a mistake, only the inherit should be needed here. Maybe the easiest way to go is to patch pmtrace.bb (maybe via a bbappend) to remove any lttng reference from DEPENDS and RDEPENDS ? |
Our Android Frankenkernels have some patches that aren't in mainline kernel or landed in a newer version, so lttng's kernel version check isn't valid.
Fixes the following for Mido, Rosy, Sargo and Tissot:
In file included from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/define_trace.h:87,
from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/instrumentation/events/sched.h:729,
from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/lttng-probe-sched.c:28:
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:133:6: error: conflicting types for 'trace_sched_migrate_task'; have 'void(struct task_struct *, int)'
133 | void trace_##_name(proto);
| ^~~~~~
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:45:9: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP'
45 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:87:9: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_MAP'
87 | LTTNG_TRACEPOINT_EVENT_MAP(name, name,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/instrumentation/events/sched.h:435:1: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT'
435 | LTTNG_TRACEPOINT_EVENT(sched_migrate_task,
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/trace/events/sched.h:8,
from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/lttng-probe-sched.c:17:
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/linux/tracepoint.h:183:28: note: previous definition of 'trace_sched_migrate_task' with type 'void(struct task_struct *, int, unsigned int)'
183 | static inline void trace##name(proto)
| ^~~~~~
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/linux/tracepoint.h:348:9: note: in expansion of macro '__DECLARE_TRACE'
348 | _DECLARE_TRACE(name, PARAMS(proto), PARAMS(args),
| ^~~~~~~~~~~~~~~
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/linux/tracepoint.h:484:9: note: in expansion of macro 'DECLARE_TRACE'
484 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/trace/events/sched.h:872:1: note: in expansion of macro 'TRACE_EVENT'
872 | TRACE_EVENT(sched_migrate_task,
| ^~~~~~~~~~~
In file included from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/define_trace.h:87,
from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/instrumentation/events/mm_vmscan.h:854,
from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/lttng-probe-vmscan.c:29:
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:133:6: error: conflicting types for 'trace_mm_vmscan_lru_isolate'; have 'void(int, int, long unsigned int, long unsigned int, long unsigned int, isolate_mode_t, int)' {aka 'void(int, int, long unsigned int, long unsigned int, long unsigned int, unsigned int, int)'}
133 | void trace##_name(_proto);
| ^~~~~~
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/lttng/tracepoint-event-impl.h:98:9: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP'
98 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(template, name, name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/../../include/instrumentation/events/mm_vmscan.h:454:1: note: in expansion of macro 'LTTNG_TRACEPOINT_EVENT_INSTANCE'
454 | LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/trace/events/vmscan.h:8,
from /media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work/sargo-webos-linux/lttng-modules/2.13.12/lttng-modules-2.13.12/src/probes/lttng-probe-vmscan.c:18:
/media/herrie/LuneOS/scarthgap/webos-ports/tmp-glibc/work-shared/sargo/kernel-source/include/linux/tracepoint.h:183:28: note: previous definition of 'trace_mm_vmscan_lru_isolate' with type 'void(int, int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, isolate_mode_t, int)' {aka 'void(int, int, long unsigned int, long unsigned int, long unsigned int, long unsigned int, unsigned int, int)'}