LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-26-2008, 05:16 PM   #1
henkees
Member
 
Registered: Feb 2008
Location: Netherlands, Zeeland
Distribution: Slackware64 current multilib, Gentoo
Posts: 43

Rep: Reputation: 18
Question nvidia driver won't compile


Hello,

I have an Intell dual core system with nvidia geforce 7500 LE videocard and installed slack 12.2
I could install the NVIDIA-Linux-x86-177.82-pkg1.run on the huge-smp kernel without problems. X is working well.

I compiled the kernel several times and every time when i try to reinstall this driver I get the error:

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.


I even tried to compile the kernel with the config file for the huge-smp kernel (copied /boot/config-huge-smp-2.6.27.7-smp to /usr/src/linux/.config) and checked everything with nvidia...
After compiling and installation of the kernel and reboot I can't install the nvidia driver, I get the same error message.

I also tried it with the nvidia-driver and nvidia-kernel SlackBuild files but I get everytime the same error (also after first uninstall the module!)

On slack 12.0 I could recompile the kernel without any problems with reinstalling the nvidia driver (without uninstalling it first!), but with this version (12.2) I can now only use the huge-smp kernel. The huge-smp kernel is the only one that will compile the nvidia driver.

Am I missing something crucial? I don't understand it anymore.
I work quite a long time with several Linux systems, and compiling a kernel is not so difficult for me, I did this many many times.
Can someone help me? Thanks in advance!

Last edited by henkees; 12-26-2008 at 05:18 PM.
 
Old 12-26-2008, 06:52 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,338

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
In order to compile a module into your kernel you need to have either the kernel source or the kernel headers available. The kernel source or headers must be the same version as your kernel.

Find out what kernel version you are using with this command:

uname -r

Quote:

The huge-smp kernel is the only one that will compile the nvidia driver.
That means that you have either the kernel source or the kernel headers for the huge-smp kernel installed. If that is not the kernel named by the uname command then you are compiling against the wrong kernel source.

You can find out what kernel headers you have installed by looking in /usr/share/doc/linux-kernel-headers. You can find out what kernel source you have installed by looking in /usr/src/kernel.

If you do not have a correct match between your kernel source or headers and your kernel then I recommend that you use your package manager to install the correct kernel headers.

----------------------
Steve Stites
 
Old 12-26-2008, 06:55 PM   #3
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current
Posts: 465

Rep: Reputation: 53
Check out this post
I haven't tried it yet, but I experienced the same problem earlier. I take you know how to use the patch, but post here if you don't.

Edit: I heard you don't need the patch if you run the beta drivers 180.18.. maybe try them too.

Edit #2: Confirmed. 2.6.28 + NVIDIA-Linux-x86-177.82-pkg1.run compile fine for me applying the 'patched patch'

Last edited by MannyNix; 12-26-2008 at 08:13 PM.
 
Old 12-26-2008, 08:45 PM   #4
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
compiling nvidia driver for custom built kernel works fine on my machine.
Quote:
Originally Posted by henkees View Post
Am I missing something crucial? I don't understand it anymore.
I work quite a long time with several Linux systems, and compiling a kernel is not so difficult for me, I did this many many times.
Can someone help me? Thanks in advance!
To install nvidia driver, you need
1) kernel sources. The should match the version of kernel you are using.
2) /usr/src/linux should be a symlink pointing to kernel sources, or sources should be in /usr/src/linux directory
3) they should be configured with config you are currently using.

Last edited by ErV; 12-26-2008 at 08:47 PM.
 
Old 12-26-2008, 09:55 PM   #5
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by jailbait View Post
In order to compile a module into your kernel you need to have either the kernel source or the kernel headers available. The kernel source or headers must be the same version as your kernel.

Find out what kernel version you are using with this command:

uname -r



That means that you have either the kernel source or the kernel headers for the huge-smp kernel installed. If that is not the kernel named by the uname command then you are compiling against the wrong kernel source.

You can find out what kernel headers you have installed by looking in /usr/share/doc/linux-kernel-headers. You can find out what kernel source you have installed by looking in /usr/src/kernel.

If you do not have a correct match between your kernel source or headers and your kernel then I recommend that you use your package manager to install the correct kernel headers.

----------------------
Steve Stites
Right about source, wrong about headers. Headers should match the kernel version used to compile glibc, ie. they should not be changed when you change your kernel. And on a Slack system the kernel source is in /usr/src.

Brian
 
Old 12-27-2008, 12:34 AM   #6
spaceballs
Member
 
Registered: Jan 2005
Location: Dallas, TX
Distribution: Slackware-current
Posts: 248

Rep: Reputation: 30
Just ran into this issue and found this post. Can someone remind me how to patch the nvidia driver? I have this written down somewhere...
 
Old 12-27-2008, 12:42 AM   #7
spaceballs
Member
 
Registered: Jan 2005
Location: Dallas, TX
Distribution: Slackware-current
Posts: 248

Rep: Reputation: 30
Disregard.

Code:
# sh NVIDIA-Linux-x86-177.82-pkg1.run --apply-patch patch.txt
 
Old 12-27-2008, 12:57 AM   #8
MannyNix
Member
 
Registered: Dec 2005
Location: ~
Distribution: Slackware -current
Posts: 465

Rep: Reputation: 53
First you need to 'extract' NVIDIA-Linux-x86-177.82-pkg1.run

For official info read: /usr/share/doc/NVIDIA_GLX-1.0/README.txt if you have it installed.
Or at Nvidia Website
Code:
NVIDIA-INSTALLER
Q. How do I extract the contents of the '.run' without actually installing the
   driver?
A. Run the installer as follows:
   
       # sh NVIDIA-Linux-x86-177.82-pkg1.run --extract-only
   
   This will create the directory NVIDIA-Linux-x86-177.82-pkg1, containing the
   uncompressed contents of the '.run' file.
Get the patch for 177.82 (There's another for 177.80, read my post above)

Rename the 'diff.txt to patch'
Code:
mv NVIDIA_kernel-177.82.diff.txt NVIDIA_kernel-177.82.patch
cp the patch to the extracted dir: NVIDIA-Linux-x86-177.82-pkg1/usr/src/

cd to NVIDIA-Linux-x86-177.82-pkg1/usr/src/nv/

As root patch it: patch -i ../NVIDIA_kernel-177.82.patch

Then, as the readme says in chapter 12
run nvidia-installer with the -n command line option:
./nvidia-installer -n
(nvidia-installer is located in: NVIDIA-Linux-x86-177.82-pkg1 dir)

Hope I didn't miss anything

Edit:
Quote:
Originally Posted by spaceballs View Post
Disregard.

Code:
# sh NVIDIA-Linux-x86-177.82-pkg1.run --apply-patch patch.txt
LOL

Last edited by MannyNix; 12-27-2008 at 12:59 AM.
 
Old 12-27-2008, 06:52 AM   #9
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,374

Rep: Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754Reputation: 2754
One other possible problem is that if you compile a kernel and then run 'make clean", you will remove the /usr/src/linux/kernel/bounds.s file. It seems that the nVidia installer needs this file. This file can be regenerated by running 'make vmlinux' to build the bare kernel.
 
Old 12-27-2008, 07:26 AM   #10
henkees
Member
 
Registered: Feb 2008
Location: Netherlands, Zeeland
Distribution: Slackware64 current multilib, Gentoo
Posts: 43

Original Poster
Rep: Reputation: 18
Thanks everone for the quick answers!
Of course I have the sources and headers, else I could not compile the kernel...
I will try out the patch and the other suggestions, and will let you know if it works.
 
Old 12-27-2008, 08:10 AM   #11
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
Somehow the 177.xx driver does not compile on 2.6.27.x under Slack. You can try the beta driver (ftp://download.nvidia.com/XFree86/Li...80.18-pkg1.run). It also works wonders for KDE4 if you plan on using it.

Last edited by tux_dude; 12-27-2008 at 08:12 AM.
 
Old 12-27-2008, 09:27 AM   #12
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by wnt2b_slackmaster View Post
Somehow the 177.xx driver does not compile on 2.6.27.x under Slack.
Incorrect.
I have 177.82 drivers working on 2.6.27.7 kernel. The kernel is custom-built, and driver compiled fine (without any additional steps) for both custom-built and stock kernel. If you can't do it, you are doing something wrong.

Quote:
Originally Posted by wnt2b_slackmaster View Post
You can try the beta driver (ftp://download.nvidia.com/XFree86/Li...80.18-pkg1.run). It also works wonders for KDE4 if you plan on using it.
You are talking about 177.xx and giving link to 180.xx drivers. And why would anyone beta drivers on slackware linux is beyound me.

Last edited by ErV; 12-27-2008 at 09:35 AM.
 
Old 12-27-2008, 09:50 AM   #13
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Of course the easiest way would be to go to slackbuilds.org (http://slackbuilds.org/result/?search=nvidia&sv=12.2) and use the provided SlackBuilds to compile. They have the current as well as a number of legacy versions of nvidia drivers.

Brian
 
Old 12-27-2008, 09:57 AM   #14
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 277

Rep: Reputation: 41
I have been using 180.xx on slackware for months now without issue. My first problem was with kde4 poor performance with the 177 driver. Second was the inability to compile 177.xx (cannot recall the specific version) on slack generic 2.6.24.3. Since then I stuck with the beta tree.

As for the link, 177.xx are Nvidia stable releases, 180.xx are beta. Since I am suggesting the beta, I think it would be courteous to provide a link.
 
Old 12-27-2008, 12:06 PM   #15
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Hi
Quote:
Originally Posted by wnt2b_slackmaster View Post
I have been using 180.xx on slackware for months now without issue. My first problem was with kde4 poor performance with the 177 driver. Second was the inability to compile 177.xx (cannot recall the specific version) on slack generic 2.6.24.3. Since then I stuck with the beta tree.

As for the link, 177.xx are Nvidia stable releases, 180.xx are beta. Since I am suggesting the beta, I think it would be courteous to provide a link.
The main problem is that you said "Somehow the 177.xx driver does not compile on 2.6.27.x under Slack.", and to my knowledge it is not true. That is all.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get NVidia driver to compile SlowCoder Linux - General 4 11-12-2008 08:52 PM
Cant compile nvidia driver Sugarat Slackware 12 09-24-2006 11:42 PM
Can't compile Nvidia driver for Mandrake 10.1 Chudilo Linux - Hardware 2 12-14-2004 11:35 PM
Is it possible to compile kernel with nvidia driver? subaruwrx Linux - Newbie 2 10-04-2004 06:18 AM
Nvidia driver compile errors acidream Linux - General 8 02-19-2003 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration