# nvidia.ko fails to build - "make: *** [module] Error 1"

## Eregus

Hi

I started using Gentoo recently ant there's one thing I can't get working - nvidia proprietary drivers. When I emerge it, it fails and gives me some "info" about errors (info, that I don't understand at all).

There's full emerge output: http://bpaste.net/show/144197/

Note: I use pf-sources, but it's not its fault, because I also tried emerging nvidia-drivers on gentoo kernel and got the same.

Any idea?

----------

## Jaglover

Current nVidia drivers do not build against kernel 3-11.

In kernel/nv-linux.h change

```
959 #define NV_NUM_PHYSPAGES                num_physpages

```

to 

```
959 #define NV_NUM_PHYSPAGES                get_num_physpages
```

either using a patch or by hand.

----------

## Eregus

Now it works perfectly. Thanks and sorry for quite stupid quesiton.

----------

## Jaglover

You are welcome! Although the question wasn't stupid. Your only mistake was the failure to read the warning about unsupported kernels.

----------

## roarinelk

 *Jaglover wrote:*   

> Current nVidia drivers do not build against kernel 3-11.
> 
> In kernel/nv-linux.h change
> 
> ```
> ...

 

That's horribly horribly wrong! 

1st,  get_num_physpages is a function, not a variable.  What you're doing here

is assigning the address of this function, not the value it should hold.

2nd, num_physpages was renamed to totalram_pages, use this one instead.

----------

