# nvidia-kernel 1.0.6111

## edrumwri

I seem to have problems emerging every version of nvidia-kernel that has come out over time..  In the past, I had to disable to the sandbox to get the thing to install.  Now, I get a completely different error:

If you are using a Linux 2.4 kernel, please make sure

you either have configured kernel sources matching your

kernel or the correct set of kernel headers installed

on your system.

If you are using a Linux 2.6 kernel, please make sure

you have configured kernel sources matching your kernel

installed on your system. If you specified a separate

output directory using either the "KBUILD_OUTPUT" or

the "O" KBUILD parameter, make sure to specify this

directory with the SYSOUT environment variable or with

the appropriate nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

I'm running the 2.6.4 kernel.  Could anybody tell me how to fix this beast, if only for the time being?

Thanks,

Evan

----------

## d0nju4n

is /usr/src/linux pointing to the correct kernel sources?

----------

## bluestar11

 *d0nju4n wrote:*   

> is /usr/src/linux pointing to the correct kernel sources?

 

I have the same problem, My kernel version is 2.6.5-gentoo-r1. /usr/src/linux has already linked to the correct kernel sources. But error is stiil the same.

----------

## dmoulton

I got this after I had done a 

```
make mrproper
```

 in /usr/src/linux

----------

## bluestar11

 *dmoulton wrote:*   

> I got this after I had done a 
> 
> ```
> make mrproper
> ```
> ...

 

When I emerge nvidia 6111 driver the first time, it told me to do a "make mrproper".

I followed the order, but then I saw the error message above.

----------

## bluestar11

It looks like I have found something.

The include/linux/version.h file in kenerl sources directory is missing after "make mrproper".

----------

## cdmstro

I ran into this same issue when first moving to nvidia-1.0.6111, I was already on the 2.6.x branch of the kernel.   I found some information on a new utility kernel-config which was merged as a dependency for the 2.6.6 builds, and used it to set the KBUILD_OUTPUT variables.  Basically, I ran the command: 

```
config-kernel --output-dir=/var/tmp/kernel-output
```

This places the output of the kernel compilation in the /var directory structure and when external modules are built, they do not have to write to the /usr/src/linux directory (outside the sandbox).

More info can be found here

----------

## edrumwri

1.  usr/src/linux is pointing to the correct sources

2.  configure-kernel ... followed by emerge nvidia-kernel gives the same result

I'm glad (and dismayed) to see I'm not the only one having this problem.

Thanks,

Evan

----------

## dmoulton

I was having this problem when using kernel 2.6.5. When I upgraded to 2.6.8, the nvidia-kernel compiled fine and works.

----------

## edrumwri

Thanks for the tip!  Upgrading my kernel from 2.6.4 to 2.6.8 solved the problem as well.

Thanks again,

Evan

----------

## redflash

I had a new system with kernel 2.6.8.1. And all nvidia-kernel packages i tried stops with the same error. 

I also tried to install the drivers (1.0.6111) directly without emerge.

Same error.

I also tested it with gentoo-dev-sources-2.6.8-r3 and development-sources-2.6.8.1. Always the same error.

Setting the kbuild-variable with config-kernel hasn't any positiv effect.

Plz new ideas where i can find a solution.

----------

## xiaokj

its a known problem -- its just that pci_get_class and pci_find_class are swaped

search the forums for nvidia-kernel-6.1.0.6111.tar-bz2

----------

## redflash

i tried this new ebuild but had the same error.

----------

## DaMouse

well, did you setup your overlay? if not, emerge sync can break any untarred overlays into plain /usr/portage. My ebuild merely adds the patch to switch pci_find_class to pci_get_class which is the main problem....

-DaMouse

----------

## redflash

the ebuild is in my local portage.

----------

## DaMouse

as in /usr/local/portage or just /usr/portage ? ( as in local rather than on ftp or something )

also, where'd you untar it to?

-DaMouse

----------

## DaMouse

By untar, did you untar it in the root of /usr/porage or whatever as it contains the subdirs for media-video etc..

-DaMouse

----------

## redflash

the ebuild is on the right place.

/usr/local/portage/media-video/nvidia-kernel/nvidia-kernel-1.0.6111-r1.ebuild

i can choose it and the installation but it also break with the same error about kbuild-variable.

----------

## DaMouse

Thinking on the brink, check you /usr/src/linux symlink  :Smile: 

-DaMouse

----------

## redflash

the link is set right.

i use kernel 2.6.8.1 and /usr/src/linux point on to the sources for my kernel.

----------

## DaMouse

Can you post the full output of an attempted emerge nvidia-kernel for 2.6.8.1?

-DaMouse

----------

## redflash

Here is the output.

```
>>> Unpacking source...

 [32;01m*[0m /usr/src/linux is a symbolic link

 [32;01m*[0m Determining the real directory of the Linux kernel source code

 [32;01m*[0m Building for Linux 2.6.8.1 found in /usr/src/linux

 [32;01m*[0m which outputs to /var/tmp/kernel-output/2.6.8.1

Creating directory NVIDIA-Linux-x86-1.0-6111-pkg1

Verifying archive integrity... OK

Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86 1.0-6111..........................................................................................................................................................................................................

 [32;01m*[0m Applying power-suspend-2.6.9-changes.patch...

[A[153G  [34;01m[ [32;01mok[34;01m ][0m

 [32;01m*[0m Applying nv_enable_pci.patch...

[A[153G  [34;01m[ [32;01mok[34;01m ][0m

 [32;01m*[0m Applying fix_pci_find_class.patch...

[A[153G  [34;01m[ [32;01mok[34;01m ][0m

>>> Source unpacked.

x86

If you are using a Linux 2.4 kernel, please make sure

you either have configured kernel sources matching your

kernel or the correct set of kernel headers installed

on your system.

If you are using a Linux 2.6 kernel, please make sure

you have configured kernel sources matching your kernel

installed on your system. If you specified a separate

output directory using either the "KBUILD_OUTPUT" or

the "O" KBUILD parameter, make sure to specify this

directory with the SYSOUT environment variable or with

the appropriate nvidia-installer command line option.

*** Unable to determine the target kernel version. ***
```

----------

## DaMouse

tried make mrproper? (trying shorter straws now :/)

-DaMouse

----------

## Pauoloelcuator

I had the same problem last week....

  All of you probably have the most recent version of the linux-headers. So here is how I solved my problem.

1. Made sure I installed the proper kernel-source version for my kernel.

2. Re-compile glibc as instructed in the post-installation messages (from the kernel-header)

3. Then I recompiled the kernel

4. And recompile nvidia-kernel and nvidia-glx..

Dunno if I really needed to kernel but I thought I wanted to make sure that all the variables use for the build were consistent with that of the headers.

hope that helps.

Paul

----------

## redflash

Thanks for all help.

It works now.

The tip with the linux-headers was the solution.

----------

## DaMouse

phew, at least something works  :Smile: 

-DaMouse

----------

