Cannot compile NVIDIA OpenSuse 12, 3.4.11-2.16

Hello I’m trying to install the nvidia driver and cuda but I am having trouble installing the nvidia driver. The log contains this issue:

 
   test -e include/generated/autoconf.h -a -e include/config/auto.conf || (    \
   echo;                                \
   echo "  ERROR: Kernel configuration is invalid.";        \
   echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
   echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";    \
   echo;                                \
   /bin/false)

I tried running ‘make oldconfig && make prepare’ with no success.

Here’s the full error: Nvidia - Pastebin.com

During my searches I found this thread with similar issue http://forums.opensuse.org/english/get-technical-help-here/hardware/441398-error-compile-nvidia-driver.html

And followed the instructions to check the kernel source version. They look okay to me but I could be wrong.


uname -a :

Linux linux-1 3.4.11-2.16-desktop #1 SMP PREEMPT Wed Sep 26 17:05:00 UTC 2012 (259fc87) x86_64 x86_64 x86_64 GNU/Linux


rpm -qa '*kernel*':

kernel-desktop-3.4.11-2.16.1.x86_64
kernel-devel-3.4.11-2.16.1.noarch
kernel-firmware-20120719git-2.9.1.noarch
kernel-source-3.4.11-2.16.1.noarch
kernel-desktop-devel-3.4.11-2.16.1.x86_64

Any ideas?

On 2013-11-20 00:16, enate wrote:

> Any ideas?

You do exactly what the error message says:


cd /usr/src/linux
make cloneconfig
make prepare


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

I tried running ‘make oldconfig && make prepare’ with no success.

Looks to me like he already did that.

On 2013-11-20 02:26, evetsnameloc wrote:
>
>> I tried running ‘make oldconfig && make prepare’ with no success.
>
> Looks to me like he already did that.

Oh.

That text must be on a later edit, so it was not copied to the NNTP
gateway, and thus I could not see it. Sigh…

Ok, then what I need to know is what messages he got from that attempt
at make.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

include/generated/autoconf.h is contained in kernel-desktop-devel.
If you have this installed (and you have apparently), you don’t need to run any “make prepare” to be able to install the nvidia driver.

Maybe because you did confuses the installer?
Try to run “make clean” or “make mrproper” in the kernel source tree, maybe it would work then?

But if I read your installation log correctly, you don’t get that error you quoted in your first post. That’s just the commands in the script that are run and check if the kernel headers can be found. And apparently they are found because the script doesn’t abort there.

Your first actual error is this:

   In file included from /tmp/selfgz4905/NVIDIA-Linux-x86_64-331.20/kernel/conftest.h:1:0,
                    from /tmp/selfgz4905/NVIDIA-Linux-x86_64-331.20/kernel/nv-linux.h:15,
                    from /tmp/selfgz4905/NVIDIA-Linux-x86_64-331.20/kernel/nv.c:13:
   /tmp/selfgz4905/NVIDIA-Linux-x86_64-331.20/kernel/conftest/macros.h:1:2: error: #error INIT_WORK() conftest failed!

I don’t really know why that is, googling only revealed problems like this when trying to compile older drivers on newer kernels.
But you should install “kernel-syms” as well AFAIK. Maybe that fixes it already?

Thanks for the replies and suggestions. After running


make oldconfig
make prepare

I got:


/usr/src/linux # make oldconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
#
# using defaults found in /boot/config-3.4.11-2.16-desktop
#
#
# configuration written to .config
#
mars2-1:/usr/src/linux # make prepare
scripts/kconfig/conf --silentoldconfig Kconfig
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_64.h
  HOSTCC  arch/x86/tools/relocs
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh

Then I ran make. It’s too long to pastebin, but it make completes. There are a couple places with compiler warning. When I run the Nvidia install, it gives the same results as before.

I also tried a make clean, make mrproper and make again with the same results as before.

On 2013-11-20 22:46, enate wrote:
>
> Thanks for the replies and suggestions. After running
>
>
> Code:
> --------------------
>
> make oldconfig
> make prepare
> --------------------

Rather “make cloneconfig” and “make prepare”.


make cloneconfig
make scripts
make prepare

> Then I ran make.

Don’t.

> I also tried a make clean, make mrproper and make again with the same
> results as before.

Don’t run mrproper, it destroys things. Rather reinstall the rpms.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

If you have no success with the compilation
You can try downloading the nvidia driver and cuda .run file. ( this are two different packages)
then install first the nvidia driver, then the cuda disregarding the
nvidia driver installation when you run the cuda .run file.

I said install first the nvidia driver because you might have a specific graphic driver
you want to use instead of the one included in the cuda .run package.

But wouldn’t this have to compile the kernel module as well?

Of course it would.

It is like when you are installing the the .run nvidia propreitary graphic driver.:slight_smile:
I have done it long ago with cuda and it is not just as easy as 123 needs some tweaking in
openSUSE. I have to boot my machine with cuda to recall what I did to it.:frowning:

Yes, I know. That was a rhetorical question… :wink:

But the OP has problems with compiling the kernel module, i.e. he cannot install the .run driver.
So your suggestion won’t help much I’m afraid.

I see, If memory serves I installed another gcc version not the one shipped with openSUSE 12.3 version to compile and disable gcc version check
in the cuda .run when I installed it. I found a reference about it in the net which I followed.
The op maybe have to help himself to search regarding this.

I reinstalled the kernel-source rpms with zypper. Then I did:

Rather “make cloneconfig” and “make prepare”.

Code:
make cloneconfig
make scripts
make prepare

And got the same error.

I tried running the cuda*.run which uses a version 319.37 (The most recent is 331.20). It gives me a different error in the logs, but they don’t really give much info except warning me about Nouveau.

nvidia-installer command line:
./nvidia-installer
–ui=none
–no-questions
–accept-license
–disable-nouveau

Using built-in stream user interface
→ License accepted by command line option.
→ Installing NVIDIA driver version 319.37.
→ Running distribution scripts
executing: ‘/usr/lib/nvidia/pre-install’…
→ done.
WARNING: One or more modprobe configuration files to disable Nouveau are already present at: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf. Please be sure you have rebooted your system since these files were written. If you have rebooted, then Nouveau may be enabled for other reasons, such as being included in the system initial ramdisk or in your X configuration file. Please consult the NVIDIA driver README and your Linux distribution’s documentation for details on how to correctly disable the Nouveau kernel driver.
→ For some distributions, Nouveau can be disabled by adding a file in the modprobe configuration directory. Would you like nvidia-installer to attempt to create this modprobe file for you? (Answer: Yes)
→ One or more modprobe configuration files to disable Nouveau have been written. For some distributions, this may be sufficient to disable Nouveau; other distributions may require modification of the initial ramdisk. Please reboot your system and attempt NVIDIA driver installation again. Note if you later wish to reenable Nouveau, you will need to delete these files: /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
→ Performing CC sanity check with CC=“cc”.
→ Kernel source path: ‘/lib/modules/3.4.11-2.16-desktop/source’
→ Kernel output path: ‘/lib/modules/3.4.11-2.16-desktop/build’
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 equivalent nvidia-installer command line option.

Nouveau is already blacklisted and have rebooted (multiple times). lsmod doesn’t show Nouveau.

I see, If memory serves I installed another gcc version not the one shipped with openSUSE 12.3 version to compile and disable gcc version check
in the cuda .run when I installed it. I found a reference about it in the net which I followed.
The op maybe have to help himself to search regarding this.

Thanks! I will do some searching to see what I can find.