Project

General

Profile

Actions

Bug #814

closed

problem compiling lttng-probe-block on Ubuntu kernel

Added by Julien Desfossez over 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/02/2014
Due date:
% Done:

100%

Estimated time:

Description

Since this patch (http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-trusty.git;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’
TRACE_EVENT(block_rq_complete,
^
make[3]: * [/home/julien/src/lttng-modules/probes/lttng-probe-block.o] Error 1
make[2]:
[/home/julien/src/lttng-modules/probes] Error 2
make[1]:
[_module
/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.
http://paste.ubuntu.com/7737232/


Files

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

Also available in: Atom PDF