LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 928|回复: 13

NVIDIA出品的驱动无法编译

[复制链接]
发表于 2008-7-3 13:20:33 | 显示全部楼层 |阅读模式
最新的173.*没问题,以前的比如100.*和169.*都无法编译。
具体症状:
提示一过,开始编译内核模块,编译进度条到100%之后,提示:
ERROR: Unable to build the NVIDIA kernel module.

另外,在gcc版本为4.3.1的时候还提示找不到kernel的源代码,降级到4.3.0就没这个问题了。


错误的日志如下:(主要错误提示在后面几行)
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Thu Jul  3 12:59:15 2008

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
  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: No)
-> No precompiled kernel interface was found to match your kernel; this means
   that the installer will need to compile a new kernel interface.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Kernel source path: '/lib/modules/2.6.25-ARCH/build'
-> Kernel output path: '/lib/modules/2.6.25-ARCH/build'
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Performing Xen check.
-> Cleaning kernel module build directory.
   executing: 'cd ./usr/src/nv; make clean'...
-> Building kernel module:
   executing: 'cd ./usr/src/nv; make module SYSSRC=/lib/modules/2.6.25-ARCH/bui
   ld SYSOUT=/lib/modules/2.6.25-ARCH/build'...
   NVIDIA: calling KBUILD...
   make CC=cc  KBUILD_VERBOSE=1 -C /lib/modules/2.6.25-ARCH/build SUBDIRS=/tmp/
   selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv modules
   test -e include/linux/autoconf.h -a -e include/config/auto.conf || (                \
           echo;                                                                \
           echo "  ERROR: Kernel configuration is invalid.";                \
           echo "         include/linux/autoconf.h or include/config/auto.conf are mis
   sing.";        \
           echo "         Run 'make oldconfig && make prepare' on kernel src to fix it
   .";        \
           echo;                                                                \
           /bin/false)
   mkdir -p /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/.tmp_versio
   ns ; rm -f /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/.tmp_vers
   ions/*
   make -f scripts/Makefile.build obj=/tmp/selfgz2893/NVIDIA-Linux-x86-169.12-p
   kg1/usr/src/nv
     cc -Wp,-MD,/tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/.nv.o.d
    -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include -D__KERNEL_
   _ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-protot
   ypes -Wno-trigraphs -fno-strict-aliasing -fn
   o-common -Werror-implicit-function-declaration -O2  -fno-stack-protector -m3
   2 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2
   -march=i686 -mtune=generic -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_
   SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-
   sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fomit-fram
   e-pointer -Wdeclaration-after-statement -Wno-pointer-sign   -I/tmp/selfgz289
   3/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Ws
   witch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multicha
   r -Werror -MD   -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODU
   LE -DNVRM -DNV_VERSION_STRING=\"169.12\" -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE
   -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nv)"  -D"KBUILD_MODNAME=K
   BUILD_STR(nvidia)" -c -o /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/sr
   c/nv/nv.o /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv.c
   In file included from include/linux/list.h:8,
                    from include/linux/preempt.h:11,
                    from include/linux/spinlock.h:49,
                    from include/linux/seqlock.h:29,
                    from include/linux/time.h:8,
                    from include/linux/timex.h:57,
                    from include/linux/sched.h:54,
                    from include/linux/utsname.h:35,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv-linux.h:19,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv.c:14:
   include/linux/prefetch.h: In function ‘prefetch_range’:
   include/linux/prefetch.h:57: warning: pointer of type ‘void *’ used in a
   rithmetic
   In file included from include/asm/dma-mapping_32.h:5,
                    from include/asm/dma-mapping.h:2,
                    from include/linux/dma-mapping.h:52,
                    from include/asm-generic/pci-dma-compat.h:7,
                    from include/asm/pci.h:90,
                    from include/linux/pci.h:945,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv-linux.h:86,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv.c:14:
   include/linux/scatterlist.h: In function ‘sg_virt’:
   include/linux/scatterlist.h:199: warning: pointer of type ‘void *’ used
   in arithmetic
   In file included from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv-linux.h:109,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv.c:14:
   include/linux/highmem.h: In function ‘zero_user_segments’:
   include/linux/highmem.h:134: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:134: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:134: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:134: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:137: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:137: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:137: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:137: warning: pointer of type ‘void *’ used in a
   rithmetic
     cc -Wp,-MD,/tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/.nv-vm.
   o.d  -nostdinc -isystem /usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include -D__KER
   NEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-pr
   ototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-fu
   nction-declaration -O2  -fno-stack-protector -m32 -msoft-float -mregparm=3 -
   freg-struct-return -mpreferred-stack-boundary=2  -march=i686 -mtune=generic
   -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-s
   ign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno
   -3dnow -Iinclude/asm-x86/mach-default -fomit-frame-pointer -Wdeclaration-aft
   er-statement -Wno-pointer-sign   -I/tmp/selfgz2893/NVIDIA-Linux-x86-169.12-p
   kg1/usr/src/nv -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -W
   char-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -MD   -
   Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VE
   RSION_STRING=\"169.12\" -UDEBUG -U_DEBUG -DNDEBUG  -DMODULE -D"KBUILD_STR(s)
   =#s" -D"KBUILD_BASENAME=KBUILD_STR(nv_vm)"  -D"KBUILD_MODNAME=KBUILD_STR(nvi
   dia)" -c -o /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv-vm.o
   /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv-vm.c
   In file included from include/linux/list.h:8,
                    from include/linux/preempt.h:11,
                    from include/linux/spinlock.h:49,
                    from include/linux/seqlock.h:29,
                    from include/linux/time.h:8,
                    from include/linux/timex.h:57,
                    from include/linux/sched.h:54,
                    from include/linux/utsname.h:35,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv-linux.h:19,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv-vm.c:14:
   include/linux/prefetch.h: In function ‘prefetch_range’:
   include/linux/prefetch.h:57: warning: pointer of type ‘void *’ used in a
   rithmetic
   In file included from include/asm/dma-mapping_32.h:5,
                    from include/asm/dma-mapping.h:2,
                    from include/linux/dma-mapping.h:52,
                    from include/asm-generic/pci-dma-compat.h:7,
                    from include/asm/pci.h:90,
                    from include/linux/pci.h:945,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv-linux.h:86,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv-vm.c:14:
   include/linux/scatterlist.h: In function ‘sg_virt’:
   include/linux/scatterlist.h:199: warning: pointer of type ‘void *’ used
   in arithmetic
   In file included from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv-linux.h:109,
                    from /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v/nv-vm.c:14:
   include/linux/highmem.h: In function ‘zero_user_segments’:
   include/linux/highmem.h:134: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:134: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:134: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:134: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:137: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:137: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:137: warning: pointer of type ‘void *’ used in a
   rithmetic
   include/linux/highmem.h:137: warning: pointer of type ‘void *’ used in a
   rithmetic
   /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv-vm.c: In function
   ‘nv_set_page_attrib_uncached’:
   /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv-vm.c:64: warning:
   ‘change_page_attr’ is deprecated (declared at include/asm/cacheflush.h:2
   7)
   /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv-vm.c: In function
   ‘nv_set_page_attrib_cached’:
   /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv-vm.c:79: warning:
   ‘change_page_attr’ is deprecated (declared at include/asm/cacheflush.h:2
   7)
   /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv-vm.c: In function
   ‘nv_flush_caches’:
   /tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv-vm.c:364: error:
   implicit declaration of function ‘global_flush_tlb’
   make[3]: *** [/tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/nv/nv-vm.
   o] Error 1
   make[2]: *** [_module_/tmp/selfgz2893/NVIDIA-Linux-x86-169.12-pkg1/usr/src/n
   v] 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.
发表于 2008-7-3 13:37:06 | 显示全部楼层
似乎。。。好像。。。我看不出来毛病。。或许换一个gcc真行。。。
回复 支持 反对

使用道具 举报

发表于 2008-7-3 21:45:41 | 显示全部楼层
第一个问题皆因 100.x 及 169.x 都是不兼容 2.6.25.x 内核的,要最新的 173.x 才行
回复 支持 反对

使用道具 举报

发表于 2008-7-3 22:09:30 | 显示全部楼层
这样的标题误导别人啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-7-4 14:32:38 | 显示全部楼层
Post by wd_afei;1870547
似乎。。。好像。。。我看不出来毛病。。或许换一个gcc真行。。。
我也希望如此。
第一个问题皆因 100.x 及 169.x 都是不兼容 2.6.25.x 内核的,要最新的 173.x 才行

这就麻烦了,173的我的NV6500死活3D不流畅
回复 支持 反对

使用道具 举报

发表于 2008-7-4 14:51:54 | 显示全部楼层
等把,等nv开源,否则你只好降级内核或者再等下个版本驱动了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-7-4 16:22:44 | 显示全部楼层
Post by jarryson;1870887
等把,等nv开源,否则你只好降级内核或者再等下个版本驱动了
那我宁愿夏季降级内核了
回复 支持 反对

使用道具 举报

发表于 2008-7-4 16:35:15 | 显示全部楼层
我在opensuse11.0,显卡驱动安装96.43.05,当时这个驱动也是不支持新内核,不知道是不是和你一个问题,我当时是这样解决的:网上下载补丁。用GOOGLE搜索 nvidia_kernel .diff.txt并下载和自己版本对应的补丁,比如我的应该是:Nvidia_kernel-96.43.05-2290218.diff.txt 然后将它放到原安装程序同一目录下。运行:
# sh /path/to/NVIDIA-Linux-x86-96.43.05-pkg1.run –apply-patch NVIDIA_kernel-96.43.05-2290218.diff.txt
这样会生成一个打过补丁的安装文件,运行它安装即可。
# sh NVIDIA-Linux-x86-96.43.05-pkg1-custom.run
成功安装。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-7-4 16:53:58 | 显示全部楼层
Post by turtlerock;1870930
我在opensuse11.0,显卡驱动安装96.43.05,当时这个驱动也是不支持新内核,不知道是不是和你一个问题,我当时是这样解决的:网上下载补丁。用GOOGLE搜索 nvidia_kernel .diff.txt并下载和自己版本对应的补丁,比如我的应该是:Nvidia_kernel-96.43.05-2290218.diff.txt 然后将它放到原安装程序同一目录下。运行:
# sh /path/to/NVIDIA-Linux-x86-96.43.05-pkg1.run –apply-patch NVIDIA_kernel-96.43.05-2290218.diff.txt
这样会生成一个打过补丁的安装文件,运行它安装即可。
# sh NVIDIA-Linux-x86-96.43.05-pkg1-custom.run
成功安装。

谢过,收下了,有空就测试!
回复 支持 反对

使用道具 举报

发表于 2008-7-4 21:56:54 | 显示全部楼层
Post by jarryson;1870887
等把,等nv开源,否则你只好降级内核或者再等下个版本驱动了
等 nv 开源?恐怕今生今世也不一定等得到,Nvidia 前几天才发表声明,重申坚决不开源 :(
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表