Bug #814


problem compiling lttng-probe-block on Ubuntu kernel

Added by Julien Desfossez over 8 years ago. Updated over 8 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


Since this patch (;a=commit;h=f131dbbef24a58bb43bbd54119d9b2dad478f21f) was backported to the ubuntu kernel without changing the kernel version (still 3.13.0 while the ABI is 3.13.11), we have the following build failure on Ubuntu kernels :

CC [M]  /home/julien/src/lttng-modules/probes/lttng-probe-block.o
In file included from /home/julien/src/lttng-modules/probes/../instrumentation/events/lttng-module/../../../probes/define_trace.h:139:0,
from /home/julien/src/lttng-modules/probes/../instrumentation/events/lttng-module/block.h:1017,
from /home/julien/src/lttng-modules/probes/lttng-probe-block.c:43:
/home/julien/src/lttng-modules/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:151:6: error: conflicting types for ‘trace_block_rq_complete’
void trace_##_name(proto);
/home/julien/src/lttng-modules/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:117:2: note: in expansion of macro ‘DEFINE_EVENT_MAP’
DEFINE_EVENT_MAP(template, name, name, PARAMS(proto), PARAMS(args))
/home/julien/src/lttng-modules/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/block.h:290:1: note: in expansion of macro ‘DEFINE_EVENT’
DEFINE_EVENT(block_rq_with_error, block_rq_complete,
In file included from include/linux/module.h:18:0,
from /home/julien/src/lttng-modules/probes/lttng-probe-block.c:23:
include/linux/tracepoint.h:168:21: note: previous definition of ‘trace_block_rq_complete’ was here
static inline void trace
##name(proto) \
include/linux/tracepoint.h:265:3: note: in expansion of macro ‘__DECLARE_TRACE’
_DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), 1, \
include/linux/tracepoint.h:399:2: note: in expansion of macro ‘DECLARE_TRACE’
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
include/trace/events/block.h:143:1: note: in expansion of macro ‘TRACE_EVENT’
make[3]: * [/home/julien/src/lttng-modules/probes/lttng-probe-block.o] Error 1
[/home/julien/src/lttng-modules/probes] Error 2
/home/julien/src/lttng-modules] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-30-generic'
make: *
[default] Error 2

After discussing on #ubuntu-kernel, it seems that a new symbol UBUNTU_RELEASE_ABI will soon be merged into 14.04 kernel and most likely in 12.04 as well, so we should be able to detect if we are compiling for a ubuntu kernel and detect the appropriate ABI version.

Until then, CONFIG_VERSION_SIGNATURE seems to be ubuntu-specific, so we can use it in the Ubuntu packages to fix temporarily the problem when we compile on Ubuntu kernels starting at Ubuntu-3.13.0-28.51 (didn't check if 12.04 kernels are affected by the problem), but it won't be merged in lttng-modules since it is too generic and will break stuff on older kernels.


ubuntu.diff (1.06 KB) ubuntu.diff Julien Desfossez, 09/30/2014 05:10 PM
Actions #1

Updated by Julien Desfossez over 8 years ago

For the Ubuntu Precise kernel, the fix needs to integrated starting at Ubuntu-3.2.0-64.96.

Actions #2

Updated by Michael Jeanson over 8 years ago

Would that make sense for the trusty package :

Actions #3

Updated by Jonathan Rajotte over 8 years ago

Currently having the same issues with ubuntu. with module master

Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

and kernel version

Actions #4

Updated by Matthew Khouzam over 8 years ago

bug is still there.
uname -a
Linux computer 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
lttng-modules commit sha1

Actions #5

Updated by Francois Doray over 8 years ago

I have the same bug.
Linux francoisdorsal 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
lttng-modules commit sha1

Actions #6

Updated by Julien Desfossez over 8 years ago

As of ubuntu kernel 3.13.0-31, the UTS_UBUNTU_RELEASE_ABI is available.

The attached patch fixes this problem, I don't know yet if it is mergeable as is.

Actions #7

Updated by Julien Desfossez over 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset modules|commit:f64d76a51b5e20a8c402d1eca921c63fdc5ce9ec.


Also available in: Atom PDF