[lttng-dev] lttng-modules fails to build OOT when modules are built into the linux kernel
Anders Wallin
wallinux at gmail.com
Fri Jul 15 07:08:05 UTC 2016
$ make all O=../kernel_builddir
.....
CC [M] lttng/probes/lttng-kprobes.o
CC [M] lttng/probes/lttng-kretprobes.o
LD lttng/tests/built-in.o
CC [M] lttng/tests/probes/lttng-test.o
Assembler messages:
Fatal error: can't create lttng/tests/probes/lttng-test.o: No such
file or directory
/media/awallin/sda1/home/awallin/src/lttng-test/linux-2.6/scripts/Makefile.build:264:
recipe for target 'lttng/tests/probes/lttng-test.o' failed
make[3]: *** [lttng/tests/probes/lttng-test.o] Error 2
/media/awallin/sda1/home/awallin/src/lttng-test/linux-2.6/scripts/Makefile.build:403:
recipe for target 'lttng/tests' failed
make[2]: *** [lttng/tests] Error 2
/media/awallin/sda1/home/awallin/src/lttng-test/linux-2.6/Makefile:946:
recipe for target 'lttng' failed
make[1]: *** [lttng] Error 2
make[1]: Leaving directory
'/media/awallin/sda1/home/awallin/src/lttng-test/kernel_builddir'
Makefile:146: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
$tree ../kernel_builddir/lttng/tests/
../kernel_builddir/lttng/tests/
└── built-in.o
The subdirectories lttng/tests/clock_plugin and
lttng/tests/clock_plugin/probes are not created when building the
kernel out of tree!
Move the code from the lttng/test/* to lttng/test and it will work
Or use this patch;
---------------------------------------------------------
>From 598d76c5b17ce41ef491e9a643121da9fbdb3ef6 Mon Sep 17 00:00:00 2001
Message-Id: <598d76c5b17ce41ef491e9a643121da9fbdb3ef6.1468566371.git.anders.wallin at windriver.com>
From: Anders Wallin <anders.wallin at windriver.com>
Date: Tue, 5 Jul 2016 14:27:08 +0200
Subject: [PATCH 1/1] lttng28: building tests out of tree fails when using
subdirectories to Kbuild
Signed-off-by: Anders Wallin <anders.wallin at windriver.com>
---
drivers/staging/lttng2.8/tests/Kbuild | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lttng2.8/tests/Kbuild
b/drivers/staging/lttng2.8/tests/Kbuild
index c529a83..86087ca 100644
--- a/drivers/staging/lttng2.8/tests/Kbuild
+++ b/drivers/staging/lttng2.8/tests/Kbuild
@@ -4,8 +4,14 @@ include $(TOP_LTTNG_MODULES_DIR)/Makefile.ABI.workarounds
ccflags-y += -I$(TOP_LTTNG_MODULES_DIR)
-obj-$(CONFIG_LTTNG28) += probes/lttng-test.o
+obj-$(CONFIG_LTTNG28) += lttng-test.o
-obj-$(CONFIG_LTTNG28) += clock-plugin/lttng-clock-plugin-test.o
+obj-$(CONFIG_LTTNG28) += lttng-clock-plugin-test.o
+
+lttng-test-objs := \
+ probes/lttng-test.o
+
+lttng-clock-plugin-test-objs := \
+ clock-plugin/lttng-clock-plugin-test.o
# vim:syntax=make
--
2.9.1
---------------------------------------------------------
Regards
Anders Wallin
More information about the lttng-dev
mailing list