strace-4.5.15 fails to build with a header that has errors out the wazoo. I've got linux-headers-2.6.11-r6, so it's unlikely to be a system headers problem. The build log is attached.
Created attachment 107430 [details] strace-4.5.15 build log
I took another look at this, and I think I know what's going wrong. The command that fails is: sparc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -Ilinux/sparc -I./linux/sparc -Ilinux -I./linux -Wall -mcpu=ultrasparc -mtune=ultrasparc -O2 -pipe -fomit-frame-pointer -MT syscall.o -MD -MP -MF .deps/syscall.Tpo -c -o syscall.o syscall.c The include order has linux/sparc/ coming before linux/ and both of them have a file called syscall.h. The syscall.h in linux/ is the one that is needed (it has the sys_io_setup() and friends definitions), but the one in linux/sparc/ is getting pulled in first.
The weird thing is grep can not find -Ilinux. For example: # grep -r -- Ilinux . # Anyone knows how to figure out this?
(In reply to comment #2) > I took another look at this, and I think I know what's going wrong. The command > that fails is: > > sparc-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -Ilinux/sparc -I./linux/sparc > -Ilinux -I./linux -Wall -mcpu=ultrasparc -mtune=ultrasparc -O2 -pipe > -fomit-frame-pointer -MT syscall.o -MD -MP -MF .deps/syscall.Tpo -c -o > syscall.o syscall.c > > The include order has linux/sparc/ coming before linux/ and both of them have a > file called syscall.h. The syscall.h in linux/ is the one that is needed (it > has the sys_io_setup() and friends definitions), but the one in linux/sparc/ is > getting pulled in first. > Yup, problem was because strace uses for sparc its own syscall.h inside $strace_dir/linux/sparc (which don't happend to any other arch where the syscall.h used is in $strace_dir/linux/). As far as I can see, what happened is that new syscall entries where added to strace and syscallent.h files where properly updated as well as linux/syscall.h. But not linux/sparc/syscall.h. I will attach a patch that makes strace-4.5.16 to compile. The details will appear in the comment of the attachment.
Created attachment 129620 [details, diff] strace-sparc-missingsyscalls.patch The patch adds to linux/sparc/syscalls.h the missing syscalls entries. The patch also remove the syscall getpagesize() which AFAIK was removed in the last kernel headers clean up and it's not present anymore to be used in userspace. First problem is that linux/sparc/syscalls.h follow a categorized order and I just add the missing entries under the label "Missing entries" (original eeh?). Second problem is that I realized that the new strace version dies with a: "uname( <unfinished ... exit status 0>" while previous versions finish with the usual "Process XXY detached" or the same 4.5.16 works fine in other arches (i.e. alpha). Dunno if I've broken something with this patch :/ Please use it with caution.
We will need the help of vapier (or any other strace ninja) to review (and probably fix my patch). The testing ebuild can be found in: http://dev.gentoo.org/~yoswink/tmp/strace-4.5.16-r1.ebuild And the proper patch to be included in /files is the one attached to this bug. Sorry for the bug spam.
fixed in cvs, sorry for the delay http://sources.gentoo.org/dev-util/strace/strace-4.5.16-r1.ebuild?r1=1.2&r2=1.3 http://sources.gentoo.org/dev-util/strace/files/strace-4.5.16-sparc-updates.patch?rev=1.1