1 2Strace has been ported by Branko Lankester <branko@hacktic.nl> 3to run on Linux systems. Since then it has been greatly modified 4by various other people. 5 6If you want to compile strace on a Linux system please make sure that 7you use recent kernel headers. Strace needs those to get the proper data 8structures and constatns used by the kernel, since these can be 9different from the structures that the C library uses. Currently you 10will need at least a 2.2.7 or newer kernel. 11 12To complicate things a bit further strace might not compile if you are 13using development kernels. These tend to have headers that conflict with 14the headers from libc which makes it impossible to use them. 15 16There are three ways to compile strace with other kernel headers: 17* Specify the location in CFLAGS when running configure 18 19 CFLAGS=-I/usr/src/linux/include ./configure 20 21* you can tell make where your kernel sources are. For example if you 22 have your kernelsource in /usr/src/linux, you can invoke make like 23 this: 24 25 make CFLAGS="\$CFLAGS -I/usr/src/linux/include" 26 27 (the extra \$CFLAGS is there to make sure we don't override any CFLAGS 28 settings that configure has found). 29 30* you can link /usr/include/linux and /usr/include/asm to the 31 corresponding directories in your kernel source-tree. 32