70ea99cfa8
Add linux kernel modules needed to do kernel tracing with LTTng. To make them available to lttng in NixOS, add this to configuration.nix: boot.extraModulePackages = [ pkgs.linuxPackages.lttngModules ];
34 lines
3.3 KiB
Diff
34 lines
3.3 KiB
Diff
When building against linux 3.2, we get this build error:
|
|
|
|
building /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.o
|
|
CC [M] /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.o
|
|
In file included from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:759:0,
|
|
from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/define_trace.h:148,
|
|
from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/ext3.h:868,
|
|
from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.c:48:
|
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h: In function '__event_probe__ext3__page_op':
|
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type
|
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type
|
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type
|
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h: In function '__event_probe__ext3_invalidatepage':
|
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type
|
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type
|
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type
|
|
|
|
because a check for existing ext3/*h files in the kernel build tree is skipped
|
|
for linux < 3.4. Fix it by extending the ext3_dep_check thing to also be run
|
|
when building against linux >= 3.2 (not only linux >= 3.4).
|
|
|
|
diff -uNr lttng-modules-2.2.0.orig/probes/Makefile lttng-modules-2.2.0/probes/Makefile
|
|
--- lttng-modules-2.2.0.orig/probes/Makefile 2013-06-19 03:22:44.000000000 +0200
|
|
+++ lttng-modules-2.2.0/probes/Makefile 2013-07-06 13:22:15.902957717 +0200
|
|
@@ -59,7 +59,7 @@
|
|
ext3_dep_check = $(wildcard $(ext3_dep))
|
|
ext3 = $(shell \
|
|
if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \
|
|
- if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 4 -a \
|
|
+ if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 -a \
|
|
-z "$(ext3_dep_check)" ] ; then \
|
|
echo "warn" ; \
|
|
exit ; \
|