Re: Anything changed on rawhide builders recently? Can't build ladvd
David Howells dhowe...@redhat.com wrote: A better way to do this might be to make the header installation discard the _UAPI prefix that got added. As the attached patch. Now upstream. David -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: Anything changed on rawhide builders recently? Can't build ladvd
On Wed, Nov 7, 2012 at 12:21 PM, David Howells dhowe...@redhat.com wrote: David Howells dhowe...@redhat.com wrote: A better way to do this might be to make the header installation discard the _UAPI prefix that got added. As the attached patch. David --- commit 75a88e14a97d239a47cbd0fc55fc23416007d733 Author: David Howells dhowe...@redhat.com Date: Wed Nov 7 17:14:14 2012 + UAPI: Strip the _UAPI prefix from header guards during header installation Strip the _UAPI prefix from header guards during header installation so that any userspace dependencies aren't affected. glibc, for example, checks for linux/types.h, linux/kernel.h, linux/compiler.h and linux/list.h - though the last two aren't actually exported. Signed-off-by: David Howells dhowe...@redhat.com I tested this locally by applying this to the latest 3.7 tree and doing make headers_install pointing to a throw-away dir. When comparing the headers installed there with those from a 3.6 kernel installed in /usr, there were no differences in the include guards. That seems to produce the consistent results we'd want. So: Acked-by: Josh Boyer jwbo...@redhat.com josh diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 239d22d..6c353ae 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl @@ -42,6 +42,9 @@ foreach my $filename (@files) { $line =~ s/(^|\s)(inline)\b/$1__$2__/g; $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; + $line =~ s/#ifndef _UAPI/#ifndef /; + $line =~ s/#define _UAPI/#define /; + $line =~ s!#endif /[*] _UAPI!#endif /* !; printf {$out} %s, $line; } close $out; -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: Anything changed on rawhide builders recently? Can't build ladvd
On Tue, Nov 13, 2012 at 8:54 AM, Josh Boyer jwbo...@gmail.com wrote: diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 239d22d..6c353ae 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl @@ -42,6 +42,9 @@ foreach my $filename (@files) { $line =~ s/(^|\s)(inline)\b/$1__$2__/g; $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; + $line =~ s/#ifndef _UAPI/#ifndef /; + $line =~ s/#define _UAPI/#define /; + $line =~ s!#endif /[*] _UAPI!#endif /* !; printf {$out} %s, $line; } close $out; This will be included in tomorrow's rawhide kernel. josh -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: Anything changed on rawhide builders recently? Can't build ladvd
On Wed, Nov 7, 2012 at 12:21 PM, David Howells dhowe...@redhat.com wrote: David Howells dhowe...@redhat.com wrote: A better way to do this might be to make the header installation discard the _UAPI prefix that got added. As the attached patch. David --- commit 75a88e14a97d239a47cbd0fc55fc23416007d733 Author: David Howells dhowe...@redhat.com Date: Wed Nov 7 17:14:14 2012 + UAPI: Strip the _UAPI prefix from header guards during header installation Strip the _UAPI prefix from header guards during header installation so that any userspace dependencies aren't affected. glibc, for example, checks for linux/types.h, linux/kernel.h, linux/compiler.h and linux/list.h - though the last two aren't actually exported. Signed-off-by: David Howells dhowe...@redhat.com diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 239d22d..6c353ae 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl @@ -42,6 +42,9 @@ foreach my $filename (@files) { $line =~ s/(^|\s)(inline)\b/$1__$2__/g; $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; + $line =~ s/#ifndef _UAPI/#ifndef /; + $line =~ s/#define _UAPI/#define /; + $line =~ s!#endif /[*] _UAPI!#endif /* !; printf {$out} %s, $line; } close $out; I think this is probably a better all around solution. It leaves the installed headers with the same guards that have been in place for a number of years now. Are you going to send this upstream for a 3.7 fix? josh -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Anything changed on rawhide builders recently? Can't build ladvd
Hi, Today I tried to build ladvd 1.0.4 package for rawhide, but it failed with some strange message http://koji.fedoraproject.org/koji/getfile?taskID=4662562name=build.logoffset=-4000 , which is pasted below. So I rolled back to 1.0.2 and it failed to build, too. It was building fine previously. Then I tried to build for F18, it was built succesfuly (although it packaging ultimately failed because of unrelated reason). So the question is: what's broken with rawhide builders? The message on rawhide builder is: #v+ libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -Wall -Werror -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fstack-protector -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c child.c -fPIC -DPIC -o .libs/child.o In file included from cli.c:20:0: common.h:152:8: error: redefinition of 'struct sysinfo' In file included from /usr/include/linux/kernel.h:4:0, from /usr/include/linux/sysctl.h:25, from /usr/include/sys/sysctl.h:43, from common.h:50, from cli.c:20: /usr/include/linux/sysinfo.h:7:8: note: originally defined here make[2]: *** [cli.lo] Error 1 make[2]: *** Waiting for unfinished jobs In file included from child.c:20:0: common.h:152:8: error: redefinition of 'struct sysinfo' In file included from /usr/include/linux/kernel.h:4:0, from /usr/include/linux/sysctl.h:25, from /usr/include/sys/sysctl.h:43, from common.h:50, from child.c:20: /usr/include/linux/sysinfo.h:7:8: note: originally defined here make[2]: *** [child.lo] Error 1 In file included from util.c:20:0: common.h:152:8: error: redefinition of 'struct sysinfo' In file included from /usr/include/linux/kernel.h:4:0, from /usr/include/linux/sysctl.h:25, from /usr/include/sys/sysctl.h:43, from common.h:50, from util.c:20: /usr/include/linux/sysinfo.h:7:8: note: originally defined here In file included from master.c:20:0: common.h:152:8: error: redefinition of 'struct sysinfo' In file included from /usr/include/linux/kernel.h:4:0, from /usr/include/linux/sysctl.h:25, from /usr/include/sys/sysctl.h:43, from common.h:50, from master.c:20: /usr/include/linux/sysinfo.h:7:8: note: originally defined here make[2]: Leaving directory `/builddir/build/BUILD/ladvd-1.0.4/src' make[2]: *** [master.lo] Error 1 make[2]: *** [util.lo] Error 1 make[1]: *** [all] Error 2 make[1]: Leaving directory `/builddir/build/BUILD/ladvd-1.0.4/src' make: *** [all-recursive] Error 1 #v- -- Tomasz Torcz RIP is irrevelant. Spoofing is futile. xmpp: zdzich...@chrome.pl Your routes will be aggreggated. -- Alex Yuriev -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: Anything changed on rawhide builders recently? Can't build ladvd
On Wed, Nov 7, 2012 at 10:05 AM, Tomasz Torcz to...@pipebreaker.pl wrote: Hi, Today I tried to build ladvd 1.0.4 package for rawhide, but it failed with some strange message http://koji.fedoraproject.org/koji/getfile?taskID=4662562name=build.logoffset=-4000 , which is pasted below. So I rolled back to 1.0.2 and it failed to build, too. It was building fine previously. Then I tried to build for F18, it was built succesfuly (although it packaging ultimately failed because of unrelated reason). So the question is: what's broken with rawhide builders? The kernel-headers package is newer and includes the UAPI split done by David Howells. The message on rawhide builder is: #v+ libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -Wall -Werror -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fno-delete-null-pointer-checks -fstack-protector -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c child.c -fPIC -DPIC -o .libs/child.o In file included from cli.c:20:0: common.h:152:8: error: redefinition of 'struct sysinfo' In file included from /usr/include/linux/kernel.h:4:0, from /usr/include/linux/sysctl.h:25, from /usr/include/sys/sysctl.h:43, from common.h:50, from cli.c:20: /usr/include/linux/sysinfo.h:7:8: note: originally defined here make[2]: *** [cli.lo] Error 1 So it seems ladvd has carried a redefinition of struct sysinfo basically forever. They could have very well named it ladvd_sysinfo or something and that might work as a temporary patch, but I think there is a bigger issue going on here. It seems that /usr/include/sys/sysctl.h has been doing a bit of ifdefery to prevent inclusion of certain header files from the kernel. That header file is provided by glibc. In it, you can see things like: #include stddef.h /* Prevent more kernel headers than necessary to be included. */ #ifndef _LINUX_KERNEL_H # define _LINUX_KERNEL_H1 # define __undef_LINUX_KERNEL_H #endif ... #include linux/sysctl.h #ifdef __undef_LINUX_KERNEL_H # undef _LINUX_KERNEL_H # undef __undef_LINUX_KERNEL_H #endif That works with kernel-headers from = the 3.6 kernel, but the UAPI rework has redefined the header guards for a number of files, including linux/kernel.h. That file is now specifically guarded by: #ifndef _UAPI_LINUX_KERNEL_H #define _UAPI_LINUX_KERNEL_H which means the tests glibc is doing above are failing. David, any thoughts on what the general solution to that would be? josh -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: Anything changed on rawhide builders recently? Can't build ladvd
Tomasz Torcz to...@pipebreaker.pl wrote: In file included from cli.c:20:0: common.h:152:8: error: redefinition of 'struct sysinfo' In file included from /usr/include/linux/kernel.h:4:0, from /usr/include/linux/sysctl.h:25, from /usr/include/sys/sysctl.h:43, from common.h:50, from cli.c:20: /usr/include/linux/sysinfo.h:7:8: note: originally defined here The attached patch to the kernel should fix this. The problem is that many of the userspace API files all got their guards renamed inside of the kernel when they got split out into separate files (rather than being renamed). A better way to do this might be to make the header installation discard the _UAPI prefix that got added. David --- commit 24d4756373d825c43c5f5c3cf1fc6737943abf53 Author: David Howells dhowe...@redhat.com Date: Wed Nov 7 16:40:14 2012 + UAPI: The guards on linux/types.h and linxu/kernel.h are used by glibc The guards on linux/types.h and linux/kernel.h are used by glibc, and so shouldn't have been changed for the UAPI variants of those headers. Change those guards back and alter the ones on the KAPI variants instead. Interestingly, sys/sysctl.h shows checks on linux/list.h and linux/compiler.h, even though those headers aren't exported. Signed-off-by: David Howells dhowe...@redhat.com diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a123b13..e0e6839 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -1,5 +1,5 @@ -#ifndef _LINUX_KERNEL_H -#define _LINUX_KERNEL_H +#ifndef _KAPI_LINUX_KERNEL_H +#define _KAPI_LINUX_KERNEL_H #include stdarg.h diff --git a/include/linux/types.h b/include/linux/types.h index 1cc0e4b..1e99075 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -1,5 +1,5 @@ -#ifndef _LINUX_TYPES_H -#define _LINUX_TYPES_H +#ifndef _KAPI_LINUX_TYPES_H +#define _KAPI_LINUX_TYPES_H #define __EXPORTED_HEADERS__ #include uapi/linux/types.h @@ -212,4 +212,4 @@ struct callback_head { #define rcu_head callback_head #endif /* __ASSEMBLY__ */ -#endif /* _LINUX_TYPES_H */ +#endif /* _KAPI_LINUX_TYPES_H */ diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h index 321e399..642d1e9 100644 --- a/include/uapi/linux/kernel.h +++ b/include/uapi/linux/kernel.h @@ -1,5 +1,5 @@ -#ifndef _UAPI_LINUX_KERNEL_H -#define _UAPI_LINUX_KERNEL_H +#ifndef _LINUX_KERNEL_H +#define _LINUX_KERNEL_H #include linux/sysinfo.h @@ -10,4 +10,4 @@ #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) ~(mask)) -#endif /* _UAPI_LINUX_KERNEL_H */ +#endif /* _LINUX_KERNEL_H */ diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h index acf0979..a9b87a8 100644 --- a/include/uapi/linux/types.h +++ b/include/uapi/linux/types.h @@ -1,5 +1,5 @@ -#ifndef _UAPI_LINUX_TYPES_H -#define _UAPI_LINUX_TYPES_H +#ifndef _LINUX_TYPES_H +#define _LINUX_TYPES_H #include asm/types.h @@ -53,4 +53,4 @@ typedef __u32 __bitwise __wsum; #define __aligned_le64 __le64 __attribute__((aligned(8))) #endif /* __ASSEMBLY__ */ -#endif /* _UAPI_LINUX_TYPES_H */ +#endif /* _LINUX_TYPES_H */ -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel
Re: Anything changed on rawhide builders recently? Can't build ladvd
David Howells dhowe...@redhat.com wrote: A better way to do this might be to make the header installation discard the _UAPI prefix that got added. As the attached patch. David --- commit 75a88e14a97d239a47cbd0fc55fc23416007d733 Author: David Howells dhowe...@redhat.com Date: Wed Nov 7 17:14:14 2012 + UAPI: Strip the _UAPI prefix from header guards during header installation Strip the _UAPI prefix from header guards during header installation so that any userspace dependencies aren't affected. glibc, for example, checks for linux/types.h, linux/kernel.h, linux/compiler.h and linux/list.h - though the last two aren't actually exported. Signed-off-by: David Howells dhowe...@redhat.com diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index 239d22d..6c353ae 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl @@ -42,6 +42,9 @@ foreach my $filename (@files) { $line =~ s/(^|\s)(inline)\b/$1__$2__/g; $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g; $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g; + $line =~ s/#ifndef _UAPI/#ifndef /; + $line =~ s/#define _UAPI/#define /; + $line =~ s!#endif /[*] _UAPI!#endif /* !; printf {$out} %s, $line; } close $out; -- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel