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

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-30-11, 06:20 AM   #13
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

I figured that out after posting. I just commented out "else" part of the code.
Milos_SD is offline   Reply With Quote
Old 05-30-11, 11:45 AM   #14
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

Combining the changes in conftest.sh and nv-linux.h in one patch for convenience. It works for me. Thanks thefirstm.
Attached Files
File Type: txt kernel-3.0-rc1.patch.txt (766 Bytes, 347 views)
gun26 is offline   Reply With Quote
Old 05-30-11, 12:42 PM   #15
khetzal
Registered User
 
Join Date: Apr 2006
Posts: 6
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Thanks for the patch, it is working
khetzal is offline   Reply With Quote
Old 05-31-11, 12:46 AM   #16
RUSTY
Registered User
 
Join Date: Dec 2002
Posts: 44
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

how do you apply kernel-3.0-rc1.patch.txt ? need some steps please.

I have ubuntu 10.10 x64 with 3.0-rc1 kernel. Using this command:

sudo sh NVIDIA-Linux-x86_64-270.41.19.run --apply-patch kernel-3.0-rc1.patch.txt

Trying to patch 275.09 x64 or 270.41.19 x64 I get this

patching file conftest.sh
Hunk #1 FAILED at 76.
1 out of 1 hunk FAILED -- saving rejects to file conftest.sh.rej
patching file nv-linux.h
Hunk #1 FAILED at 32.
1 out of 1 hunk FAILED -- saving rejects to file nv-linux.h.rej

p.s.
that's what I get when I try to install normal driver 275.09 x64 or 270.41.19 x64 on kernel 3.0-rc1

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. ***
RUSTY is offline   Reply With Quote
Old 05-31-11, 01:32 AM   #17
weltall
Registered User
 
Join Date: Feb 2007
Posts: 115
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

the patch lacks the subfolder structure so you'll have to patch by hand
extract the package with -x then you can apply the patch there or just go in the single files and do the changes after all it's just adding an -O2 and replacing a 2 and a 7 with a 3 and a 1
weltall is offline   Reply With Quote
Old 05-31-11, 01:55 AM   #18
RUSTY
Registered User
 
Join Date: Dec 2002
Posts: 44
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Quote:
Originally Posted by weltall View Post
the patch lacks the subfolder structure so you'll have to patch by hand
extract the package with -x then you can apply the patch there or just go in the single files and do the changes after all it's just adding an -O2 and replacing a 2 and a 7 with a 3 and a 1
can you give some more details please ? if I extract it to NVIDIA-Linux-x86_64-275.09 then
sudo sh NVIDIA-Linux-x86_64-275.09 --apply-patch patch.txt ?
please give me step by step I'm not a coder
RUSTY is offline   Reply With Quote
Old 05-31-11, 02:06 AM   #19
weltall
Registered User
 
Join Date: Feb 2007
Posts: 115
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

cd to the folder "kernel" then patch -p0 < patch.txt
weltall is offline   Reply With Quote
Old 05-31-11, 02:37 AM   #20
RUSTY
Registered User
 
Join Date: Dec 2002
Posts: 44
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Quote:
Originally Posted by weltall View Post
cd to the folder "kernel" then patch -p0 < patch.txt
thanks alot I just patched it. I'll try it later today I gotta go now. Thanks alot.
RUSTY is offline   Reply With Quote

Old 05-31-11, 09:40 AM   #21
RUSTY
Registered User
 
Join Date: Dec 2002
Posts: 44
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

I just tried to install patched driver with sudo ./nvidia-installer and still get the same message:

"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."
RUSTY is offline   Reply With Quote
Old 05-31-11, 12:40 PM   #22
weltall
Registered User
 
Join Date: Feb 2007
Posts: 115
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

well check by hand the conftest for the O2 that message should be generated in the case that patch wasn't applied (as for the version patch it returned an error while building, in place, if it wasn't applied). at least by doing -K --kernel-name=name it worked here (i build the modules for a newly installed kernel before starting it)
weltall is offline   Reply With Quote
Old 05-31-11, 02:02 PM   #23
Dizzle7677
Registered User
 
Dizzle7677's Avatar
 
Join Date: May 2008
Location: Relativity
Posts: 194
Default Re: Driver fails to compile with gcc 4.6.0 on kernel 2.6.39-git11/-git12

Quote:
Originally Posted by RUSTY View Post
I just tried to install patched driver with sudo ./nvidia-installer and still get the same message:

"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."
Getting the same thing using a patched 275.09 and linux-3.0.0-rc1. Tried adding --kernel-name and --kernel-source-patch also but no luck as of yet.
__________________
Elephants can fly but they have no reason to.
------------------------------------------
Phenom II X3 720 @ 3.5Ghz | Asus M4A785-M | 2 Gig Crucial DDR2 @ 960 Mhz | GeForce GT 440 1024 MB | Linux 3.6.1 / Ubuntu 12.04 / W.I.N.E v1.5.14
Dizzle7677 is offline   Reply With Quote
Old 05-31-11, 07:56 PM   #24
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

Sorry if the patch is giving people problems. I diffed in the kernel directory because the PKGBUILD (a.k.a. build script) for my Arch distro changes to that directory to compile the Nvidia module. It doesn't directly use the Nvidia installer.

For those using the Nvidia installer, here are step by step instructions, assuming both NVIDIA-Linux-x86_64-270.41.19.run (or whatever version you're using - sub in the right name if necessary in the instructions) and kernel-3.0-rc1.patch.txt are in your home directory, and that you use sudo to run the Nvidia installer:
Code:
$ sh .NVIDIA-Linux-x86_64-270.41.19.run --extract-only
$ cd NVIDIA-Linux-x86_64-270.41.19.run/kernel
$ cat ../../kernel-3.0-rc1.patch.txt | patch -p0
$ cd ..
$ sudo ./nvidia-installer
gun26 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 06:54 PM.


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