Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 1 | |
Wichert Akkerman | 360815e | 1999-06-28 13:16:03 +0000 | [diff] [blame] | 2 | Strace has been ported by Branko Lankester <branko@hacktic.nl> |
| 3 | to run on Linux systems. Since then it has been greatly modified |
| 4 | by various other people. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 5 | |
Wichert Akkerman | c792698 | 2000-04-10 22:22:31 +0000 | [diff] [blame] | 6 | If you want to compile strace on a Linux system please make sure that |
| 7 | you use recent kernel headers. Strace needs those to get the proper data |
| 8 | structures and constatns used by the kernel, since these can be |
| 9 | different from the structures that the C library uses. Currently you |
| 10 | will need at least a 2.2.7 or newer kernel. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 11 | |
Wichert Akkerman | c792698 | 2000-04-10 22:22:31 +0000 | [diff] [blame] | 12 | To complicate things a bit further strace might not compile if you are |
| 13 | using development kernels. These tend to have headers that conflict with |
| 14 | the headers from libc which makes it impossible to use them. |
Wichert Akkerman | 8dc9a1a | 1999-07-09 14:08:14 +0000 | [diff] [blame] | 15 | |
Wichert Akkerman | c792698 | 2000-04-10 22:22:31 +0000 | [diff] [blame] | 16 | There are three ways to compile strace with other kernel headers: |
| 17 | * Specify the location in CFLAGS when running configure |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 18 | |
Wichert Akkerman | c792698 | 2000-04-10 22:22:31 +0000 | [diff] [blame] | 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. |
Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 32 | |