Unable to build Kernel module for nVidia on a fresh 11.4 Installation

Hello everybody,

I’m trying to install the nVidia driver for a fresh Installation of OpenSUSE 11.4 (32-bit) but I’m running into some issues. I followed the instructions (SDB:NVIDIA the hard way - openSUSE) using the driver binary mentioned in the workaround link (NVIDIA DRIVERS 256.53 Certified) but the installer fails while building the kernel module with the following errors:

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Sun Mar 13 17:32:56 2011
installer version: 256.53

option status:
  license pre-accepted    : false
  update                  : false
  force update            : false
  expert                  : false
  uninstall               : false
  driver info             : false
  precompiled interfaces  : true
  no ncurses color        : false
  query latest version    : false
  OpenGL header files     : true
  no questions            : false
  silent                  : false
  no recursion            : false
  no backup               : false
  kernel module only      : false
  sanity                  : false
  add this kernel         : false
  no runlevel check       : false
  no network              : false
  no ABI note             : false
  no RPMs                 : false
  no kernel module        : false
  force SELinux           : default
  no X server check       : false
  no cc version check     : false
  force tls               : (not specified)
  X install prefix        : (not specified)
  X library install path  : (not specified)
  X module install path   : (not specified)
  OpenGL install prefix   : (not specified)
  OpenGL install libdir   : (not specified)
  utility install prefix  : (not specified)
  utility install libdir  : (not specified)
  doc install prefix      : (not specified)
  kernel name             : (not specified)
  kernel include path     : (not specified)
  kernel source path      : (not specified)
  kernel output path      : (not specified)
  kernel install path     : (not specified)
  proc mount point        : /proc
  ui                      : (not specified)
  tmpdir                  : /tmp
  ftp mirror              : ftp://download.nvidia.com
  RPM file list           : (not specified)

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 256.53.
-> Running distribution scripts
   executing: '/usr/lib/nvidia/pre-install'...
-> done.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Kernel source path: '/lib/modules/'
-> Kernel output path: '/lib/modules/'
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Performing Xen check.
-> Cleaning kernel module build directory.
   executing: 'cd ./kernel; make clean'...
-> Building kernel module:
   executing: 'cd ./kernel; make module SYSSRC=/lib/modules/
   p/source SYSOUT=/lib/modules/'...
   NVIDIA: calling KBUILD...
   make -C /lib/modules/ \
   KBUILD_SRC=/usr/src/linux- \
   KBUILD_EXTMOD="/tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel" -f /usr/src/l
   inux- \
   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 
   echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.
   ";	\
   echo;								\
   mkdir -p /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/.tmp_versions ; rm -
   f /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/.tmp_versions/*
   make -f /usr/src/linux- obj=/tmp/selfgz93
     cc -Wp,-MD,/tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/.nv.o.d  -nostdi
   nc -isystem /usr/lib/gcc/i586-suse-linux/4.5/include -I/usr/src/linux-2.6.37
   .1-1.2/arch/x86/include -Iinclude  -I/usr/src/linux- -in
   clude include/generated/autoconf.h   -I/tmp/selfgz9341/NVIDIA-Linux-x86-256.
   53/kernel -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno
   -strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-form
   at-security -fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=
   3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=generi
   c -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS
   sign-compare -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048
   -fno-stack-protector -fomit-frame-pointer -fasynchronous-unwind-tables -g -W
   declaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserv
   e-stack -DCC_HAVE_ASM_GOTO   -I/tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kerne
   l -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -
   vidia)" -c -o /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/.tmp_nv.o /tmp/
   In file included from /usr/src/linux-
                    from /usr/src/linux-,
                    from /usr/src/linux-
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv-linu
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c:13
   /usr/src/linux- In function ‘hweight_l
   /usr/src/linux- warning: signed an
   d unsigned type in conditional expression
   In file included from /usr/src/linux-
                    from /usr/src/linux-
                    from /usr/src/linux-
                    from /usr/src/linux-,
                    from /usr/src/linux-
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv-linu
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c:13
   /usr/src/linux- In function â€
   /usr/src/linux- warning:
   comparison between signed and unsigned integer expressions
   In file included from /usr/src/linux-
                    from /usr/src/linux-,
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv-linu
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c:13
   /usr/src/linux- In function â
   /usr/src/linux- warning
   : comparison between signed and unsigned integer expressions
   /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c: At top level:
   /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c:426:5: error: unknown fi
   eld ‘ioctl’ specified in initializer
   /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c:426:5: warning: initiali
   zation from incompatible pointer type
   make[4]: *** [/tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.o] Error 1
   make[3]: *** [_module_/tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel] Error 
   make[2]: *** [sub-make] Error 2
   nvidia.ko failed to build!
   make[1]: *** [module] Error 1
   make: *** [module] Error 2
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed.  Please see the file
       '/var/log/nvidia-installer.log' for details.  You may find suggestions
       on fixing installation problems in the README available on the Linux
       driver download page at www.nvidia.com.

Can anybody make any sense of this? :slight_smile:

Thank you all very much in advance

Do you have kernel-source, kernel-syms, linux-glibc-devel (aka kernel headers), make and gcc installed?

Have you looked here;
openSUSE Graphic Card Practical Theory Guide for Users

I’m running the devdriver 260.19.26 fine here in 11.4 x86_64 with dual monitors.

Hello Malcom,

I was only missing the kernel-syms package, but installing it did not make any difference, I tried to install but I got the same exact error.

Yes I did, but even though there is a great amount of information there, I don’t think there is something more regarding the installation of the driver.

I think that 64-bit systems are unaffected from this issue (https://bugzilla.novell.com/show_bug.cgi?id=648718), so nVidia drivers version 260 can run fine. But they are causing crashes on KDE 4.4+ for 32-bit systems, and that is why I’m trying to install them “The Hard way”. My old 11.3 installation had the same problem, but the same driver installed just fine.

Now that I look at the log message again, I noticed this:

echo "  ERROR: Kernel configuration is invalid.";        \
   echo "         include/generated/autoconf.h or include/config/auto.conf are 
   echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.
   ";    \

Do you think I should try this? I’m not very comfortable with messing with the kernel…

Thank you very much for your time

I had this one when I installed 11.4, the problem was I failed to reboot the machine after I installed the kernel source.
After reboot it did go through.

You could also jump up to the 270.xx beta drivers from the Nvidia page. They are working fine for me and I had no luck with the 260.xx drivers in 11.3.

That’s a common error due to things changing into the ‘generated’ directory, as suggested, try the beta driver, else I can show you what to create, just some softlinks.

Sorry for the delay in replying.

I just downloaded and installed the latest beta driver. It works great! Well at least it does not crash on login as the “stable” one :slight_smile:

Thank you all for you help!

I was quick to declare victory. Version 270.26 causes VLC to crash… If someone wants to use 270 version drivers I would recommend using version 270.29, as linked at this bug comment: