0
votes

I am trying to compile Systrace-1.6f on Ubuntu 12.04 32bit edition. I found below error.

root@sharma-VM:/home/sharma/Desktop/systrace-1.6f# make
make  all-recursive
make[1]: Entering directory `/home/sharma/Desktop/systrace-1.6f'
Making all in .
make[2]: Entering directory `/home/sharma/Desktop/systrace-1.6f'
gcc -DHAVE_CONFIG_H -I.     -Wall  -c systrace-translate.c
In file included from systrace-translate.c:54:0:
linux_fcntl.h:90:2: error: unknown type name ‘linux_off_t’
linux_fcntl.h:91:2: error: unknown type name ‘linux_off_t’
linux_fcntl.h:92:2: error: unknown type name ‘linux_pid_t’
linux_fcntl.h:98:9: error: unknown type name ‘linux_loff_t’
linux_fcntl.h:99:9: error: unknown type name ‘linux_loff_t’
linux_fcntl.h:100:9: error: unknown type name ‘linux_pid_t’
make[2]: *** [systrace-translate.o] Error 1
make[2]: Leaving directory `/home/sharma/Desktop/systrace-1.6f'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sharma/Desktop/systrace-1.6f'
make: *** [all] Error 2

Please kindly suggest me a solution for the above error.

1

1 Answers

0
votes

This question about particular program is too specific to be asked on SO. However I came across the same problem and that is how I found it.

grep is your helper! You can grep -rsli linux_off_t to find out that it is in linux_types.h. Another question why it doesn't work, but if you just want to go further, insert the following lines

#undef _LINUX_TYPES_H
#include "linux_types.h"

somewhere in the beginning of linux_fcntl.h.

Then you'll come across yet another issue. Replace all references to cs with xcs. It took me a while since I used assembler last time. So I don't know if that is how this register is called these days but that is what I see for struct user_regs_struct in /usr/include/i386-linux-gnu/sys/user.h.

Even with all that it still does not pass the second regression test.

systrace has not been updated for quite a while and perhaps is not quite compatible with 3.x kernels as is. I am not a kernel expert though.