# can't compile nvidia-drivers with linux-2.6.27-gentoo-r2

## swigrid

hi,

I emerged new kernel after quite while, and I can't compile nvidia drivers 173.14.12, I m getting error about kernel config files, i've done, what error log suggested, but it didn't help

```

   KBUILD_SRC=/usr/src/linux-2.6.27-gentoo-r2 \

   KBUILD_EXTMOD="/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86-173.14.12-pkg0/usr/src/nv" -f /usr/src/linux-2.6.27-gentoo-r2/Makefile \

   modules

test -e include/linux/autoconf.h -a -e include/config/auto.conf || (      \

   echo;                        \

   echo "  ERROR: Kernel configuration is invalid.";      \

   echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";   \

   echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";   \

   echo;                        \

   /bin/false)

```

```

/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86-173.14.12-pkg0/usr/src/nv/nv-linux.h:674: error: too many arguments to function 'on_each_cpu'

make[4]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86-173.14.12-pkg0/usr/src/nv/nv.o] Error 1

make[3]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/work/NVIDIA-Linux-x86-173.14.12-pkg0/usr/src/nv] Error 2

make[2]: *** [sub-make] Error 2

NVIDIA: left KBUILD.

nvidia.ko failed to build!

make[1]: *** [module] Error 1

make: *** [module] Error 2

 * 

 * ERROR: x11-drivers/nvidia-drivers-173.14.12 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 3619:  Called linux-mod_src_compile

 *             environment, line 2669:  Called die

 * The specific snippet of code:

 *               eval "emake HOSTCC="$(tc-getBUILD_CC)"             CROSS_COMPILE=${CHOST}-                   LDFLAGS="$(get_abi_LDFLAGS)"                   ${BUILD_FIXES}          ${BUILD_PARAMS}                   ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";

 *  The die message:

 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=  IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux       SYSOUT=/lib/modules/2.6.27-gentoo-r2/build HOST_CC=i686-pc-linux-gnu-gcc clean module

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-173.14.12/temp/environment'.

 * 

```

thanx

----------

## ramsesxi

It seems like the linux-src tree is not the one used to build your kernel.

# uname -a

# eselect kernel list

----------

## swigrid

```

uname -a

Linux roman 2.6.27-gentoo-r2 #1 SMP Mon Nov 24 13:31:05 GMT 2008 i686 AMD Sempron(tm) Processor 2800+ AuthenticAMD GNU/Linux

```

```
eselect kernel list

Available kernel symlink targets:

  [1]   linux-2.6.23-gentoo-r8

  [2]   linux-2.6.24-gentoo-r5

  [3]   linux-2.6.27-gentoo-r1

  [4]   linux-2.6.27-gentoo-r2 *

```

```
 ls /usr/src -l

total 5

lrwxrwxrwx  1 root root   22 Nov 25 11:02 linux -> linux-2.6.27-gentoo-r2

drwxr-xr-x 19 root root 1152 Apr 10  2008 linux-2.6.23-gentoo-r8

drwxr-xr-x 19 root root 1152 Nov 24 10:51 linux-2.6.24-gentoo-r5

drwxr-xr-x 23 root root 1496 Nov 24 14:14 linux-2.6.27-gentoo-r1

drwxr-xr-x 23 root root 1528 Nov 25 11:04 linux-2.6.27-gentoo-r2

```

thanks

Roman

----------

## d2_racing

Hi, the nvidia driver need to be the latest because you use the kernel 2.6.27

```

# echo "x11-drivers/nvidia-drivers ~x86" >> /etc/portage/package.keywords

# emerge  nvidia-drivers

```

----------

## swigrid

Hi, I'd happily use latest one, but I've got older graphic card (FX5200) and newer driver doesn't include this card. but I managed to compile nvidia drivers with kernel-2.6.26-r2 just now...

----------

## clytle374

5700FX card here having the same problem with new kernels,  how did you get them built?

Thanks

----------

## Tolstoi

I got a FX5200 too and have problems with the nvidia-drivers. The latest drivers will compile (with 2.6.27.xx) but the module won't load with the latest kernel. I have to use kernel 2.6.26-gentoo  to get the 173.14.09 working. Using 2.6.26 the other nvidia-drivers won't compile. Stupid situation I've never been in before with the drivers.

----------

## mattes

nvidia has a easy solution: buy a new card   :Wink: 

----------

## Tolstoi

Ahhh, cool   :Cool: 

----------

## NeddySeagoon

There is a patch and an ebuild in this bug

Use your overlays

----------

