Bug 1601529

Summary: #include <linux/aio_abi.h> broken
Product: [Fedora] Fedora Reporter: Joe Orton <jorton>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: airlied, bskeggs, ewk, hdegoede, ichavero, itamar, jarodwilson, jglisse, john.j5live, jonathan, josef, kernel-maint, labbott, linville, mchehab, mjg59, steved
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1603147 (view as bug list) Environment:
Last Closed: 2018-07-18 16:05:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1597674    

Description Joe Orton 2018-07-16 14:48:48 UTC
Description of problem:
The nginx build is broken because of errors including <linux/aio_abi.h>

Version-Release number of selected component (if applicable):
kernel-headers-4.18.0-0.rc4.git4.1.fc29.x86_64

How reproducible:
always

Steps to Reproduce:
1.echo 'int f;' | gcc -include linux/aio_abi.h -xc -c - -o /dev/null 

Actual results:
/usr/include/asm/signal.h:127:2: error: unknown type name ‘size_t’
  size_t ss_size;
  ^~~~~~
In file included from <command-line>:32:
/usr/include/linux/aio_abi.h:115:2: error: unknown type name ‘size_t’
  size_t  sigsetsize;
  ^~~~~~

Expected results:
no errors, as in Fedora 28 kernel-headers-4.17.4-200.fc28.x86_64)

Additional info:
echo 'int f;' | gcc -include sys/types.h -include linux/aio_abi.h -xc -c - -o /dev/null 
fails differently

In file included from /usr/include/asm/signal.h:7,
                 from /usr/include/linux/signal.h:5,
                 from /usr/include/linux/aio_abi.h:32,
                 from <command-line>:32:
/usr/include/linux/time.h:16:8: error: redefinition of ‘struct timeval’
 struct timeval {
        ^~~~~~~
In file included from /usr/include/sys/select.h:37,
                 from /usr/include/sys/types.h:196,
                 from <command-line>:32:
/usr/include/bits/types/struct_timeval.h:8:8: note: originally defined here
 struct timeval
        ^~~~~~~
In file included from /usr/include/linux/signal.h:5,
                 from /usr/include/linux/aio_abi.h:32,
                 from <command-line>:32:
/usr/include/asm/signal.h:16:23: error: conflicting types for ‘sigset_t’
 typedef unsigned long sigset_t;
                       ^~~~~~~~
In file included from /usr/include/sys/select.h:33,
                 from /usr/include/sys/types.h:196,
                 from <command-line>:32:
/usr/include/bits/types/sigset_t.h:7:20: note: previous declaration of ‘sigset_t’ was here
 typedef __sigset_t sigset_t;
                    ^~~~~~~~

Comment 1 Joe Orton 2018-07-16 14:57:01 UTC
nginx is using this for io_submit, per io_submit(2) this seems to be a valid way to include the header:

       #include <linux/aio_abi.h>          /* Defines needed types */

       int io_submit(aio_context_t ctx_id, long nr, struct iocb **iocbpp);

Comment 2 Laura Abbott 2018-07-17 14:40:43 UTC
e-mailed the maintainer, the fix has been posted https://marc.info/?l=linux-fsdevel&m=153131732618217&w=2 and should be showing up in Linus' tree shortly. I'll see about applying it for today's build.

Comment 3 Laura Abbott 2018-07-18 16:05:43 UTC
Should be in kernel-4.18.0-0.rc5.git1.1.fc29 or later. If you still run into issues let me know and I'll talk to the upstream maintainer again.

Comment 4 Joe Orton 2018-07-19 10:07:26 UTC
Thanks very much indeed for the fast response - nginx builds are working fine now.