[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#391223: marked as done (linux-kernel-headers: UML fails to build)



Your message dated Fri, 10 Nov 2006 20:27:29 +0100
with message-id <[🔎] 20061110192729.GC2443@inferi.kami.home>
and subject line Bug#391223: linux-kernel-headers: UML fails to build
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: linux-kernel-headers
Version: 2.6.18-1
Severity: normal
Tags: patch

File /usr/include/linux/unistd.h misses syscall macros, preventing building of UML:

julien@hathor:~/kernel/kernel-uml$ LANG=C make ARCH=um
make[1]: `arch/um/sys-i386/user-offsets.s' is up to date.
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CHK     include/linux/compile.h
  CC      arch/um/os-Linux/process.o
arch/um/os-Linux/process.c:144: error: expected declaration specifiers or '...' before 'getpid'
arch/um/os-Linux/process.c:146: warning: return type defaults to 'int'
arch/um/os-Linux/process.c: In function '_syscall0':
arch/um/os-Linux/process.c:147: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:152: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:158: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:173: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:183: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:197: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:207: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:242: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:254: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:274: error: expected '=', ',', ';', 'asm' or '__attribute__' be
 fore '{' $arch/um/os-Linux/process.c:144: error: parameter name omitted
arch/um/os-Linux/process.c:284: error: expected '{' at end of input
make[1]: *** [arch/um/os-Linux/process.o] Error 1
make: *** [arch/um/os-Linux] Error 2

The attached patch found on http://www.uwsg.iu.edu/hypermail/linux/kernel/0609.2/1018.html fixes the issue.

Cheers,
Julien

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (10, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-ck1-hathor
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

-- no debconf information
--- unistd.h	2006-10-05 14:59:01.000000000 +0200
+++ unistd.h.new	2006-10-05 14:58:49.000000000 +0200
@@ -11,5 +11,63 @@
  * Include machine specific syscallX macros
  */
 #include <asm/unistd.h>
+#include <sys/syscall.h>
+#include <unistd.h>
+
+
+#undef _syscall0
+#undef _syscall1
+#undef _syscall2
+#undef _syscall3
+#undef _syscall4
+#undef _syscall5
+#undef _syscall6
+
+
+#define _syscall0(type,name) \
+type name(void) \
+{\
+ return syscall(__NR_##name);\
+}
+
+#define _syscall1(type,name,type1,arg1) \
+type name(type1 arg1) \
+{\
+ return syscall(__NR_##name, arg1);\
+}
+
+#define _syscall2(type,name,type1,arg1,type2,arg2) \
+type name(type1 arg1,type2 arg2) \
+{\
+ return syscall(__NR_##name, arg1, arg2);\
+}
+
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+type name(type1 arg1,type2 arg2,type3 arg3) \
+{\
+ return syscall(__NR_##name, arg1, arg2, arg3);\
+}
+
+#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
+type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
+{\
+ return syscall(__NR_##name, arg1, arg2, arg3, arg4);\
+}
+
+#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
+ type5,arg5) \
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
+{\
+ return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5);\
+}
+
+
+#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
+ type5,arg5,type6,arg6) \
+type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
+{\
+ return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5, arg6);\
+}
+
 
 #endif /* _LINUX_UNISTD_H_ */

--- End Message ---
--- Begin Message ---
On Thu, Oct 05, 2006 at 08:57:54PM +0200, Mattia Dongili wrote:
[...]
> I suppose a more correct patch is what upstream uses:
> http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.18/patches/no-syscallx
> 
> I just submitted it to the Linux stable team and the same patch is
> included in the Debian user-mode-linux package..

this bug is now gone.

-- 
mattia
:wq!

--- End Message ---

Reply to: