LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Cant compile nvidia driver (https://www.linuxquestions.org/questions/slackware-14/cant-compile-nvidia-driver-479375/)

Sugarat 09-01-2006 05:41 AM

Cant compile nvidia driver
 
Hi All,

I just downloaded the latest Nvidia drivers (1.0-8774) and tried compiling the nvidia module on a brand new Slackware 10.2 installation, but after compiling the module it says that it failed trying to load it.

I am running a newly compiled kernel 2.6.13 and the kernel source is where it should be.. No modules are loaded..

Any ideas?

Log included...

Code:

nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Fri Sep  1 01:21:56 2006

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
  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.
-> No precompiled kernel interface was found to match your kernel; would you li
  ke the installer to attempt to download a kernel interface for your kernel f
  rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: Yes)
-> No matching precompiled kernel interface was found on the NVIDIA ftp site;
  this means that the installer will need to compile a kernel interface for
  your kernel.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Kernel source path: '/lib/modules/2.6.13/source'
-> Kernel output path: '/lib/modules/2.6.13/build'
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Cleaning kernel module build directory.
  executing: 'cd ./usr/src/nv; make clean'...
  rm -f -f nv.o nv-vm.o os-agp.o os-interface.o os-registry.o nv-i2c.o nv.o nv
  -vm.o os-agp.o os-interface.o os-registry.o nv-i2c.o nvidia.mod.o
  rm -f -f build-in.o nv-linux.o *.d .*.{cmd,flags}
  rm -f -f nvidia.{o,ko,mod.{o,c}} nv_compiler.h *~
  rm -f -f stprof stprof.o symtab.h
  rm -f -rf .tmp_versions
-> Building kernel module:
  executing: 'cd ./usr/src/nv; make module SYSSRC=/lib/modules/2.6.13/source S
  YSOUT=/lib/modules/2.6.13/build'...
 
  NVIDIA: calling KBUILD...
  make CC=cc KBUILD_OUTPUT=/lib/modules/2.6.13/build KBUILD_VERBOSE=1 -C /lib/
  modules/2.6.13/source SUBDIRS=/tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1
  /usr/src/nv modules
  make -C /lib/modules/2.6.13/build            \
  KBUILD_SRC=/usr/src/linux-2.6.13          KBUILD_VERBOSE=1  \
  KBUILD_CHECK= KBUILD_EXTMOD="/tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/
  usr/src/nv"  \
          -f /usr/src/linux-2.6.13/Makefile modules
  mkdir -p /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src/nv/.tmp_vers
  ions
  make -f /usr/src/linux-2.6.13/scripts/Makefile.build obj=/tmp/selfgz2877/NVI
  DIA-Linux-x86-1.0-8774-pkg1/usr/src/nv
  echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > /tmp/selfgz2877/NVI
  DIA-Linux-x86-1.0-8774-pkg1/usr/src/nv/nv_compiler.h
    cc -Wp,-MD,/tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src/nv/.nv.o
  .d  -nostdinc -isystem /usr/lib/gcc-lib/i486-slackware-linux/3.3.6/include -
  D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.13/include  -I/tmp/sel
  fgz2877/NVIDIA-Linux-x86-1.0-8774-pkg
  1/usr/src/nv -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -
  fno-common -ffreesta  mach-default -Iinclude/asm-i386/mach-default  -I/tmp/selfgz2877/NVIDIA-Linux
  -x86-1.0-8774-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wform
  at -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O
  -fno-common -MD -Wsign-compare -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAM
  ES -D__KERNEL__ -DMODULE -DNTRM -DNVRM -DDYNAMIC_SLI -DNV_MAJOR_VERSION=1 -D
  NV_MINOR_VERSION=0 -DNV_PATCHLEVEL=8774 -UDEBUG -U_DEBUG -DNDEBUG -DNV_SIGNA
  L_STRUCT_RLIM -DNV_MULTIPLE_BRIDGE_AGPGART_PRESENT -DNV_PCI_GET_CLASS_PRESEN
  T -DNV_SYSCTL_MAX_MAP_COUNT_PRESENT -DNV_PM_MESSAGE_T_PRESENT -DNV_PCI_CHOOS
  E_STATE_PRESENT -DNV_REMAP_PFN_RANGE_PRESENT -DNV_CHANGE_PAGE_ATTR_PRESENT -
  DNV_VMAP_4_PRESENT -DMODULE -DKBUILD_BASENAME=nv -DKBUILD_MODNAME=nvidia -c
  -o /tmp/selfgz2877/NVIDIA-Linux-x86
  -1.0-8774-pkg1/usr/src/nv/nv.o /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg
  1/usr/src/nv/nv.c
  In file included from include/linux/bitops.h:77,
                    from include/linux/kernel.h:15,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv-linux.h:50,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv.c:14:
  include/asm/bitops.h: In function `find_first_bit':
  include/asm/bitops.h:339: warning: comparison between signed and unsigned
 In file included from include/linux/list.h:7,
                    from include/linux/wait.h:23,
                    from include/asm/semaphore.h:41,
                    from include/linux/sched.h:20,
                    from include/linux/module.h:10,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv-linux.h:51,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv.c:14:
  include/linux/prefetch.h: In function `prefetch_range':
  include/linux/prefetch.h:62: warning: pointer of type `void *' used in arith
  metic
  In file included from include/linux/dmapool.h:14,
                    from include/linux/pci.h:870,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv-linux.h:76,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv.c:14:
  include/asm/io.h: In function `check_signature':
  include/asm/io.h:253: warning: wrong type argument to increment
    cc -Wp,-MD,/tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src/nv/.nv-v
  m.o.d  -nostdinc -isystem /usr/lib/gcc-lib/i486-slackware-linux/3.3.6/includ
  e -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.13/include  -I/tmp/
  selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src/nv -Wall -Wstrict-prototyp
  es -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -O2 -fomit
  -frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2 -march=i686 -
  I/usr/src/linux-2.6.13/include/asm-i386/mach-default -Iinclude/asm-i386/mach
  -default  -I/tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1
  /usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscrip
  ts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -fno-common -MD -
  Wsign-compare -Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -
  DMODULE -DNTRM -DNVRM -DDYNAMIC_SLI -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=
  0 -DNV_PATCHLEVEL=8774 -UDEBUG -U_DEBUG -DNDEBUG -DNV_SIGNAL_STRUCT_RLIM -DN
  V_MULTIPLE_BRIDGE_AGPGART_PRESENT -DNV_PCI_GET_CLASS_PRESENT -DNV_SYSCTL_MAX
  _MAP_COUNT_PRESENT -DNV_PM_MESSAGE_T_PRESENT -DNV_PCI_CHOOSE_STATE_PRESENT -
  DNV_REMAP_PFN_RANGE_PRESENT -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_VMAP_4_PRESEN
  T -DMODULE -DKBUILD_BASENAME=nv_vm -DKBUILD_MODNAME=nvidia -c -o /tmp/selfgz
  2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src/nv/nv-vm.o /tmp/selfgz2877/NVIDI
  A-Linux-x86-1.0-8774-pkg1/usr/src/nv/nv-vm.c
  In file included from include/linux/bitops.h:77,
                    from include/linux/kernel.h:15,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv-linux.h:50,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv-vm.c:14:
  include/asm/bitops.h: In function `find_first_bit':
  include/asm/bitops.h:339: warning: comparison between signed and unsigned
  In file included from include/linux/list.h:7,
                    from include/linux/wait.h:23,
                    from include/asm/semaphore.h:41,
                    from include/linux/sched.h:20,
                    from include/linux/module.h:10,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv-linux.h:51,
                    from /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src
  /nv/nv-vm.c:14:
  include/linux/prefetch.h: In function `prefetch_range':
  include/linux/prefetch.h:62: warning: pointer of type `void *' used in arithnding -O2 -fomit-frame-pointer -pipe -msoft-float -mpref
  erred-stack-boundary=2 -march=i686 -I/usr/src/linux-2.6.13/include/asm-i386/
.......
    ld -m elf_i386 -m elf_i386 -r -o /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774
  -pkg1/usr/src/nv/nvidia.ko /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/us
  r/src/nv/nvidia.o /tmp/selfgz2877/NVIDIA-Linux-x86-1.0-8774-pkg1/usr/src/nv/
  nvidia.mod.o
  NVIDIA: left KBUILD.
-> done.
-> Kernel module compilation complete.
ERROR: Unable to load the kernel module 'nvidia.ko'.  This happens most
      frequently when this kernel module was built against the wrong or
      improperly configured kernel sources, with a version of gcc that differs
      from the one used to build the target kernel, or if a driver such as
      rivafb/nvidiafb is present and prevents the NVIDIA kernel module from
      obtaining ownership of the NVIDIA graphics device(s).
     
      Please see the log entries 'Kernel module load error' and 'Kernel
      messages' at the end of the file '/var/log/nvidia-installer.log' for
      more information.
-> Kernel module load error: insmod: error inserting './usr/src/nv/nvidia.ko':
  -1 No such device
-> Kernel messages:
  NTFS volume version 3.1.
  eth0: network connection up using port A
  speed:          100
  autonegotiation: yes
  duplex mode:    full
  flowctrl:        symmetric
  irq moderation:  disabled
  scatter-gather:  enabled
  nvidia: module license 'NVIDIA' taints kernel.
  NVRM: The NVIDIA probe routine was not called for 1 device(s).
  NVRM: This can occur when a driver such as rivafb, nvidiafb or
  NVRM: rivatv was loaded and obtained ownership of the NVIDIA
  NVRM: device(s).
  NVRM: Try unloading the rivafb, nvidiafb or rivatv kernel module
  NVRM: (and/or reconfigure your kernel without rivafb/nvidiafb
  NVRM: support), then try loading the NVIDIA kernel module again.
  NVRM: No NVIDIA graphics adapter probed!
  NVRM: The NVIDIA probe routine was not called for 1 device(s).
  NVRM: This can occur when a driver such as rivafb, nvidiafb or
  NVRM: rivatv was loaded and obtained ownership of the NVIDIA
  NVRM: device(s).
  NVRM: Try unloading the rivafb, nvidiafb or rivatv kernel module
  NVRM: (and/or reconfigure your kernel without rivafb/nvidiafb
  NVRM: support), then try loading the NVIDIA kernel module again.
  NVRM: No NVIDIA graphics adapter probed!
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.

Any ideas why it cant load this module?

Thanks

nykey 09-01-2006 05:47 AM

Quote:

-> Kernel module compilation complete.
ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most
frequently when this kernel module was built against the wrong or
improperly configured kernel sources, with a version of gcc that differs
from the one used to build the target kernel, or if a driver such as
rivafb/nvidiafb is present and prevents the NVIDIA kernel module from
obtaining ownership of the NVIDIA graphics device(s).

Please see the log entries 'Kernel module load error' and 'Kernel
messages' at the end of the file '/var/log/nvidia-installer.log' for
more information.
-> Kernel module load error: insmod: error inserting './usr/src/nv/nvidia.ko':
-1 No such device
-> Kernel messages:
NTFS volume version 3.1.
eth0: network connection up using port A
speed: 100
autonegotiation: yes
duplex mode: full
flowctrl: symmetric
irq moderation: disabled
scatter-gather: enabled
nvidia: module license 'NVIDIA' taints kernel.
NVRM: The NVIDIA probe routine was not called for 1 device(s).
NVRM: This can occur when a driver such as rivafb, nvidiafb or
NVRM: rivatv was loaded and obtained ownership of the NVIDIA
NVRM: device(s).
NVRM: Try unloading the rivafb, nvidiafb or rivatv kernel module
NVRM: (and/or reconfigure your kernel without rivafb/nvidiafb
NVRM: support), then try loading the NVIDIA kernel module again.
NVRM: No NVIDIA graphics adapter probed!
NVRM: The NVIDIA probe routine was not called for 1 device(s).
NVRM: This can occur when a driver such as rivafb, nvidiafb or
NVRM: rivatv was loaded and obtained ownership of the NVIDIA
NVRM: device(s).
NVRM: Try unloading the rivafb, nvidiafb or rivatv kernel module
NVRM: (and/or reconfigure your kernel without rivafb/nvidiafb
NVRM: support), then try loading the NVIDIA kernel module again.
NVRM: No NVIDIA graphics adapter probed!
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.
Did you read this part well ? Read it, and try troubleshooting your issue using the above..

Sugarat 09-01-2006 05:55 AM

Yep.. read that part.

There are no modules loaded and I do not have Nvidia/Riva FB support compiled into the kernel

Sugarat 09-01-2006 06:03 AM

Okay.. in the finest traditions of making myself look like a tw@t... I just noticed that the NvidiaFB IS loading, which is strange cause I recompiled the kernel after unselecting it, but its still there.

I've just done a make clean so hopefully this kernel will definitely compile without it.

Sorry to waste peoples time!

Thanks for your help :-)

hussar 09-22-2006 06:43 PM

@Sugarat

So, how did your recompile go? I am having the same problem you had, or so I think, and when I do an "lsmod" I don't see rivafb or nvidiafb loaded. Reviewing dmesg, I see a where NVIDIA is loaded, and then it begins to complain about i2c_add_adapter and i2c_del_adapter being unknow symbols.

I should mention that I am running -current and kernel 2.6.16.14.

willysr 09-22-2006 08:10 PM

you should use the same gcc version that was being used to compile the kernels, so if you have just upgraded your gcc, then i suggest to use the old gcc or recompile your kernel with the current gcc version that are installed on your system.

It works on my Slackware with 2.6.18 loaded :D

hussar 09-23-2006 05:16 AM

I just compiled a new 2.6.18 kernel, and I still have the problem with the nvidia installer complaining about having the rivafb or nvidiafb installed, incorrectly configured kernel, or a gcc mismatch.

In the meantime, I am also getting many, many errors during boot about i2c_core and other i2c_* modules with unknown symbols such as i2c_debug.

davidsrsb 09-23-2006 10:17 AM

I have found that recent nvidia driver versions do not like 2.4 kernels and need the correct 2.6 kernel headers. I get the riva warnings but ignore them without any snags.

hussar 09-24-2006 02:55 AM

I've recompiled 2.6.18 again without the rivafb and nvidiafb driver modules. When I run the nvidia driver install script, these are the error messages I get at the end. This has something to do with my system's current inability to load the i2c modules, and I haven't been able to figure out why they aren't loading.

The error messages:

NVIDIA: left KBUILD.
-> done.
-> Kernel module compilation complete.
ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most
frequently when this kernel module was built against the wrong or
improperly configured kernel sources, with a version of gcc that differs
from the one used to build the target kernel, or if a driver such as
rivafb/nvidiafb is present and prevents the NVIDIA kernel module from
obtaining ownership of the NVIDIA graphics device(s).

Please see the log entries 'Kernel module load error' and 'Kernel
messages' at the end of the file '/var/log/nvidia-installer.log' for
more information.
-> Kernel module load error: insmod: error inserting './usr/src/nv/nvidia.ko':
-1 Unknown symbol in module
-> Kernel messages:
eeprom: Unknown symbol i2c_smbus_write_byte
eeprom: Unknown symbol i2c_smbus_read_byte
eeprom: Unknown symbol i2c_smbus_read_i2c_block_data
eeprom: Unknown symbol i2c_del_driver
eeprom: Unknown symbol i2c_detach_client
eeprom: Unknown symbol i2c_smbus_read_byte_data
eeprom: Unknown symbol i2c_attach_client
i2c_core: Unknown parameter `i2c_debug'
i2c_isa: Unknown symbol i2c_adapter_dev_release
i2c_isa: Unknown symbol i2c_adapter_driver
i2c_isa: Unknown symbol i2c_bus_type
i2c_isa: Unknown symbol i2c_adapter_class
w83627hf: Unknown symbol i2c_isa_add_driver
w83627hf: Unknown symbol i2c_isa_del_driver
w83627hf: Unknown symbol i2c_detach_client
w83627hf: Unknown symbol i2c_attach_client
i2c_core: Unknown parameter `i2c_debug'
i2c_core: Unknown parameter `i2c_debug'
i2c_core: Unknown parameter `i2c_debug'
nvidia: module license 'NVIDIA' taints kernel.
nvidia: Unknown symbol i2c_del_adapter
nvidia: Unknown symbol i2c_add_adapter
i2c_core: Unknown parameter `i2c_debug'
nvidia: Unknown symbol i2c_del_adapter
nvidia: Unknown symbol i2c_add_adapter
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.

Ilgar 09-24-2006 05:53 PM

Do you have i2c support in your kernel?

hussar 09-24-2006 11:06 PM

Yes, and after I saw the bit about "Unknown parameter 'i2c_debug'" I went back and selected the debugging option, recompiled and reinstalled. It had no effect, and I still get the error messages shown in my other posting.

The i2c stuff is compiled as modules. I could compile it into the kernel, but my past experience has been that you're better off with modules for some reason. I guess it might be worth a shot.

gbonvehi 09-24-2006 11:11 PM

Did you try to install 2.6 kernel headers as davidsrsb suggested?

hussar 09-24-2006 11:42 PM

Well, compiling the i2c stuff into the kernel seems to have worked. I was able to compile and install the nvidia driver and now I am back up again with X.

@gbonvehi

Yes, I installed (actually, upgraded) the kernel headers to the latest in -current, which are 2.6.18, IIRC. It didn't have any effect on my ability to load the i2c modules.


All times are GMT -5. The time now is 11:54 AM.