[ltt-dev] multiple definition of `trace_clock' problem on linux-2.6.30-rc5

Steve Langstaff steve.langstaff at pebblebay.com
Thu May 28 10:31:23 EDT 2009

Hi All.

I am having the following trouble compiling kernel linux-2.6.30-rc5 when
patched with patch-2.6.30-rc5-lttng-0.136 and wondered if this is a known

  LD      kernel/time/built-in.o
  CC      kernel/trace/ring_buffer.o
  CC      kernel/trace/trace.o
  CC      kernel/trace/trace_clock.o
  CC      kernel/trace/trace_output.o
  CC      kernel/trace/trace_stat.o
  CC      kernel/trace/trace_printk.o
  CC      kernel/trace/trace_nop.o
  CC      kernel/trace/trace-clock-32-to-64.o
  CC      kernel/trace/trace-clock.o
  LD      kernel/trace/built-in.o
kernel/trace/trace-clock.o:(.bss+0x0): multiple definition of `trace_clock'
kernel/trace/trace_clock.o:trace_clock.c:(.text+0x0): first defined here
arm-linux-ld: Warning: size of symbol `trace_clock' changed from 8 in
kernel/trace/trace_clock.o to 4 in kernel/trace/trace-clock.o
arm-linux-ld: Warning: type of symbol `trace_clock' changed from 2 to 1 in
make[2]: *** [kernel/trace/built-in.o] Error 1
make[1]: *** [kernel/trace] Error 2
make: *** [kernel] Error 2

I *think* that this is because the symbol trace_clock appears as both a
variable and a function.

FILE: include/asm-generic/trace-clock.h:

extern atomic_long_t trace_clock;


FILE: kernel/trace/trace_clock.c:

u64 notrace trace_clock(void)
	return cpu_clock(raw_smp_processor_id());

More information about the lttng-dev mailing list