View Single Post
Old 08-17-11, 04:18 PM   #40
Dizzle7677
Registered User
 
Dizzle7677's Avatar
 
Join Date: May 2008
Location: Relativity
Posts: 194
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Finally got the nvidia modules(280.13) to build and install on 3.1.0-rc2 by the changing the relevant portion in {nvidia driver}/kernel/nv-linux.h to the below:

Code:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 7)
#  error This driver does not support 2.4 kernels older than 2.4.7!
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
#  define KERNEL_2_4
#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
#  error This driver does not support 2.5 kernels!
/*#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 7, 0)*/
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
#  define KERNEL_2_6
#else
#  error This driver does not support development kernels!
#endif
Got this tip from looking at a launchpad patch for the driver to build on Linux 3.0.
__________________
Elephants can fly but they have no reason to.
------------------------------------------
Phenom II X3 720 @ 3.5Ghz | Asus M4A785-M | 2 Gig Crucial DDR2 @ 960 Mhz | GeForce GT 440 1024 MB | Linux 3.6.1 / Ubuntu 12.04 / W.I.N.E v1.5.14
Dizzle7677 is offline   Reply With Quote