Thread (8 messages) 8 messages, 5 authors, 2012-10-20

Re: [uml-devel] linux-3.6.x ARCH=um will not build

From: Richard Weinberger <richard@nod.at>
Date: 2012-10-20 20:55:33

On 20.10.2012 22:33, Lekensteyn wrote:
On Sat, Oct 13, 2012 at 1:27 PM, Richard Weinberger wrote:
quoted
Am 13.10.2012 15:13, schrieb Dave Humphreys (Bob):
quoted
arch/um/os-Linux/signal.c:18:8: error: conflicting types for 'sig_info'
/nfs4xp/software/krn/linux-3.6.x/linux-3.6.2-
um64/arch/um/include/shared/as-
quoted
quoted
layout.h:64:15: note: previous declaration of 'sig_info' was here

I get the above error when trying to build both linux-3.6 and linux-3.6.2
in
quoted
quoted
both x86 (gcc-4.7.2) and x86_64 (gcc-4.6.3) environments.
Already known and fixed. :)
http://www.spinics.net/lists/mm-commits/msg91703.html
Linux 3.6.2 and v3.7-rc1-330-g198190a are still affected:

arch/um/os-Linux/signal.c:18:8: error: conflicting types for ‘sig_info’
In file included from arch/um/os-Linux/signal.c:12:0:
/tmp/linux-3.7/arch/um/include/shared/as-layout.h:64:15: note: previous
declaration of ‘sig_info’ was here
arch/um/os-Linux/signal.c:19:2: warning: initialization from incompatible
pointer type [enabled by default]
arch/um/os-Linux/signal.c:19:2: warning: (near initialization for
‘sig_info[5]’) [enabled by default]
arch/um/os-Linux/signal.c:20:2: warning: initialization from incompatible
pointer type [enabled by default]
arch/um/os-Linux/signal.c:20:2: warning: (near initialization for
‘sig_info[8]’) [enabled by default]
arch/um/os-Linux/signal.c:21:2: warning: initialization from incompatible
pointer type [enabled by default]
arch/um/os-Linux/signal.c:21:2: warning: (near initialization for
‘sig_info[4]’) [enabled by default]
arch/um/os-Linux/signal.c:22:2: warning: initialization from incompatible
pointer type [enabled by default]
...

The mismatching declaration/definition was introduced with:

commit d3c1cfcdb43e023ab1b1c7a555cd9e929026500a
Author: Martin Pärtel [off-list ref]
Date:   Thu Aug 2 00:49:17 2012 +0200

     um: pass siginfo to guest process

     UML guest processes now get correct siginfo_t for SIGTRAP, SIGFPE,
     SIGILL and SIGBUS. Specifically, si_addr and si_code are now correct
     where previously they were si_addr = NULL and si_code = 128.

     Signed-off-by: Martin Pärtel [off-list ref]
     Signed-off-by: Richard Weinberger [off-list ref]


In arch/um/include/shared/as-layout.h, Martin did:
-extern void (*sig_info[])(int, struct uml_pt_regs *);
+struct siginfo;
+extern void (*sig_info[])(int, struct siginfo *si, struct uml_pt_regs *);

but in arch/um/os-Linux/signal.c, the definition is completely different:
-void (*sig_info[NSIG])(int, struct uml_pt_regs *) = {
+void (*sig_info[NSIG])(int, siginfo_t *, struct uml_pt_regs *) = {

I wanted to fix it, but I do not know what the correct type should be.
siginfo_t is declared in signal.h. I tried replacing all "struct siginfo"s by
siginfo_t, but that did not help (signal.h is not included)


The second build error I get is:
arch/um/os-Linux/start_up.c: In function ‘check_coredump_limit’:
arch/um/os-Linux/start_up.c:338:16: error: storage size of ‘lim’ isn’t known
arch/um/os-Linux/start_up.c:339:2: error: implicit declaration of function
‘getrlimit’ [-Werror=implicit-function-declaration]
arch/um/os-Linux/start_up.c:339:22: error: ‘RLIMIT_CORE’ undeclared (first use
in this function)
arch/um/os-Linux/start_up.c:339:22: note: each undeclared identifier is
reported only once for each function it appears in
arch/um/os-Linux/start_up.c:347:22: error: ‘RLIM_INFINITY’ undeclared (first
use in this function)
arch/um/os-Linux/start_up.c:338:16: warning: unused variable ‘lim’ [-Wunused-
variable]

This can be fixed by adding the following to arch/um/os-Linux/start_up.c:
#include <sys/resource.h>
(tested with 3.7)

No special configuration, just "make ARCH=um defconfig" and "make ARCH=um". GCC
4.7.2 64-bit.
Is this glibc-2.17?

I've an idea whats going on.

Thanks,
//richard


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help