# Cannot compile nvidia module with gcc 4.8.1 [Solved]

## noverby

As the topic suggest I cannot compile the nvidia module with gcc 4.8.1. I have tried to compile it with several different kernels, so it must be a problem with gcc. The reason why I'm using gcc 4.8.1 is because my  laptop have a haswell cpu. I used the following stage-3 build which is build and configured to use gcc 4.8.1 for haswell:

https://forums.gentoo.org/viewtopic-p-7343500.html

Build log:

http://bpaste.net/show/118299/

lspci:

http://bpaste.net/show/118302/

It's a Optimus laptop but that should not be a problem.Last edited by noverby on Mon Jul 29, 2013 11:36 am; edited 1 time in total

----------

## lagalopex

Compiling nvidia-drivers with gcc 4.8.1 is working fine for me.

Are you sure you have tried different kernels? (The version /usr/src/linux/ points to is the important one! At least your linked build log used kernel 3.10 which is unsupported by the current nvidia-drivers... there exists a patch though...)

----------

## noverby

You were right... nvidia-drivers compiled just fine under linux kernel 3.8.13. Where can I see which kernels are supported by nvidia?

----------

## lagalopex

Look what emerge is printing...

```
 * Found sources for kernel version:

 *     3.10.3-gentoo-r1

 * Gentoo supports kernels which are supported by NVIDIA

 * which are limited to the following kernels:

 * <sys-kernel/gentoo-sources-3.10

 * <sys-kernel/vanilla-sources-3.10

 * 

 * You are free to utilize epatch_user to provide whatever

 * support you feel is appropriate, but will not receive

 * support as a result of those changes.

 * 

 * Do not file a bug report about this.
```

It sometimes happens that newer kernel releases break nvidia-drivers. If thats known a note is added to the ebuild.

----------

## PaulBredbury

 *nimoov wrote:*   

> Where can I see which kernels are supported by nvidia?

 

From the bitching & references to patches on the Nvidia forums. Also on Gentoo bugzilla  :Laughing: 

----------

