Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 449140

Summary: x11-drivers/nvidia-drivers-304.64 with linux 3.7.x - kernel/nv-linux.h:1561:2: error: #error "NV_INIT_WORK_ARGUMENT_COUNT value unrecognized!
Product: Gentoo Linux Reporter: Russell Dwiggins <undrwater>
Component: [OLD] Core systemAssignee: Doug Goldstein (RETIRED) <cardoe>
Status: RESOLVED WONTFIX    
Severity: normal CC: b.r.longbons, gothiger, jer, m.debruijne, spock, xarthisius
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
URL: http://slackblogs.blogspot.com/2012/12/linux-kernel-37-vmware-workstation-and.html
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for nvidia-drivers-304.64 agains kernel 3.7

Description Russell Dwiggins 2012-12-29 07:40:54 UTC
nvidia-drivers is not compiling on kernel 3.7 on my system.  Looking into it via google, I discovered a patch at the link provided.  When applied, nvidia-drivers compiles successfully.

Reproducible: Always

Steps to Reproduce:
1. Update to kernel 3.7
2. Attempt to emerge nvidia-drivers
3. merge fails
Actual Results:  
merge fails

Expected Results:  
successful merge

The patch:

Index: kernel/conftest.sh
===================================================================
--- kernel/conftest.sh.orig
+++ kernel/conftest.sh
@@ -20,6 +20,7 @@ ARCH=$3
 ISYSTEM=`$CC -print-file-name=include 2> /dev/null`
 SOURCES=$4
 HEADERS=$SOURCES/include
+HEADERSA=$SOURCES/include/uapi
 OUTPUT=$5
 XEN_PRESENT=1
 
@@ -118,7 +119,7 @@ build_cflags() {
         fi
     fi
 
-    CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
+    CFLAGS="$CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS"
 
     test_xen
 
@@ -146,10 +147,10 @@ build_cflags() {
         fi
     fi
 
-    CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS $AUTOCONF_CFLAGS"
+    CFLAGS="$BASE_CFLAGS $MACH_CFLAGS $OUTPUT_CFLAGS -I$HEADERS -I$HEADERSA $AUTOCONF_CFLAGS"
 
     if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]; then
-        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$OUTPUT/arch/x86/include/generated"
+        CFLAGS="$CFLAGS -I$SOURCES/arch/x86/include -I$SOURCES/arch/x86/include/uapi -I$OUTPUT/arch/x86/include/generated -I$OUTPUT/arch/x86/include/generated/uapi"
     elif [ "$ARCH" = "arm" ]; then
         CFLAGS="$CFLAGS -I$SOURCES/arch/arm/include -I$OUTPUT/arch/arm/include/generated"
     fi
Index: kernel/nv-mmap.c
===================================================================
--- kernel/nv-mmap.c.orig
+++ kernel/nv-mmap.c
@@ -14,6 +14,11 @@
 #include "os-interface.h"
 #include "nv-linux.h"
 
+/* Fix needed for change in VM_xxx flags */
+#ifndef VM_RESERVED
+# define VM_RESERVED (VM_DONTEXPAND | VM_DONTDUMP)
+#endif
+
 /*
  * The 'struct vm_operations' open() callback is called by the Linux
  * kernel when the parent VMA is split or copied, close() when the
Comment 1 Russell Dwiggins 2012-12-29 07:42:36 UTC
Created attachment 333660 [details]
patch for nvidia-drivers-304.64 agains kernel 3.7
Comment 2 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2012-12-29 12:32:33 UTC
Our policy is not to patch drivers for new kernels by ourselves. Instead we wait for nvidia's official release that supports given kernel. In the meantime you can use epatch_user functionality to fix it locally on your boxes (see [1]) Thank you for your report and understanding.
Best regards,
Kacper Kowalik

[1] http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=3&chap=6
Comment 3 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-01-06 16:38:16 UTC
*** Bug 450546 has been marked as a duplicate of this bug. ***
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-26 15:57:34 UTC
*** Bug 454054 has been marked as a duplicate of this bug. ***