Project

General

Profile

Actions

Bug #889

closed

lttng-modules won't build - Ubuntu 14.04 - kernel 3.16.0-38

Added by Guillaume Duclos-Cianci over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
Start date:
05/26/2015
Due date:
% Done:

0%

Estimated time:

Description

Ubuntu 14.04 LTS
kernel version : 3.16.0-38-generic

lttng-modules git commit :
commit 72906e125de68199709df4d7f390fa12ccba7a16
Author: Alexandre Montplaisir <>
Date: Fri May 22 14:36:53 2015 -0400

build log :
LTTNG_KERNELDIR=/lib/modules/3.16.0-38-generic/build make -C /lib/modules/3.16.0-38-generic/build M=/home/gdc/git/lttng-modules modules
make1: Entering directory `/usr/src/linux-headers-3.16.0-38-generic'
CC [M] /home/gdc/git/lttng-modules/lttng-ring-buffer-client-discard.o
CC [M] /home/gdc/git/lttng-modules/lttng-ring-buffer-client-overwrite.o
CC [M] /home/gdc/git/lttng-modules/lttng-ring-buffer-metadata-client.o
CC [M] /home/gdc/git/lttng-modules/lttng-ring-buffer-client-mmap-discard.o
CC [M] /home/gdc/git/lttng-modules/lttng-ring-buffer-client-mmap-overwrite.o
CC [M] /home/gdc/git/lttng-modules/lttng-ring-buffer-metadata-mmap-client.o
CC [M] /home/gdc/git/lttng-modules/lttng-statedump-impl.o
CC [M] /home/gdc/git/lttng-modules/wrapper/irqdesc.o
CC [M] /home/gdc/git/lttng-modules/wrapper/fdtable.o
CC [M] /home/gdc/git/lttng-modules/lttng-events.o
CC [M] /home/gdc/git/lttng-modules/lttng-abi.o
CC [M] /home/gdc/git/lttng-modules/lttng-probes.o
CC [M] /home/gdc/git/lttng-modules/lttng-context.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-pid.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-procname.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-prio.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-nice.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-vpid.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-tid.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-vtid.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-ppid.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-vppid.o
CC [M] /home/gdc/git/lttng-modules/lttng-calibrate.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-hostname.o
CC [M] /home/gdc/git/lttng-modules/wrapper/random.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng.o
CC [M] /home/gdc/git/lttng-modules/wrapper/trace-clock.o
CC [M] /home/gdc/git/lttng-modules/wrapper/page_alloc.o
CC [M] /home/gdc/git/lttng-modules/lttng-tracker-pid.o
CC [M] /home/gdc/git/lttng-modules/lttng-filter.o
CC [M] /home/gdc/git/lttng-modules/lttng-filter-interpreter.o
CC [M] /home/gdc/git/lttng-modules/lttng-filter-specialize.o
CC [M] /home/gdc/git/lttng-modules/lttng-filter-validator.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-user.o
CC [M] /home/gdc/git/lttng-modules/lttng-syscalls.o
CC [M] /home/gdc/git/lttng-modules/lttng-context-perf-counters.o
CC [M] /home/gdc/git/lttng-modules/lttng-tracepoint.o
LD [M] /home/gdc/git/lttng-modules/lttng-tracer.o
LD [M] /home/gdc/git/lttng-modules/lttng-statedump.o
CC [M] /home/gdc/git/lttng-modules/lib/ringbuffer/ring_buffer_backend.o
CC [M] /home/gdc/git/lttng-modules/lib/ringbuffer/ring_buffer_frontend.o
CC [M] /home/gdc/git/lttng-modules/lib/ringbuffer/ring_buffer_iterator.o
CC [M] /home/gdc/git/lttng-modules/lib/ringbuffer/ring_buffer_vfs.o
CC [M] /home/gdc/git/lttng-modules/lib/ringbuffer/ring_buffer_splice.o
CC [M] /home/gdc/git/lttng-modules/lib/ringbuffer/ring_buffer_mmap.o
CC [M] /home/gdc/git/lttng-modules/lib/prio_heap/lttng_prio_heap.o
CC [M] /home/gdc/git/lttng-modules/lib/../wrapper/splice.o
LD [M] /home/gdc/git/lttng-modules/lib/lttng-lib-ring-buffer.o
/home/gdc/git/lttng-modules/probes/Makefile:40: File ./virt/kvm/iodev.h ./include/kvm/iodev.h not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.
/home/gdc/git/lttng-modules/probes/Makefile:152: Files ./fs/btrfs/*.h not found. Probe "btrfs" is disabled. Use full kernel source tree to enable it.
/home/gdc/git/lttng-modules/probes/Makefile:168: Files ./fs/ext4/*.h not found. Probe "ext4" is disabled. Use full kernel source tree to enable it.
CC [M] /home/gdc/git/lttng-modules/probes/lttng-types.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-sched.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-irq.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-timer.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-kmem.o
In file included from /home/gdc/git/lttng-modules/probes/../instrumentation/events/lttng-module/../../../probes/define_trace.h:100:0,
from /home/gdc/git/lttng-modules/probes/../instrumentation/events/lttng-module/kmem.h:311,
from /home/gdc/git/lttng-modules/probes/lttng-probe-kmem.c:47:
/home/gdc/git/lttng-modules/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:134:6: error: conflicting types for ‘trace_mm_page_alloc_extfrag’
void trace_##_name(proto);
^
/home/gdc/git/lttng-modules/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:48:2: note: in expansion of macro ‘LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP’
LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(map, name, map, PARAMS, PARAMS)
^
/home/gdc/git/lttng-modules/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/kmem.h:233:1: note: in expansion of macro ‘LTTNG_TRACEPOINT_EVENT_MAP’
LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
^
In file included from include/trace/events/kmem.h:8:0,
from /home/gdc/git/lttng-modules/probes/lttng-probe-kmem.c:36:
include/linux/tracepoint.h:163:21: note: previous definition of ‘trace_mm_page_alloc_extfrag’ was here
static inline void trace
##name(proto) \
^
include/linux/tracepoint.h:270:3: note: in expansion of macro ‘__DECLARE_TRACE’
_DECLARE_TRACE(name, PARAMS, PARAMS, 1, \
^
include/linux/tracepoint.h:404:2: note: in expansion of macro ‘DECLARE_TRACE’
DECLARE_TRACE(name, PARAMS, PARAMS)
^
include/trace/events/kmem.h:267:1: note: in expansion of macro ‘TRACE_EVENT’
TRACE_EVENT(mm_page_alloc_extfrag,
^
make3: * [/home/gdc/git/lttng-modules/probes/lttng-probe-kmem.o] Error 1
make2:
[/home/gdc/git/lttng-modules/probes] Error 2
make1:
[_module
/home/gdc/git/lttng-modules] Error 2
make1: Leaving directory `/usr/src/linux-headers-3.16.0-38-generic'
make: *
[default] Error 2


Files

Actions #1

Updated by Anonymous over 9 years ago

Hmm, I should have seen that coming, the patch at
http://git.lttng.org/?p=lttng-modules.git;a=blobdiff;f=instrumentation/events/lttng-module/kmem.h;h=1d4eb62bc0509d85b17439367dc675b9d8978574;hp=ee83d3863a97821e6e3372dc95c001c214096fa4;hb=72906e125de68199709df4d7f390fa12ccba7a16;hpb=84c7055e17f9bf7628fe1004db732d932ed2a77b

covered for 14.04's 3.13 kernel, but it was obvious they were going to cherry-pick the same patch to their 3.16 branch too.

Their 3.16 branch ( http://kernel.ubuntu.com/git/ubuntu/ubuntu-trusty.git/log/?h=lts-backport-utopic ) does not seem to have any tags though, so I can't really tell in which version the change was introduced. So let's assume it arrived with 3.16.0-38, it will work for anyone who updates to the latest package version.

Actions #2

Updated by Anonymous over 9 years ago

Can you try the attached patch please? I don't have a 14.04 install at hand, and I'd like to have the fix tested before sending it upstream. ;)

Just pull the lttng-modules git locally, apply the patch with `git am`, and run `make`. It should test how the eventual PPA package will behave.

Actions #3

Updated by Guillaume Duclos-Cianci over 9 years ago

I tried the patch and got a new error:

LTTNG_KERNELDIR=/lib/modules/3.16.0-38-generic/build make -C /lib/modules/3.16.0-38-generic/build M=/home/gdc/git/lttng-modules modules
make1: Entering directory `/usr/src/linux-headers-3.16.0-38-generic'
/home/gdc/git/lttng-modules/probes/Makefile:40: File ./virt/kvm/iodev.h ./include/kvm/iodev.h not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.
/home/gdc/git/lttng-modules/probes/Makefile:152: Files ./fs/btrfs/*.h not found. Probe "btrfs" is disabled. Use full kernel source tree to enable it.
/home/gdc/git/lttng-modules/probes/Makefile:168: Files ./fs/ext4/*.h not found. Probe "ext4" is disabled. Use full kernel source tree to enable it.
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-kmem.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-module.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-power.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-statedump.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-kvm.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-signal.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-block.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-napi.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-skb.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-net.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-sock.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-udp.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-asoc.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-gpio.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-jbd2.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-regulator.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-scsi.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-vmscan.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-compaction.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-printk.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-random.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-rcu.o
CC [M] /home/gdc/git/lttng-modules/probes/lttng-probe-regmap.o
In file included from /home/gdc/git/lttng-modules/probes/lttng-probe-regmap.c:40:0:
include/trace/events/regmap.h:10:51: fatal error: ../../../drivers/base/regmap/internal.h: No such file or directory
#include "../../../drivers/base/regmap/internal.h"
^
compilation terminated.
make3: * [/home/gdc/git/lttng-modules/probes/lttng-probe-regmap.o] Error 1
make2:
[/home/gdc/git/lttng-modules/probes] Error 2
make1:
[_module_/home/gdc/git/lttng-modules] Error 2
make1: Leaving directory `/usr/src/linux-headers-3.16.0-38-generic'
make: *
[default] Error 2

Actions #4

Updated by Anonymous over 9 years ago

A fix has been merged upstream for the second error you were experiencing:
http://git.lttng.org/?p=lttng-modules.git;a=commit;h=89a073a2af0fb5000d6d85bea20258a78a678b29

It also fixes it on my Ubuntu Vivid 3.19 kernel, which was incidentally broken too!

I've posted the patch from comment #2 to the mailing list. Let us know if you still get errors after both of these patches.

Actions #5

Updated by Guillaume Duclos-Cianci over 9 years ago

It does build now thank you! The only things left are the following which are not errors I guess.

LTTNG_KERNELDIR=/lib/modules/3.16.0-38-generic/build make -C /lib/modules/3.16.0-38-generic/build M=/home/gdc/git/lttng-modules modules
make1: Entering directory `/usr/src/linux-headers-3.16.0-38-generic'
/home/gdc/git/lttng-modules/probes/Makefile:40: File ./virt/kvm/iodev.h ./include/kvm/iodev.h not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.
/home/gdc/git/lttng-modules/probes/Makefile:152: Files ./fs/btrfs/*.h not found. Probe "btrfs" is disabled. Use full kernel source tree to enable it.
/home/gdc/git/lttng-modules/probes/Makefile:168: Files ./fs/ext4/*.h not found. Probe "ext4" is disabled. Use full kernel source tree to enable it.
/home/gdc/git/lttng-modules/probes/Makefile:199: File ./drivers/base/regmap/trace.h not found. Probe "regmap" is disabled. Need Linux 4.1+ kernel source tree to enable it.
Building modules, stage 2.
MODPOST 43 modules
WARNING: "get_pfnblock_flags_mask" [/home/gdc/git/lttng-modules/probes/lttng-probe-kmem.ko] undefined!
make1: Leaving directory `/usr/src/linux-headers-3.16.0-38-generic'

Actions #6

Updated by Anonymous over 9 years ago

  • Status changed from New to Resolved
  • Target version set to 2.7

Both patches have now been merged to master, modules should compile on Ubuntu 3.16 again (for now!).

Actions

Also available in: Atom PDF