This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Failing misc/check-installed-headers-c with new kernel headers.


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:

diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h
index d71013fffaf6..87aa2a6d9125 100644
--- a/include/uapi/linux/sysctl.h
+++ b/include/uapi/linux/sysctl.h
@@ -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.

diff --git a/scripts/check-installed-headers.sh b/scripts/check-installed-headers.sh
index 8e7beffd82..1742c2bf20 100644
--- a/scripts/check-installed-headers.sh
+++ b/scripts/check-installed-headers.sh
@@ -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"
---

Thoughts?

-- 
Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]