Bug 784350

Summary: kernel-devel-3.3.0 is missing include files...
Product: [Fedora] Fedora Reporter: kevin martin <ktmdms>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-24 19:06:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description kevin martin 2012-01-24 16:21:14 UTC
Description of problem:attempting to compile the nvidia driver against the 3.3.0 kernel source finds missing include files.


Version-Release number of selected component (if applicable):kernel 3.3.0


How reproducible: always


Steps to Reproduce:
1.compile nvidia driver
2.compile fails

  
Actual results: nvidia driver won't compile due to missing kernel include files.


Expected results: nvidia driver compiles.


Additional info: kernel-devel-3.3.0 is missing (at least) the following include files:

/lib/modules/3.3.0-0.rc1.git0.3.fc17.x86_64/source/arch/x86/include/asm/unistd_32.h (needed by unistd.h)
/lib/modules/3.3.0-0.rc1.git0.3.fc17.x86_64/source/arch/x86/include/asm/unistd_64.h (needed by unistd.h)
/lib/modules/3.3.0-0.rc1.git0.3.fc17.x86_64/source/arch/x86/include/asm/unistd_32_ia32.h (needed by ia32_unistd.h)

Comment 1 Josh Boyer 2012-01-24 17:09:04 UTC
Those files are auto-generated by Kbuild now.  They are located in arch/x86/include/generated/ in the kernel-devel package.  The kernel build system adds -Iarch/x86/include/generated in the makefile invocation.

I'm not sure what problems the nvidia driver is having, but perhaps it needs to be adapted to the 3.3 kernel.

Comment 2 kevin martin 2012-01-24 17:18:43 UTC
Ah, I see.  the build needs to add the generated/asm directory to it's -I list.  Thanks.

Comment 3 kevin martin 2012-01-24 17:20:44 UTC
but how does ia32_unistd.h get the unistd_32_ia32.h file then?  It's asking for:


#define __SYSCALL_ia32_NR(x) (x)
#include <asm/unistd_32_ia32.h>


not the generated version.

Comment 4 kevin martin 2012-01-24 17:23:29 UTC
and unistd.h is not asking for the generated version either...it's looking for it in .....include/asm, not ....include/generated/asm.

Comment 5 Josh Boyer 2012-01-24 17:29:50 UTC
(In reply to comment #4)
> and unistd.h is not asking for the generated version either...it's looking for
> it in .....include/asm, not ....include/generated/asm.

You're aware of how the -I option works, correct?  It can be listed multiple times.  E.g.

-isystem /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -I/home/jwboyer/src/linux-2.6/arch/x86/include -Iarch/x86/include/generated -Iinclude  -include /home/jwboyer/src/linux-2.6/include/linux/kconfig.h -D__KERNEL__ 

which basically says "look for <asm/<whatever>.h> in the following directories in this order: /home/jwboyer/src/linux-2.6/arch/x86/include, arch/x86/include/generated/, include"

Comment 6 kevin martin 2012-01-24 18:50:57 UTC
Ah, my mistake, I had added a '-I/lib/modules/3.3.0-0.rc1.git0.3.fc17.x86_64/source/arch/x86/include/generated/asm' when all I needed was '-I/lib/modules/3.3.0-0.rc1.git0.3.fc17.x86_64/source/arch/x86/include/generated'.  Now it compiles.

Thanks.

Comment 7 Josh Boyer 2012-01-24 19:06:49 UTC
Wonderful.  Closing this out.