Failing misc/check-installed-headers-c with new kernel headers.
Commit Message
In the latest Fedora Rawhide weekly glibc rebase I'm seeing
a failure across all arches.
This:
BUILDSTDERR: FAIL: misc/check-installed-headers-c
With this specific output:
BUILDSTDERR: :: sys/sysctl.h
BUILDSTDERR: ::::
BUILDSTDERR: *** Obsolete types detected:
BUILDSTDERR: /usr/include/linux/sysctl.h: KERN_PANIC_PRINT=78, /* ulong: bitmask to print system info on panic */
BUILDSTDERR: :::: -D_DEFAULT_SOURCE=1
BUILDSTDERR: :::: -D_GNU_SOURCE=1
BUILDSTDERR: :::: -D_XOPEN_SOURCE=700
BUILDSTDERR: :::: -std=c89
BUILDSTDERR: :::: -std=c89 -D_DEFAULT_SOURCE=1
BUILDSTDERR: :::: -std=c89 -D_GNU_SOURCE=1
BUILDSTDERR: :::: -std=c89 -D_XOPEN_SOURCE=700
BUILDSTDERR: :::: -std=gnu89
BUILDSTDERR: :::: -std=gnu89 -D_DEFAULT_SOURCE=1
BUILDSTDERR: :::: -std=gnu89 -D_GNU_SOURCE=1
BUILDSTDERR: :::: -std=gnu89 -D_XOPEN_SOURCE=700
BUILDSTDERR: :::: -std=c11
BUILDSTDERR: :::: -std=c11 -D_DEFAULT_SOURCE=1
BUILDSTDERR: :::: -std=c11 -D_GNU_SOURCE=1
BUILDSTDERR: :::: -std=c11 -D_XOPEN_SOURCE=700
BUILDSTDERR: :::: -std=gnu11
BUILDSTDERR: :::: -std=gnu11 -D_DEFAULT_SOURCE=1
BUILDSTDERR: :::: -std=gnu11 -D_GNU_SOURCE=1
BUILDSTDERR: :::: -std=gnu11 -D_XOPEN_SOURCE=700
This is a false positive from the regexp used to search for obsolete types.
Commit 81c9d43f94870 is the upstream kernel commit that triggers this:
---
Thoughts?
Comments
On Wed, Jan 16, 2019 at 4:11 PM Carlos O'Donell <carlos@redhat.com> wrote:
>
> In the latest Fedora Rawhide weekly glibc rebase I'm seeing
> a failure across all arches.
...
> BUILDSTDERR: *** Obsolete types detected:
> BUILDSTDERR: /usr/include/linux/sysctl.h: KERN_PANIC_PRINT=78, /* ulong: bitmask to print system info on panic */
...
> This is a false positive from the regexp used to search for obsolete types.
I propose to fix this by separating the obsolete-typedefs test to a
new program, implemented in Python, which lexes C accurately enough
that it won't get false positives on the contents of strings and
comments. It will also not look at headers that aren't under our
control. Patch shortly.
zw
@@ -153,6 +153,7 @@ enum
KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */
KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
KERN_PANIC_ON_WARN=77, /* int: call panic() in WARN() functions */
+ KERN_PANIC_PRINT=78, /* ulong: bitmask to print system info on panic */
};
---
The obsolete type is shorthand in a comment.
Should we expand the regexp in some way to ignore text within single-line
comments that we can easily detect?
Or is the accepted fix something like this (untested)? Seems a shame not to check
sysctl.h. However use of legacy types seem fairly rare these days.
@@ -127,6 +127,12 @@ EOF
;;
esac
;;
+
+ # linux/sysctl.h is unsupported for all arches because it contains
+ # a comment with 'ulong' as shorthand for a type.
+ (sys/sysctl.h)
+ continue;;
+
esac
echo :: "$header"