I get these errors, and I cannot figure out why. Is there any backwards compatibility issues? >>> Source unpacked. x86 Your kernel was configured to include rivafb support! The rivafb driver conflicts with the NVIDIA driver, please reconfigure your kernel and *disable* rivafb support, then try installing the NVIDIA kernel module again. *** Failed rivafb sanity check. Bailing out! *** Your kernel was configured to include rivafb support as a loadable kernel module. The rivafb driver conflicts with the NVIDIA driver; the NVIDIA kernel module will still be built and installed, but be aware that the NVIDIA driver will not be able to function properly if the rivafb module is loaded! *** Failed rivafb module sanity check, but continuing! *** echo \#define NV_COMPILER \"`gcc -v 2>&1 | tail -n 1`\" > nv_compiler.h gcc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werror -O -fno-common -UDEBUG -U_DEBUG -DNDEBUG -MD -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=6111 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -I. -I//usr/src/linux/include -Wno-cast-qual -Wno-error nv.c In file included from nv.c:14: nv-linux.h:48:31: linux/modversions.h: No such file or directory In file included from //usr/src/linux/include/linux/prefetch.h:13, from //usr/src/linux/include/linux/list.h:6, from //usr/src/linux/include/linux/module.h:12, from nv-linux.h:52, from nv.c:14: //usr/src/linux/include/asm/processor.h:75: error: `CONFIG_NR_CPUS' undeclared here (not in a function) In file included from //usr/src/linux/include/linux/affs_fs_i.h:7, from //usr/src/linux/include/linux/fs.h:313, from //usr/src/linux/include/linux/capability.h:17, from //usr/src/linux/include/linux/binfmts.h:5, from //usr/src/linux/include/linux/sched.h:9, from //usr/src/linux/include/linux/mm.h:4, from //usr/src/linux/include/linux/slab.h:14, from nv-linux.h:61, from nv.c:14: //usr/src/linux/include/linux/time.h: In function `timespec_to_jiffies': //usr/src/linux/include/linux/time.h:37: error: `CONFIG_HZ' undeclared (first use in this function) //usr/src/linux/include/linux/time.h:37: error: (Each undeclared identifier is reported only once //usr/src/linux/include/linux/time.h:37: error: for each function it appears in.) //usr/src/linux/include/linux/time.h: In function `jiffies_to_timespec': //usr/src/linux/include/linux/time.h:47: error: `CONFIG_HZ' undeclared (first use in this function) In file included from //usr/src/linux/include/linux/sched.h:13, from //usr/src/linux/include/linux/mm.h:4, from //usr/src/linux/include/linux/slab.h:14, from nv-linux.h:61, from nv.c:14: //usr/src/linux/include/linux/times.h: In function `jiffies_64_to_clock_t': //usr/src/linux/include/linux/times.h:17: error: `CONFIG_HZ' undeclared (first use in this function) In file included from //usr/src/linux/include/linux/sched.h:14, from //usr/src/linux/include/linux/mm.h:4, from //usr/src/linux/include/linux/slab.h:14, from nv-linux.h:61, from nv.c:14: //usr/src/linux/include/linux/timex.h:78:3: #error You lose. In file included from //usr/src/linux/include/linux/sched.h:23, from //usr/src/linux/include/linux/mm.h:4, from //usr/src/linux/include/linux/slab.h:14, from nv-linux.h:61, from nv.c:14: //usr/src/linux/include/linux/smp.h: At top level: //usr/src/linux/include/linux/smp.h:29: error: conflicting types for 'smp_send_reschedule' //usr/src/linux/include/asm/smp.h:42: error: previous declaration of 'smp_send_reschedule' was here //usr/src/linux/include/linux/smp.h:29: error: conflicting types for 'smp_send_reschedule' //usr/src/linux/include/asm/smp.h:42: error: previous declaration of 'smp_send_reschedule' was here In file included from nv.c:14: nv-linux.h:575:2: warning: #warning "conftest.sh failed, assuming old Linux 2.4 remap_page_range(4)!" nv.c: In function `nv_kern_rc_timer': nv.c:2182: error: `CONFIG_HZ' undeclared (first use in this function) nv.c: In function `nv_start_rc_timer': nv.c:3454: error: `CONFIG_HZ' undeclared (first use in this function) make[1]: *** [nv.o] Error 1 make: *** [module] Error 2 !!! ERROR: media-video/nvidia-kernel-1.0.6111-r1 failed. !!! Function src_compile, Line 94, Exitcode 2 !!! Failed to build module !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: 1.emerge nvidia-kernel 2. 3. Actual Results: compilation fails Expected Results: it should hava compiled Portage 2.0.51_rc1 (default-x86-1.4, gcc-3.4.2, glibc-2.3.4.20040808-r0, 2.4.25-lck1 i686) ================================================================= System uname: 2.4.25-lck1 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.5.3 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux-headers-2.4.22 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=pentium4 -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -mcpu=pentium4 -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="ftp://ftp.gentoo.skynet.be/pub/gentoo/" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X Xaw3d aalib acl acpi adns alsa apache2 apm avi berkdb bindist bitmap-fonts bonobo caps cdr crypt cscope cups curl dedicated dga directfb divx doc dvb dvd dvdr emacs emacs-w3 encode esd ethereal evo faad fam fbcon firebird flac flash foomaticdb freetds gb gd gdbm ggi gif gnome gnutls gphoto2 gpm gstreamer gtk gtk2 gtkhtml imap imlib innodb ipv6 jabber jack java jikes joystick jpeg kerberos ladcca lcms ldap leim libg++ libgda libwww lirc mad maildir matroska mbox mcal memlimit mikmod mmx motif mozilla mpeg msn mule mysql nas ncurses nls oci8 odbc oggvorbis opengl oscar oss pam pda pdflib perl pic plotutils png postgres ppds python quicktime readline ruby samba sasl scanner sdl slang slp socks5 speex spell sqlite sse ssl svga tcltk tcpd tetex theora tiff truetype unicode usb videos wmf wxwindows x86 xface xinerama xml xml2 xmms xosd xprint xv xvid zlib"
>Your kernel was configured to include rivafb support! > >The rivafb driver conflicts with the NVIDIA driver, please >reconfigure your kernel and *disable* rivafb support, then >try installing the NVIDIA kernel module again. > >*** Failed rivafb sanity check. Bailing out! *** I guess the obvious question is, do you not have rivafb support in your kernel? You're looking for CONFIG_FB_RIVA or CONFIG_FB_RIVA_MODULE, if its MODULE techically it should still work build wise but then why did it say you had it compiled into the kernel... Please respond re, rivafb stuff.
OK, I get a very similar output from my compiler, except that I'm using kernel 2.6.8.1 and here is my error message. In this case I'm running: titans $emerge -uD world In file included from include/asm/thread_info.h:16, from include/linux/thread_info.h:21, from include/linux/spinlock.h:12, from include/linux/capability.h:45, from include/linux/sched.h:7, from include/linux/module.h:10, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:14: include/asm/processor.h:67: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function) include/asm/processor.h:67: error: requested alignment is not a constant In file included from include/linux/list.h:7, from include/linux/wait.h:14, from include/asm/semaphore.h:41, from include/linux/sched.h:18, from include/linux/module.h:10, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-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 arithmetic In file included from include/linux/module.h:23, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:14: include/asm/module.h:54:2: #error unknown processor family In file included from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:52, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:14: include/linux/module.h: At top level: include/linux/module.h:202: error: requested alignment is not a constant In file included from include/asm/hardirq.h:6, from include/linux/interrupt.h:12, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:76, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:14: include/linux/irq.h:68: error: requested alignment is not a constant In file included from include/linux/interrupt.h:12, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv-linux.h:76, from /var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.c:14: include/asm/hardirq.h:13: error: requested alignment is not a constant make[4]: *** [/var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv/nv.o] Error 1 make[3]: *** [_module_/var/tmp/portage/nvidia-kernel-1.0.6111-r1/work/NVIDIA-Linux-x86-1.0-6111-pkg1/usr/src/nv] Error 2 make[2]: *** [modules] Error 2 make[1]: *** [module] Error 1 make: *** [module] Error 2 !!! ERROR: media-video/nvidia-kernel-1.0.6111-r1 failed. !!! Function src_compile, Line 94, Exitcode 2 !!! Failed to build module nvidia-kernel is the only package in world that needs updating, but this is the problem I get spitting out. Here is the following titans $emerge --info Portage 2.0.51_rc1 (default-x86-2004.0, gcc-3.4.2, glibc-2.3.4.20040808-r0, 2.6.8 i686) ================================================================= System uname: 2.6.8 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.5.3 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux-headers-2.4.22 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O3 -mtune=pentium4 -march=pentium4 -funroll-loops -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -mtune=pentium4 -march=pentium4 -funroll-loops -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="alsa apm arts avi berkdb bitmap-fonts cdr crypt cups encode foomaticdb gdbm gif gpm gtk2 imlib java jpeg libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xprint xv zlib" Suggestions? Work-arounds? I don't think this is too critical as my current nvidia-kernel module is working wonders. In fact, this is brought to you by XFree with the older version of the nvidia driver, so it's not a very critical bug. Happy hunting! --G
Ok. Yes I have rivafb in my kernel, but I don't think that is the problem for not building as it seems the build error is about some undeclared stuff in the header files from the 2.4.25 kernel. I am well aware of the problems with rivafb (I actually think that this is what making my machine lock up when blanking screen in console mode) I have thought about removing the rivafb from my kernel, but it is a lot of trouble for me upgrading the kernel because of promise proporitary raid, and as I said I think the problem with rivafb is when using it with the nvidia kernel module...not when compiling the nvidia module..that is also what you suggest when you say that I just can remove the module (if it was compiled as modules) Regards Hasse
Another question. Shouldn't nvidia-kernel use the include files from the linux-headers package instead of /usr/src/linux/include ?
Um is the kernel in /usr/src/linux actually built? It has to be built... And definately YES nvidia-kernel must be built against the kernel headers (in /usr/src/linux), as it is a kernel module...
I have found the problem it seems that the 2.4.25 cannot be compiled with the newest gcc in ~x86. It was actually this causing the problems. Switched to gcc 3.3.4 instead of gcc 3.4.2 and it worked :-)
Is this fixed then?
I don't know if you want to spawn a new bug or what, but I still get the error I posted in my earlier comment when attempting to compile against a 2.6.8.1 kernel. I have not tried reverting the gcc version I am using, but reverting does not solve the problem. Hopefully some day the stable version will be the current ~x86 version, so figuring it out would be nice :). Now that I'm done installing Gentoo on my antique Alphaserver I'll start poking around with this problem, although I don't know much of anything about either the kernel source or nvidia source.
It is fixed by swithing to a older compiler. It seems there is compatibily problems with gcc 3.4.2 as nvidia-kernel is not the only ebuild not compiling with it.
I dont have compatibility problems here with the 2.6 kernels, is it only 2.4 kernels that have gcc 3.4.2 problems? Greg honestly yours is a differnt bug to this but anyway, It really does look like there is something wrong with your kernel tree... Perhaps try cleaning it etc.. and rebuilding
OK this was solved, but it didnt really get fixed, works for me here though.