]> granicus.if.org Git - strace/blobdiff - README-linux
2004-09-03 Roland McGrath <roland@redhat.com>
[strace] / README-linux
index 584d565fc6dc91ef7802a5709a295002512098c7..e2f9779670301c6e6d1784ee1bcf251567038358 100644 (file)
@@ -3,19 +3,30 @@ Strace has been ported by Branko Lankester <branko@hacktic.nl>
 to run on Linux systems.  Since then it has been greatly modified
 by various other people.
 
-If you want to compile strace on a Linux system please make sure
-that you use very recent kernel headers. Strace needs those to get
-the proper data structures used by the kernel, since these can be
-different from the structures that the C library uses. Currently
-you will need a 2.2.7 or newer kernel.
+If you want to compile strace on a Linux system please make sure that
+you use recent kernel headers. Strace needs those to get the proper data
+structures and constatns used by the kernel, since these can be
+different from the structures that the C library uses. Currently you
+will need at least a 2.2.7 or newer kernel. 
 
-To compile strace using your kernel source you need to tell make where
-you put the sources. For example if you have your kernelsource in
-/usr/src/linux, you should invoke make like this:
+To complicate things a bit further strace might not compile if you are
+using development kernels. These tend to have headers that conflict with
+the headers from libc which makes it impossible to use them.
 
-     make CFLAGS=-I/usr/src/linux/include
+There are three ways to compile strace with other kernel headers:
+* Specify the location in CFLAGS when running configure
 
-Please note that it is possible to symlink /usr/include/{asm,linux,scsi}
-to your kernel source, but for programs that don't need the actual kernel
-structures that is highly discouraged.
+     CFLAGS=-I/usr/src/linux/include ./configure
+
+* you can tell make where your kernel sources are. For example if you
+  have your kernelsource in /usr/src/linux, you can invoke make like
+  this:
+
+     make CFLAGS="\$CFLAGS -I/usr/src/linux/include"
+
+  (the extra \$CFLAGS is there to make sure we don't override any CFLAGS
+  settings that configure has found).
+
+* you can link /usr/include/linux and /usr/include/asm to the
+  corresponding directories in your kernel source-tree.