LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 05-17-2013, 01:42 PM   #1
McZ
Member
 
Registered: Aug 2012
Posts: 46

Rep: Reputation: Disabled
[LFS-7.2] Fail to build Nvidia drivers


I am running LFS-7.2 on my sony vaio laptop. this far I have only used the built in GPU in my CPU, but I would like to test a bit of gaming with wine so I need my nvidia GPU to work.

I downloaded latest nvidia driver, but it complains that I don't have /lib/modules/3.7.1/build/include/linux/version.h

I have it in my older 3.5.2 kernel but that kernel didn't work any good with the internal gpu in my core i5 so I upgraded to 3.7.1

How can I get the version.h? I have extracted kernel src into /usr/src and built the kernel.
 
Old 05-17-2013, 02:15 PM   #2
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Well that would make sense... You changed your kernel without changing the linux headers (usually you shouldn't without a rebuild).

What you can try is to symlink /lib/modules/3.5.2 to /lib/modules/3.7.1

This should work if nothing in the kernel has changed dramatically, I think it would be safer to rebuild LFS but this might work with mixed results.

Again, this is dirty hack that cause system instability as well as miss up anything you build that requires kernel headers. USE AT YOUR OWN RISK!

EDIT: Disregard this, drunna is correct.

Last edited by /dev/random; 05-17-2013 at 02:56 PM.
 
Old 05-17-2013, 02:52 PM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
The /lib/modules/X.Y.Z directory is created and (partially) filled when compiling the kernel (this step: make modules_install). This is not about the headers in /usr/include.

How did you upgrade from kernel 3.5.2 to 3.7.1? Did you follow the procedure in the book (parts of chapter 8.3)?

Do you know about this document: NVIDIA Accelerated Linux Graphics Driver README and Installation Guide?

BTW: Maybe this blog article might help with your kernel: LFS: Building a kernel
 
Old 05-20-2013, 06:20 AM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
I have had this trouble a number of times with the nvidia drivers, sometimes its just a case of grabbing the newest driver, this time I had to manually copy the version file and so on like so:
Code:
chown -R 0:0 .
	cp -r . $PKGTMP/$pkgname/usr/src/linux-3.8.0
	cp  $PKGTMP/$pkgname/usr/src/linux-3.8.0/usr/include/linux/version.h $PKGTMP/$pkgname/usr/src/linux-3.8.0/include/linux
	ln -sv ../../../usr/src/linux-3.8.0 $PKGTMP/$pkgname/lib/modules/3.8.0/build
	ln -sv ../../../usr/src/linux-3.8.0 $PKGTMP/$pkgname/lib/modules/3.8.0/source
Ignore the $PKGTMP/$pkgname bt as I use a package manager.
It seems that every nvidia driver install needs a bit of tweaking, oh the joys of LFS!

There are also some advanced features to the installer that allows you to set various directory's have a look at the help
 
Old 05-22-2013, 07:15 AM   #5
McZ
Member
 
Registered: Aug 2012
Posts: 46

Original Poster
Rep: Reputation: Disabled
Thanks for all answers. I found a solution from som Redhat forum I think it was. Anyway, the version.h is in the linux kernel src tree I just made a symlink to the place the driver is looking for it.

That solved the compiling problem. But then I found that I need to use "Bumblebee" because my laptop is running Nvidia optimus and Nvidias driver does not support that yet. So I stopped trying to get it work, rebooted Windows and played some Diablo 3

Anyway, I have LFS-7.3 ready in my Auto LFS repo. So I will rebuild LFS-7.3 before I get my hands dirty with Bumblebee and nvidia optimus, unless they release I driver that works before
 
  


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
NVidia drivers fail to install on Slackware 12.1 Tail Kinker Linux - Hardware 3 08-08-2008 05:34 AM
nVidia Drivers fail on Slackware 12 and Xorg 1.4 jroggow Slackware 2 11-10-2007 12:43 PM
Nvidia Drivers fail after install of transcode wabbalee Linux - Hardware 15 12-13-2006 07:52 AM
UNinstalling proprietry mandriva nVidia drivers and installing new nVidia drivers deathman Linux - Hardware 3 11-18-2006 05:10 AM
Mandrake 10.0/AMD 64/Nvidia drivers fail TravisOSF Mandriva 6 05-21-2004 12:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:55 AM.

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