compiling systemtap with gcc 3.2.3-47 fails

Frank Ch. Eigler fche@redhat.com
Tue Dec 19 21:54:00 GMT 2006


Michael Obster <michael@obster.org> writes:

> when I'm compiling systemtap I always get this error with the
> gcc-3.2.3-47 (Red Hat):
> [...]
> In file included from tapsets.cxx:40:
> loc2c.h:25: syntax error before `__attribute__'
> loc2c.h: In function `location* c_translate_location(...)':
> loc2c.h:68: syntax error before `__attribute__'
> loc2c.h: In function `void c_translate_fetch(...)':
> loc2c.h:76: syntax error before `__attribute__'
> In file included from tapsets.cxx:42:
> [...]

You can probably make this work by adding
  #define __attribute__(x) 
into loc2c.h.

> [...] Do I need the same gcc version as for kernel compile here
> already? 

That stap program may be built with any recent compiler.  It's
just an ordinary small C++ program.

> Or is this only necessary later when systemtap generates the
> kernel-module?

Correct: systemtap will invoke the kernel-build process, at which time
the proper kernel-compatible gcc must be in the path.

- FChE



More information about the Systemtap mailing list