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/2.6.37.1-1.2-desktop/source'
-> Kernel output path: '/lib/modules/2.6.37.1-1.2-desktop/build'
-> 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/2.6.37.1-1.2-deskto
   p/source SYSOUT=/lib/modules/2.6.37.1-1.2-desktop/build'...
   NVIDIA: calling KBUILD...
   make -C /lib/modules/2.6.37.1-1.2-desktop/build \
   KBUILD_SRC=/usr/src/linux-2.6.37.1-1.2 \
   KBUILD_EXTMOD="/tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel" -f /usr/src/l
   inux-2.6.37.1-1.2/Makefile \
   modules
   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)
   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-2.6.37.1-1.2/scripts/Makefile.build obj=/tmp/selfgz93
   41/NVIDIA-Linux-x86-256.53/kernel
     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-2.6.37.1-1.2/include -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
   _CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -pipe -Wno-
   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 -
   DNVRM -DNV_VERSION_STRING=\"256.53\" -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE  -D
   "KBUILD_S
   TR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=KBUILD_STR(n
   vidia)" -c -o /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/.tmp_nv.o /tmp/
   selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c
   In file included from /usr/src/linux-2.6.37.1-1.2/include/linux/kernel.h:17:
   0,
                    from /usr/src/linux-2.6.37.1-1.2/include/linux/sched.h:54,
                    from /usr/src/linux-2.6.37.1-1.2/include/linux/utsname.h:35
   ,
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv-linu
   x.h:27,
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c:13
   :
   /usr/src/linux-2.6.37.1-1.2/include/linux/bitops.h: In function ‘hweight_l
   ong’:
   /usr/src/linux-2.6.37.1-1.2/include/linux/bitops.h:49:26: warning: signed an
   d unsigned type in conditional expression
   In file included from /usr/src/linux-2.6.37.1-1.2/arch/x86/include/asm/mmzon
   e.h:2:0,
                    from /usr/src/linux-2.6.37.1-1.2/include/linux/mmzone.h:793
   ,
                    from /usr/src/linux-2.6.37.1-1.2/include/linux/topology.h:3
   2,
                    from /usr/src/linux-2.6.37.1-1.2/include/linux/sched.h:79,
                    from /usr/src/linux-2.6.37.1-1.2/include/linux/utsname.h:35
   ,
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv-linu
   x.h:27,
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c:13
   :
   /usr/src/linux-2.6.37.1-1.2/arch/x86/include/asm/mmzone_32.h: In function â€
   ˜pfn_valid’:
   /usr/src/linux-2.6.37.1-1.2/arch/x86/include/asm/mmzone_32.h:87:15: warning:
   comparison between signed and unsigned integer expressions
   In file included from /usr/src/linux-2.6.37.1-1.2/arch/x86/include/asm/uacce
   ss.h:571:0,
                    from /usr/src/linux-2.6.37.1-1.2/include/linux/poll.h:14,
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv-linu
   x.h:84,
                    from /tmp/selfgz9341/NVIDIA-Linux-x86-256.53/kernel/nv.c:13
   :
   /usr/src/linux-2.6.37.1-1.2/arch/x86/include/asm/uaccess_32.h: In function â
   €˜copy_from_user’:
   /usr/src/linux-2.6.37.1-1.2/arch/x86/include/asm/uaccess_32.h:209:6: 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 
   2
   make[2]: *** [sub-make] Error 2
   NVIDIA: left KBUILD.
   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

Hi
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 
   missing.";\
   echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.
   ";    \
   echo;

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.

Hi
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:

https://bugs.kde.org/show_bug.cgi?id=251719#c195