FC4 - Lib fordítás - Kylix3 debugger

Fórumok

Sziasztok,

Sajnos nem tudtam lefordítani a következő linken lévő PATCH-et. Tudna valaki segíteni:

http://www.theo.ch/kylix/suse10.html

Amiket eddit csináltam:

1. BUG: "linux/user.h" does not exist.
[aperger@ati02 ptrace4]$ make
gcc -W -Wall -O2 -o ptrace_interposer.o -fPIC -c ptrace_interposer.c
ptrace_interposer.c:13:24: error: linux/user.h: Nincs ilyen fájl vagy könyvtár
ptrace_interposer.c: In function ‘ptrace’:
ptrace_interposer.c:117: error: dereferencing pointer to incomplete type
ptrace_interposer.c:118: error: dereferencing pointer to incomplete type
ptrace_interposer.c:119: error: storage size of ‘tmp_regs’ isn’t known
ptrace_interposer.c:121: error: dereferencing pointer to incomplete type
ptrace_interposer.c:121: error: dereferencing pointer to incomplete type
ptrace_interposer.c:119: warning: unused variable ‘tmp_regs’
ptrace_interposer.c:135: error: dereferencing pointer to incomplete type
ptrace_interposer.c:139: error: dereferencing pointer to incomplete type
make: *** [ptrace_interposer.so] Error 1

OK. I remame "/usr/include/linux" to "/usr/include/linux_orig" and I link my actual kernel source "/usr/src/linux/include/linux" to the original place as "/usr/include/linux". Unfortunaltelly I get the following error:

2. Error from "sys/ptrace.h" file ???
gcc -W -Wall -O2 -o ptrace_interposer.o -fPIC -c ptrace_interposer.c
In file included from ptrace_interposer.c:16:
/usr/include/sys/ptrace.h:33: error: syntax error before numeric constant
/usr/include/sys/ptrace.h:49: error: syntax error before numeric constant
/usr/include/sys/ptrace.h:61: error: syntax error before numeric constant
make: *** [ptrace_interposer.so] Error 1

Köszi a segítséget előre is!

Attila

FC4 - 2.6.16-2069 + with ACPI patch from http://gaugusch.at/kernel.shtml

Hozzászólások

Talán összekeverted a Suse10 -et az FC4 -el.

ELaci

Hátha most több szerencsém lesz! :-)

Hi All,

I can fix the compilation problem. I should reorder the list of include files in "ptrace_interpose.c" :
OLD:

*********************
#include stdarg.h
#include errno.h
#include stdlib.h
#include unistd.h
#include dlfcn.h
#include stdio.h
#include linux/user.h
#include linux/unistd.h
#include sys/types.h
#include sys/ptrace.h
*********************

NEW:
**********************
#include stdarg.h
#include errno.h
#include stdlib.h
#include unistd.h
#include dlfcn.h
#include stdio.h
#include sys/types.h
#include sys/ptrace.h
#include linux/user.h
#include linux/unistd.h
**********************

and I should use exactly the same LD_ASSUME_KERNEL = 2.4.1 as you
(if it was 2.4.21 it can not work!!!)

ThanX for this stuff Paulo!!!!

Attila

Kylix 3 Professional + Fedora Core 4 - Kernel 2.6.16.-1.2069 + ACPI patch