2012-10-23 23:18:53

by Matthew Leach

[permalink] [raw]
Subject: [REGRESSION] uml: signal.c build errors

Hi,

When building UML against 3.7-rc2 I encounter the following build error:

# make ARCH=uml
scripts/kconfig/conf --silentoldconfig arch/x86/um/Kconfig
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
WRAP arch/um/include/generated/asm/clkdev.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h

...

CC arch/um/os-Linux/signal.o
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:
/home/matthew/Development/linux/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]
arch/um/os-Linux/signal.c:22:2: warning: (near initialization for ‘sig_info[28]’) [enabled by default]
arch/um/os-Linux/signal.c:23:2: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:23:2: warning: (near initialization for ‘sig_info[7]’) [enabled by default]
arch/um/os-Linux/signal.c:24:2: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:24:2: warning: (near initialization for ‘sig_info[11]’) [enabled by default]
arch/um/os-Linux/signal.c:25:2: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:25:2: warning: (near initialization for ‘sig_info[29]’) [enabled by default]
arch/um/os-Linux/signal.c:26:2: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:26:2: warning: (near initialization for ‘sig_info[26]’) [enabled by default]
arch/um/os-Linux/signal.c:133:1: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:133:1: warning: (near initialization for ‘handlers[26]’) [enabled by default]
make[1]: *** [arch/um/os-Linux/signal.o] Error 1
make: *** [arch/um/os-Linux] Error 2

I have tracked this down to [1] where, indeed, the type of sig_info is
different; the second parameter in signal.c is 'siginfo_t' where as in
as-layout.h the second parameter's type is declared as 'struct siginfo'.

[1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a

Matt


2012-10-24 08:08:44

by Richard Weinberger

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

On 24.10.2012 01:18, Matthew Leach wrote:
> Hi,
>
> When building UML against 3.7-rc2 I encounter the following build error:
>
> # make ARCH=uml
> scripts/kconfig/conf --silentoldconfig arch/x86/um/Kconfig
> CHK include/generated/uapi/linux/version.h
> UPD include/generated/uapi/linux/version.h
> WRAP arch/um/include/generated/asm/clkdev.h
> SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
> SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
> SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
>
> ...
>
> CC arch/um/os-Linux/signal.o
> 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:
> /home/matthew/Development/linux/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]
> arch/um/os-Linux/signal.c:22:2: warning: (near initialization for ‘sig_info[28]’) [enabled by default]
> arch/um/os-Linux/signal.c:23:2: warning: initialization from incompatible pointer type [enabled by default]
> arch/um/os-Linux/signal.c:23:2: warning: (near initialization for ‘sig_info[7]’) [enabled by default]
> arch/um/os-Linux/signal.c:24:2: warning: initialization from incompatible pointer type [enabled by default]
> arch/um/os-Linux/signal.c:24:2: warning: (near initialization for ‘sig_info[11]’) [enabled by default]
> arch/um/os-Linux/signal.c:25:2: warning: initialization from incompatible pointer type [enabled by default]
> arch/um/os-Linux/signal.c:25:2: warning: (near initialization for ‘sig_info[29]’) [enabled by default]
> arch/um/os-Linux/signal.c:26:2: warning: initialization from incompatible pointer type [enabled by default]
> arch/um/os-Linux/signal.c:26:2: warning: (near initialization for ‘sig_info[26]’) [enabled by default]
> arch/um/os-Linux/signal.c:133:1: warning: initialization from incompatible pointer type [enabled by default]
> arch/um/os-Linux/signal.c:133:1: warning: (near initialization for ‘handlers[26]’) [enabled by default]
> make[1]: *** [arch/um/os-Linux/signal.o] Error 1
> make: *** [arch/um/os-Linux] Error 2
>
> I have tracked this down to [1] where, indeed, the type of sig_info is
> different; the second parameter in signal.c is 'siginfo_t' where as in
> as-layout.h the second parameter's type is declared as 'struct siginfo'.
>
> [1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a

Does this patch fix the issue?
Are you using glibc 2.17?

Thanks,
//richard

---
diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h
index 694c792..48fcbb0 100644
--- a/arch/um/include/shared/as-layout.h
+++ b/arch/um/include/shared/as-layout.h
@@ -60,9 +60,6 @@ extern unsigned long host_task_size;

extern int linux_main(int argc, char **argv);

-struct siginfo;
-extern void (*sig_info[])(int, struct siginfo *si, struct uml_pt_regs *);
-
#endif

#endif
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 4625949..3a72936 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -23,6 +23,9 @@
#include <skas_ptrace.h>
#include <sysdep/stub.h>

+#include <signal.h>
+extern void (*sig_info[NSIG])(int, siginfo_t *, struct uml_pt_regs *);
+
int is_skas_winch(int pid, int fd, void *data)
{
return pid == getpgrp();

2012-10-24 08:10:50

by Richard Weinberger

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

On 24.10.2012 10:08, Richard Weinberger wrote:
> On 24.10.2012 01:18, Matthew Leach wrote:
>> Hi,
>>
>> When building UML against 3.7-rc2 I encounter the following build error:
>>
>> # make ARCH=uml
>> scripts/kconfig/conf --silentoldconfig arch/x86/um/Kconfig
>> CHK include/generated/uapi/linux/version.h
>> UPD include/generated/uapi/linux/version.h
>> WRAP arch/um/include/generated/asm/clkdev.h
>> SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
>> SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
>> SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
>>
>> ...
>>
>> CC arch/um/os-Linux/signal.o
>> 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:
>> /home/matthew/Development/linux/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]
>> arch/um/os-Linux/signal.c:22:2: warning: (near initialization for ‘sig_info[28]’) [enabled by default]
>> arch/um/os-Linux/signal.c:23:2: warning: initialization from incompatible pointer type [enabled by default]
>> arch/um/os-Linux/signal.c:23:2: warning: (near initialization for ‘sig_info[7]’) [enabled by default]
>> arch/um/os-Linux/signal.c:24:2: warning: initialization from incompatible pointer type [enabled by default]
>> arch/um/os-Linux/signal.c:24:2: warning: (near initialization for ‘sig_info[11]’) [enabled by default]
>> arch/um/os-Linux/signal.c:25:2: warning: initialization from incompatible pointer type [enabled by default]
>> arch/um/os-Linux/signal.c:25:2: warning: (near initialization for ‘sig_info[29]’) [enabled by default]
>> arch/um/os-Linux/signal.c:26:2: warning: initialization from incompatible pointer type [enabled by default]
>> arch/um/os-Linux/signal.c:26:2: warning: (near initialization for ‘sig_info[26]’) [enabled by default]
>> arch/um/os-Linux/signal.c:133:1: warning: initialization from incompatible pointer type [enabled by default]
>> arch/um/os-Linux/signal.c:133:1: warning: (near initialization for ‘handlers[26]’) [enabled by default]
>> make[1]: *** [arch/um/os-Linux/signal.o] Error 1
>> make: *** [arch/um/os-Linux] Error 2
>>
>> I have tracked this down to [1] where, indeed, the type of sig_info is
>> different; the second parameter in signal.c is 'siginfo_t' where as in
>> as-layout.h the second parameter's type is declared as 'struct siginfo'.
>>
>> [1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a
>
> Does this patch fix the issue?
> Are you using glibc 2.17?

If not, Martin, can you please convert your code to siginfo_t?
It looks like struct sig_info and siginfo_t are no longer compatible.

Thanks,
//richard

2012-10-24 09:09:37

by Matthew Leach

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

Hi Richard,

Richard Weinberger <[email protected]> writes:
>
> Does this patch fix the issue?

Your patch fixed the initial error, but I now get:

CC arch/um/os-Linux/signal.o
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]
arch/um/os-Linux/signal.c:22:2: warning: (near initialization for ‘sig_info[28]’) [enabled by default]
arch/um/os-Linux/signal.c:23:2: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:23:2: warning: (near initialization for ‘sig_info[7]’) [enabled by default]
arch/um/os-Linux/signal.c:24:2: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:24:2: warning: (near initialization for ‘sig_info[11]’) [enabled by default]
arch/um/os-Linux/signal.c:25:2: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:25:2: warning: (near initialization for ‘sig_info[29]’) [enabled by default]
arch/um/os-Linux/signal.c:26:2: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:26:2: warning: (near initialization for ‘sig_info[26]’) [enabled by default]
arch/um/os-Linux/signal.c:133:1: warning: initialization from incompatible pointer type [enabled by default]
arch/um/os-Linux/signal.c:133:1: warning: (near initialization for ‘handlers[26]’) [enabled by default]
CC arch/um/os-Linux/start_up.o
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]
cc1: some warnings being treated as errors
make[1]: *** [arch/um/os-Linux/start_up.o] Error 1
make: *** [arch/um/os-Linux] Error 2


> Are you using glibc 2.17?

I am using glibc 2.16 with gcc 4.7.2.

Thanks,
Matt

2012-10-24 09:17:47

by Richard Weinberger

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

On 24.10.2012 11:09, Matthew Leach wrote:
> Hi Richard,
>
> Richard Weinberger <[email protected]> writes:
>>
>> Does this patch fix the issue?
>
> Your patch fixed the initial error, but I now get:

Okay, we have to get rid of all struct sig_infos.
A patch is on the way.

Thanks,
//richard

2012-10-24 19:39:34

by Richard Weinberger

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

Am Wed, 24 Oct 2012 00:18:34 +0100
> I have tracked this down to [1] where, indeed, the type of sig_info is
> different; the second parameter in signal.c is 'siginfo_t' where as in
> as-layout.h the second parameter's type is declared as 'struct
> siginfo'.
>
> [1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a

Looks like we have to revert that commit.
Moving everything to siginfo_t requires a non-trivial header cleanup
and may introduce new regressions.

Matthew, does the attached revert patch help?

If yes, I'll submit it ASAP to Linus and for 3.8 we cleanup the UML
headers and reintroduce commit d3c1cfc.

Thanks,
//richard


Attachments:
(No filename) (631.00 B)
revert.diff (11.37 kB)
Download all attachments

2012-10-24 19:49:16

by Matthew Leach

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors


Richard Weinberger <[email protected]> writes:
> Am Wed, 24 Oct 2012 00:18:34 +0100
>> I have tracked this down to [1] where, indeed, the type of sig_info is
>> different; the second parameter in signal.c is 'siginfo_t' where as in
>> as-layout.h the second parameter's type is declared as 'struct
>> siginfo'.
>>
>> [1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a
>
> Looks like we have to revert that commit.
> Moving everything to siginfo_t requires a non-trivial header cleanup
> and may introduce new regressions.
>
> Matthew, does the attached revert patch help?

The revert did remove the errors for the compilation of signal.c, so
that seems fine. I still get the following errors, however:

CC arch/um/os-Linux/sigio.o
CC arch/um/os-Linux/signal.o
CC arch/um/os-Linux/start_up.o
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]
cc1: some warnings being treated as errors
make[1]: *** [arch/um/os-Linux/start_up.o] Error 1
make: *** [arch/um/os-Linux] Error 2

Thanks,
Matt

2012-10-24 19:54:52

by Richard Weinberger

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

Am Wed, 24 Oct 2012 20:48:52 +0100
schrieb Matthew Leach <[email protected]>:

>
> Richard Weinberger <[email protected]> writes:
> > Am Wed, 24 Oct 2012 00:18:34 +0100
> >> I have tracked this down to [1] where, indeed, the type of
> >> sig_info is different; the second parameter in signal.c is
> >> 'siginfo_t' where as in as-layout.h the second parameter's type is
> >> declared as 'struct siginfo'.
> >>
> >> [1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a
> >
> > Looks like we have to revert that commit.
> > Moving everything to siginfo_t requires a non-trivial header cleanup
> > and may introduce new regressions.
> >
> > Matthew, does the attached revert patch help?
>
> The revert did remove the errors for the compilation of signal.c, so
> that seems fine. I still get the following errors, however:
>
> CC arch/um/os-Linux/sigio.o
> CC arch/um/os-Linux/signal.o
> CC arch/um/os-Linux/start_up.o
> 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] cc1: some warnings being treated as errors
> make[1]: *** [arch/um/os-Linux/start_up.o] Error 1 make: ***
> [arch/um/os-Linux] Error 2

Does adding
#include <sys/time.h>
#include <sys/resource.h>

to arch/um/os-Linux/start_up.c help?

Thanks,
//richard

2012-10-24 20:06:42

by Matthew Leach

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

Richard Weinberger <[email protected]> writes:
> Am Wed, 24 Oct 2012 20:48:52 +0100
> schrieb Matthew Leach <[email protected]>:
>
>>
>> Richard Weinberger <[email protected]> writes:
>> > Am Wed, 24 Oct 2012 00:18:34 +0100
>> >> I have tracked this down to [1] where, indeed, the type of
>> >> sig_info is different; the second parameter in signal.c is
>> >> 'siginfo_t' where as in as-layout.h the second parameter's type is
>> >> declared as 'struct siginfo'.
>> >>
>> >> [1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a
>> >
>> > Looks like we have to revert that commit.
>> > Moving everything to siginfo_t requires a non-trivial header cleanup
>> > and may introduce new regressions.
>> >
>> > Matthew, does the attached revert patch help?
>>
>> The revert did remove the errors for the compilation of signal.c, so
>> that seems fine. I still get the following errors, however:
>>
>> CC arch/um/os-Linux/sigio.o
>> CC arch/um/os-Linux/signal.o
>> CC arch/um/os-Linux/start_up.o
>> 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] cc1: some warnings being treated as errors
>> make[1]: *** [arch/um/os-Linux/start_up.o] Error 1 make: ***
>> [arch/um/os-Linux] Error 2
>
> Does adding
> #include <sys/time.h>
> #include <sys/resource.h>
>
> to arch/um/os-Linux/start_up.c help?

Adding the above includes and the revert commit did the trick!

Thanks,
matt

2012-10-24 20:09:22

by Richard Weinberger

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

Am Wed, 24 Oct 2012 21:06:25 +0100
schrieb Matthew Leach <[email protected]>:

> Richard Weinberger <[email protected]> writes:
> > Am Wed, 24 Oct 2012 20:48:52 +0100
> > schrieb Matthew Leach <[email protected]>:
> >
> >>
> >> Richard Weinberger <[email protected]> writes:
> >> > Am Wed, 24 Oct 2012 00:18:34 +0100
> >> >> I have tracked this down to [1] where, indeed, the type of
> >> >> sig_info is different; the second parameter in signal.c is
> >> >> 'siginfo_t' where as in as-layout.h the second parameter's type
> >> >> is declared as 'struct siginfo'.
> >> >>
> >> >> [1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a
> >> >
> >> > Looks like we have to revert that commit.
> >> > Moving everything to siginfo_t requires a non-trivial header
> >> > cleanup and may introduce new regressions.
> >> >
> >> > Matthew, does the attached revert patch help?
> >>
> >> The revert did remove the errors for the compilation of signal.c,
> >> so that seems fine. I still get the following errors, however:
> >>
> >> CC arch/um/os-Linux/sigio.o
> >> CC arch/um/os-Linux/signal.o
> >> CC arch/um/os-Linux/start_up.o
> >> 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] cc1: some warnings being treated as
> >> errors make[1]: *** [arch/um/os-Linux/start_up.o] Error 1 make: ***
> >> [arch/um/os-Linux] Error 2
> >
> > Does adding
> > #include <sys/time.h>
> > #include <sys/resource.h>
> >
> > to arch/um/os-Linux/start_up.c help?
>
> Adding the above includes and the revert commit did the trick!

Thanks a lot for being my build bot. ;)

I'm not able to reproduce the issue on any of my machines.
I have to do more tests and send all patches to Linus and -stable
tomorrow.

Thanks,
//richard

2012-10-24 20:14:11

by Matthew Leach

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

Richard Weinberger <[email protected]> writes:

> Am Wed, 24 Oct 2012 21:06:25 +0100
> schrieb Matthew Leach <[email protected]>:
>
>> Richard Weinberger <[email protected]> writes:
>> > Am Wed, 24 Oct 2012 20:48:52 +0100
>> > schrieb Matthew Leach <[email protected]>:
>> >
>> >>
>> >> Richard Weinberger <[email protected]> writes:
>> >> > Am Wed, 24 Oct 2012 00:18:34 +0100
>> >> >> I have tracked this down to [1] where, indeed, the type of
>> >> >> sig_info is different; the second parameter in signal.c is
>> >> >> 'siginfo_t' where as in as-layout.h the second parameter's type
>> >> >> is declared as 'struct siginfo'.
>> >> >>
>> >> >> [1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a
>> >> >
>> >> > Looks like we have to revert that commit.
>> >> > Moving everything to siginfo_t requires a non-trivial header
>> >> > cleanup and may introduce new regressions.
>> >> >
>> >> > Matthew, does the attached revert patch help?
>> >>
>> >> The revert did remove the errors for the compilation of signal.c,
>> >> so that seems fine. I still get the following errors, however:
>> >>
>> >> CC arch/um/os-Linux/sigio.o
>> >> CC arch/um/os-Linux/signal.o
>> >> CC arch/um/os-Linux/start_up.o
>> >> 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] cc1: some warnings being treated as
>> >> errors make[1]: *** [arch/um/os-Linux/start_up.o] Error 1 make: ***
>> >> [arch/um/os-Linux] Error 2
>> >
>> > Does adding
>> > #include <sys/time.h>
>> > #include <sys/resource.h>
>> >
>> > to arch/um/os-Linux/start_up.c help?
>>
>> Adding the above includes and the revert commit did the trick!
>
> Thanks a lot for being my build bot. ;)

Not a problem :).

> I'm not able to reproduce the issue on any of my machines.

Strange - well I'm using a fully up-to-date Arch Linux x86_64 distro, if
that helps.

Thanks,
Matt

2012-10-24 20:17:48

by Richard Weinberger

[permalink] [raw]
Subject: Re: [REGRESSION] uml: signal.c build errors

Am Wed, 24 Oct 2012 21:13:55 +0100
schrieb Matthew Leach <[email protected]>:

> Richard Weinberger <[email protected]> writes:
>
> > Am Wed, 24 Oct 2012 21:06:25 +0100
> > schrieb Matthew Leach <[email protected]>:
> >
> >> Richard Weinberger <[email protected]> writes:
> >> > Am Wed, 24 Oct 2012 20:48:52 +0100
> >> > schrieb Matthew Leach <[email protected]>:
> >> >
> >> >>
> >> >> Richard Weinberger <[email protected]> writes:
> >> >> > Am Wed, 24 Oct 2012 00:18:34 +0100
> >> >> >> I have tracked this down to [1] where, indeed, the type of
> >> >> >> sig_info is different; the second parameter in signal.c is
> >> >> >> 'siginfo_t' where as in as-layout.h the second parameter's
> >> >> >> type is declared as 'struct siginfo'.
> >> >> >>
> >> >> >> [1]: d3c1cfcdb43e023ab1b1c7a555cd9e929026500a
> >> >> >
> >> >> > Looks like we have to revert that commit.
> >> >> > Moving everything to siginfo_t requires a non-trivial header
> >> >> > cleanup and may introduce new regressions.
> >> >> >
> >> >> > Matthew, does the attached revert patch help?
> >> >>
> >> >> The revert did remove the errors for the compilation of
> >> >> signal.c, so that seems fine. I still get the following errors,
> >> >> however:
> >> >>
> >> >> CC arch/um/os-Linux/sigio.o
> >> >> CC arch/um/os-Linux/signal.o
> >> >> CC arch/um/os-Linux/start_up.o
> >> >> 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] cc1: some warnings being treated as
> >> >> errors make[1]: *** [arch/um/os-Linux/start_up.o] Error 1 make:
> >> >> *** [arch/um/os-Linux] Error 2
> >> >
> >> > Does adding
> >> > #include <sys/time.h>
> >> > #include <sys/resource.h>
> >> >
> >> > to arch/um/os-Linux/start_up.c help?
> >>
> >> Adding the above includes and the revert commit did the trick!
> >
> > Thanks a lot for being my build bot. ;)
>
> Not a problem :).
>
> > I'm not able to reproduce the issue on any of my machines.
>
> Strange - well I'm using a fully up-to-date Arch Linux x86_64 distro,
> if that helps.

I'm not using Arch. Can I get an up-to-date Arch images somewhere?

My systems run OpenSUSE, Fedora and Debian.
But also with gcc 4.7 and glibc 2.16...

Thanks,
//richard