Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-26-11, 05:53 PM   #1
siddly
Registered User
 
Join Date: Jul 2003
Location: West Midlands, UK
Posts: 125
Default Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

I'm using openSUSE 12.1 Milestone 0 which uses gcc 4.6.0.
NVIDIA-Linux-x86_64-270.41.06, .19 and NVIDIA-Linux-x86_64-275.09 module fails to build.
The last successful build was for 270.41.06 under 2.6.39 with gcc-4.6.0.
In the log below it mentions an earlier kernel which was symlinked to /usr/src/linux, changing it to a symlink to 2.6.39-git11 didn't fix it.

slipstream:/usr/src/NVIDIA-Linux-x86_64-270.41.06/kernel # make
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

make: *** [select_makefile] Error 1
slipstream:/usr/src/NVIDIA-Linux-x86_64-270.41.06/kernel # l /usr/src/linux
lrwxrwxrwx 1 root root 27 May 26 13:24 /usr/src/linux -> /usr/src/linux-2.6.39-git11/

# less /var/log/nvidia-installer.log
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Thu May 26 12:40:58 2011
installer version: 270.41.06

PATH:
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin
/X11:/usr/X11R6/bin:/usr/games:/opt/bin:/opt/kde3/bin:/opt/cross/bin:/usr/lib/m
it/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin:/usr/local/mybin:/opt/kde3/bin:/usr/l
ocal/bin:/usr/lib64/jvm/java-1.6.0-sun-1.6.0/jre:/opt/netbeans/bin:/usr/local/s
bin:/usr/sbin:/opt/arm-2009q3/bin:/opt/as4e-ide/plugins/com.atmel.avr.toolchain
s.linux.x86_64_3.0.0.201009140852/os/linux/x86_64/bin/

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
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
run distro scripts : true
no nouveau check : false
run nvidia-xconfig : false
sigwinch work around : true
force tls : (not specified)
force compat32 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)
compat32 install chroot : (not specified)
compat32 install prefix : (not specified)
compat32 install libdir : (not specified)
utility install prefix : (not specified)
utility install libdir : (not specified)
installer prefix : (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)
precompiled kernel interfaces path : (not specified)
precompiled kernel interfaces url : (not specified)
proc mount point : /proc
ui : (not specified)
tmpdir : /tmp
ftp mirror : ftp://download.nvidia.com
RPM file list : (not specified)
selinux chcon type : (not specified)

Using: nvidia-installer ncurses user interface
-> License accepted.
-> Installing NVIDIA driver version 270.41.06.
-> There appears to already be a driver installed on your system (version: 270.
41.06). As part of installing this driver (version: 270.41.06), the existin
g driver will be uninstalled. Are you sure you want to continue? ('no' will
abort installation) (Answer: Yes)
-> Running distribution scripts
executing: '/usr/lib/nvidia/pre-install'...

Kernel image: /boot/vmlinuz-2.6.38-4-desktop
Initrd image: /boot/initrd-2.6.38-4-desktop
WARNING: All config files need .conf: /etc/modprobe.d/uisp_parport, it will
be ignored in a future release.
Root device: /dev/disk/by-id/ata-WDC_WD20EARS-07MVWB0_WD-WCAZA4270277-part2
(/dev/sda2) (mounted on / as ext4)
Resume device: /dev/disk/by-id/ata-WDC_WD20EARS-07MVWB0_WD-WCAZA4270277-part
3 (/dev/sda3)
Kernel Modules: pata_atiixp ata_generic thermal_sys thermal processor fan cr
c16 jbd2 ext4 pata_sl82c105 sata_mv pata_ns87415 pata_rdc sata_sil24 sata_vi
a acard-ahci sata_sx4 pata_acpi pata_cs5530 pata_mpiix pata_piccolo sata_sil
pata_atp867x pata_triflex sata_nv pata_pdc2027x pata_netcell pata_sis sata_s
is pata_artop sata_uli pata_marvell sata_qstor pata_hpt3x2n pata_ninja32 pat
a_sc1200 pata_serverworks pata_hpt3x3 pata_it821x pata_cs5536 sata_inic162x
pata_oldpiix pata_cmd640 pata_it8213 pata_amd sata_promise ahci_platform pat
a_ns87410 pdc_adma pcmcia_core pcmcia pata_pcmcia pata_cypress pata_pdc202xx
_old sata_s
vw pata_sil680 pata_efar pata_cs5520 pata_via pata_hpt366 pata_optidma pata_
jmicron pata_hpt37x pata_radisys pata_cmd64x pata_opti pata_ali pata_rz1000
sata_vsc pata_sch
Features: block usb resume.userspace resume.kernel
Bootsplash: openSUSE (1280x1024)
50332 blocks
-> done.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Kernel source path: '/lib/modules/2.6.39-git11-smp/source'
-> Kernel output path: '/lib/modules/2.6.39-git11-smp/build'
ERROR: If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.
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.

slipstream:/usr/src/NVIDIA-Linux-x86_64-270.41.06/kernel # l /usr/src/linux
lrwxrwxrwx 1 root root 27 May 26 23:54 /usr/src/linux -> /usr/src/linux-2.6.39-git12/
slipstream:/usr/src/NVIDIA-Linux-x86_64-270.41.06/kernel # make
If you are using a Linux 2.4 kernel, please make sure
you either have configured kernel sources matching your
kernel or the correct set of kernel headers installed
on your system.

If you are using a Linux 2.6 kernel, please make sure
you have configured kernel sources matching your kernel
installed on your system. If you specified a separate
output directory using either the "KBUILD_OUTPUT" or
the "O" KBUILD parameter, make sure to specify this
directory with the SYSOUT environment variable or with
the equivalent nvidia-installer command line option.

Depending on where and how the kernel sources (or the
kernel headers) were installed, you may need to specify
their location with the SYSSRC environment variable or
the equivalent nvidia-installer command line option.

*** Unable to determine the target kernel version. ***

make: *** [select_makefile] Error 1
slipstream:/usr/src/NVIDIA-Linux-x86_64-270.41.06/kernel #

Last edited by siddly; 05-26-11 at 05:56 PM. Reason: making an addition
siddly is offline   Reply With Quote
Old 05-26-11, 10:58 PM   #2
gun26
Registered User
 
Join Date: Oct 2004
Posts: 17
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Yup, same problem here. :-(
gun26 is offline   Reply With Quote
Old 05-27-11, 01:43 AM   #3
artem
Registered User
 
Join Date: Jun 2006
Posts: 703
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

daredevils, 2.6.40 kernel is not even RC3 yet.
artem is offline   Reply With Quote
Old 05-27-11, 06:34 AM   #4
siddly
Registered User
 
Join Date: Jul 2003
Location: West Midlands, UK
Posts: 125
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Quote:
Originally Posted by artem View Post
daredevils, 2.6.40 kernel is not even RC3 yet.
There is nothing daredevil about it. You wouldn't want to find your system falling apart because no one tested widely. In any case this is 2.6.39-git, just fixes on top of stable 2.6.39.
Kernel and applications testing is one of the things I do so that I hit problems before you do and I can alert kernel and application developers. That way I have contributed to discovering and fixing many bugs.
Going back some years there was a kernel coding bug that only bit at a certain -rc level and for 2 weeks no one else reported it, then one other guy saw it. The kernel developer reviewed his code and made the change and Linus remarked that since that code was the same for ages it was amazing that I was the first person to hit the problem.
siddly is offline   Reply With Quote
Old 05-27-11, 07:20 AM   #5
gun26
Registered User
 
Join Date: Oct 2004
Posts: 17
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

The annoying thing about this bug is that the error message and log are so uninformative.
gun26 is offline   Reply With Quote
Old 05-27-11, 07:32 AM   #6
mlauss
Registered User
 
Join Date: Aug 2007
Posts: 43
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

you need to edit linux-2.6.git/include/linux/rcupdate.h
and comment out line 822.
mlauss is offline   Reply With Quote
Old 05-27-11, 12:51 PM   #7
zander
NVIDIA Corporation
 
zander's Avatar
 
Join Date: Aug 2002
Posts: 3,740
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Alternatively, you can make this change in the driver's conftest.sh script:
@@ -76,7 +76,7 @@
}

build_cflags() {
- BASE_CFLAGS="-D__KERNEL__ \
+ BASE_CFLAGS="-O2 -D__KERNEL__ \
-DKBUILD_BASENAME=\"#conftest$$\" -DKBUILD_MODNAME=\"#conftest$$\" \
-nostdinc -isystem $ISYSTEM"
zander is offline   Reply With Quote
Old 05-27-11, 10:29 PM   #8
siddly
Registered User
 
Join Date: Jul 2003
Location: West Midlands, UK
Posts: 125
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Thanks, I did the rcupdate.h change and it works.
On the next build I shall change conftest.sh
siddly is offline   Reply With Quote

Old 05-28-11, 07:20 AM   #9
siddly
Registered User
 
Join Date: Jul 2003
Location: West Midlands, UK
Posts: 125
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Quote:
Originally Posted by siddly View Post
Thanks, I did the rcupdate.h change and it works.
On the next build I shall change conftest.sh
The change to conftest.sh also works, kernel 2.6.39-git15.
siddly is offline   Reply With Quote
Old 05-28-11, 09:19 AM   #10
gun26
Registered User
 
Join Date: Oct 2004
Posts: 17
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Here's zander's patch ready to apply with the patch program. It works for me. Thanks to zander and everyone.
Attached Files
File Type: txt conftest.sh.patch.txt (322 Bytes, 214 views)
gun26 is offline   Reply With Quote
Old 05-30-11, 05:50 AM   #11
Milos_SD
Registered User
 
Join Date: Jan 2009
Posts: 19
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

There is a problem installing this driver on Linux 3.0-rc1 kernel. I applied this conftest.sh patch.
Here is the installer log: http://pastebin.com/3EuNNCPA
Milos_SD is offline   Reply With Quote
Old 05-30-11, 06:13 AM   #12
thefirstm
Registered User
 
Join Date: Feb 2009
Posts: 226
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Quote:
Originally Posted by Milos_SD View Post
There is a problem installing this driver on Linux 3.0-rc1 kernel. I applied this conftest.sh patch.
Here is the installer log: http://pastebin.com/3EuNNCPA
You should be able to work around that by changing line 40 of nv-linux.h from:

#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 7, 0)

to:

#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
thefirstm is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:20 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.