build errors

Marcin Krol admin@domeny.pl
Fri Nov 30 04:30:00 GMT 2007


Hello Eugeniy,
>> Hello everyone,
>>
>> I'm a new user of systemtap on Debian Etch 4.0r1 and have terrible problems 
>> building it from source available from CVS (binary package available by 
>> default on Etch can't even compile "hello world" example from tutorial 
>> without throwing compilation errors).
>>     
> Hmm, isn't systemtap package available in Etch?
>   
Yep. Tried it first. As much as I love Debian package system + repos, 
this package is badly outdated and broken. At least on 64-bit Etch/Xeon 
combo which I use. Not a single example from tutorial could be compiled 
by packaged stap (0.0.20061028-2), not even "hello world"!

% stap -v -v hw.stp

[...]

In file included from /usr/share/systemtap/runtime/runtime.h:79,
                 from 
/tmp/stapU8QEaD/stap_f93cc669292198d875dcfc29aeefdff0_261.c:31:
/usr/share/systemtap/runtime/alloc.c: At top level:
/usr/share/systemtap/runtime/alloc.c:66: error: expected declaration 
specifiers or '...' before '(' token
/usr/share/systemtap/runtime/alloc.c: In function 'percpu_free':
/usr/share/systemtap/runtime/alloc.c:67: error: number of arguments 
doesn't match prototype
include/linux/percpu.h:58: error: prototype declaration
/usr/share/systemtap/runtime/alloc.c:69: error: 'objp' undeclared (first 
use in this function)
In file included from 
/tmp/stapU8QEaD/stap_f93cc669292198d875dcfc29aeefdff0_261.c:33:
/usr/share/systemtap/runtime/stack.c: In function '_stp_ustack_sprint':
/usr/share/systemtap/runtime/stack.c:124: error: 'struct task_struct' 
has no member named 'thread_info'
make[1]: *** 
[/tmp/stapU8QEaD/stap_f93cc669292198d875dcfc29aeefdff0_261.o] Error 1
make: *** [_module_/tmp/stapU8QEaD] Error 2


I got better results on my home Athlon/Kubuntu with hand-compiled kernel.

>   
>> I get this after ./compile:
>>
>> configure: error: missing elfutils development headers/libraries (dw 0.123+)
>>     
> You should install libelf-dev, libdw-dev and libebl-dev.
>   
I have them all.

>   
>> In config.log I get:
>>
>> configure:6324: gcc -o conftest -march=nocona -02 -pipe 
>> -fomit-frame-pointer   conftest.c -ldw   >&5
>> gcc: unrecognized option '-02'
>>     
> Hmm, minus-zero-two? Should be minus-O-two.
>   

Exactly. :-) Looks like somebody made a typo in autoconf/other build 
stuff files.

>   
>> /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libdw.a(dwfl_module_getsym.o): 
>> In function `dwfl_module_getsym':
>> (.text+0x55): undefined reference to `gelf_getsymshndx'
>> /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libdw.a(dwfl_module_getsym.o): 
>> In function `dwfl_module_getsym':
>> (.text+0xf9): undefined reference to `elf_getshstrndx'
>> /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libdw.a(dwfl_error.o): 
>> In function `__libdwfl_seterrno':
>> (.text+0x1a1): undefined reference to `elf_errno'
>> /usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64/libdw.a(dwfl_error.o): 
>> In function `__libdwfl_canon_error':
>> (.text+0x228): undefined reference to `elf_errno'
>>     
> This is because there are only static elfutils libraries available in
> Debian. You can look at patch 06-static-libdw-fix in systemtap source
> package for the fix (it adds -Wl,--start-group and -Wl,--end-group flags
> to the linker command line).
>
>   

Thanks for suggestion!

> There is also some information on
> http://sourceware.org/systemtap/wiki/SystemtapOnDebian that may be
> useful.
>   

That's exactly what I followed first... to the letter.


--
Marcin Krol




More information about the Systemtap mailing list