LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-22-2005, 10:16 AM   #1
penguinlnx
Member
 
Registered: Mar 2005
Location: Ice Station Alert AFB
Distribution: Gentoo
Posts: 166

Rep: Reputation: 30
ERROR compiling nvidia kernel


I tried to emerge the nvidia kernel and got this:

014025 !!! ERROR: media-video/nvidia-kernel-1.0.6629-r1 failed.
014026 !!! Function linux-info_pkg_setup, Line 518, Exitcode 1
014027 !!! Unable to calculate Linux Kernel version

What happened, and what can I do about it?
 
Old 03-23-2005, 03:13 AM   #2
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
Do you have the kernel-sources installed? What can you see in /usr/src/linux-<some number here>?

Some guides to common tasks asked about here.
# Compiling/installing kernel modules
You will need to have installed:
1. The developmental packages (compiler)
2. The kernel-source code that matches your running kernel
3. The module source or install code

Check out your system and look under the hood and see if you installed the stuff you need to do the job. Open an x terminal and type in this sequence of commands to see what kernel we are running and see if you have the kernel source installed:
Code:
[fancy@tinwhistle fancy]$ su -
Password:
[root@tinwhistle root]# uname -r
2.4.20-28.7
I am running kernel version 2.4.20-28.7. Do I have the proper source code?
Code:
[root@tinwhistle root]# cd /usr/src
[root@tinwhistle src]# ls -alc
total 3
drwxr-xr-x    4 root     root          136 Jun 12 14:53 .
drwxr-xr-x   16 root     root          424 Jun  4 12:04 ..
lrwxrwxrwx    1 root     root           14 Jun  4 12:11 linux-2.4 -> linux-2.4.20-28.7
drwxr-xr-x   16 root     root          584 Jun  4 12:11 linux-2.4.20-28.7
drwxr-xr-x    7 root     root          168 Jun  4 12:08 redhat
[root@tinwhistle src]#
I do have the same kernel version source code installed in the directory /usr/src/linux-2.4.20-28.7 and there is a symbolic link named linux-2.4 pointing to it.

If you don't see something similiar to this (but in color), you will need to install the kernel source.

NOTE: I noticed that Red Hat didn't make the symbolic link /usr/src/linux that all of the INSTALL files that I have read mentioned that I need. I may as well make one now to save editing the files in the source code every time I need to compile anything concerning the kernel. So, I'll make that link just now:
Code:
[root@tinwhistle src]# ln -s linux-2.4.20-28.7 linux         
[root@tinwhistle src]# ls -alc
total 3
drwxr-xr-x    4 root     root          160 Jun 12 15:46 .
drwxr-xr-x   16 root     root          424 Jun  4 12:04 ..
lrwxrwxrwx    1 root     root           14 Jun 12 15:46 linux -> linux-2.4.20-28.7
lrwxrwxrwx    1 root     root           14 Jun  4 12:11 linux-2.4 -> linux-2.4.20-28.7
drwxr-xr-x   16 root     root          584 Jun  4 12:11 linux-2.4.20-28.7
drwxr-xr-x    7 root     root          168 Jun  4 12:08 redhat
[root@tinwhistle src]#
Ah, there it is, so that's done.

Next, did I install the compiler?
Code:
[root@tinwhistle src]# gcc -v          
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-113)
[root@tinwhistle src]#
Yes, I have a compiler installed.

If you don't have those two things installed, you have to install them first off your install CD.

If they are installed, download the source and happy compiling. Make sure you carefully read the README and INSTALL files after extracting and before compiling/installing.
 
Old 03-24-2005, 09:20 AM   #3
penguinlnx
Member
 
Registered: Mar 2005
Location: Ice Station Alert AFB
Distribution: Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
Okay, I checked the version of my kernel as per your instructions:
(I opened a commandline, I'm in root)

root # uname -r
2.6.9-vidalinux1 (kernel version 2.6.9?)

root # cd /usr/src
src # ls -alc

drwxr-xr-x 5 root root 4096 Mar 22 11:10 .
drwxr-xr-x 17 root root 4096 Mar 18 17:04 ..
-rw-r--r-- 1 root root 0 Mar 10 11:04 .keep
lrwxr-xr-x 1 root root 22 Mar 22 11:10 linux -> linux-2.4.28-gentoo-r8
drwxr-xr-x 16 root root 4096 Mar 22 11:10 linux-2.4.28-gentoo-r8
drwxr-xr-x 7 root root 4096 Mar 14 13:29 pc
drwxr-xr-x 7 root root 4096 Mar 14 13:29 redhat

(problem 1: versions don't match: I assume there is no point in making a symbolic link)

Normally I compile using Portage which is more or less automated.
How would I manually download the correct 'source code' and place it here?
Where would I get it? It will obviously not be on my original install disk.

------------------------------ question 2: compiler ---------------------------------------
src # gcc -v

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/specs
Configured with: /var/tmp/portage/gcc-3.3.5-r1/work/gcc-3.3.5/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.5 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/info --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/include/g++-v3 --host=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix
Thread model: posix
gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)

(This part looks good I guess: It seems I have a compiler which is a bit newer than your listing.)
 
Old 03-24-2005, 11:30 AM   #4
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
The guide I posted was something I wrote a while back and I haven't bothered to re-write it, but the principles remain the same, the kernel and compiler versions will be different than what I presently am running.

Hmm.. I can't figure out how you run a Gentoo installation with a different kernel not in portage..,,apparently you didn't follow these directions fully.

Did you re-boot after compiling your linux-2.4.28-gentoo-r8 kernel?

Examine /boot/grub/grub.conf and see if you have that configured correctly.

Last edited by fancypiper; 03-24-2005 at 12:41 PM.
 
Old 03-24-2005, 12:25 PM   #5
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
If you want to run the 2.6 kernel, I would suggest doing this:
Code:
emerge sys-kernel/gentoo-dev-sources
Configure and compile that kernel, mount /boot, then
Code:
cp arch/i386/boot/bzImage /boot/kernel-2.6.11-gentoo-r4
cp System.map /boot/System.map-2.6.11-gentoo-r4
cp .config /boot/.config-2.6.11-gentoo-r4
Now edit /boot/grub/grub.conf to reflect the new kernel, reboot, then install the nvidia driver thus:
Code:
ebuild /usr/portage/media-video/nvidia-kernel/nvidia-kernel-1.0.7167-r1.ebuild install
Now,
Code:
echo "nvidia" >> /etc/modules.autoload.d/kernel-2.6
nvidia-kernel-1.0.6629-r1 fails for me as well.

Last edited by fancypiper; 03-24-2005 at 12:44 PM.
 
Old 03-25-2005, 12:26 PM   #6
penguinlnx
Member
 
Registered: Mar 2005
Location: Ice Station Alert AFB
Distribution: Gentoo
Posts: 166

Original Poster
Rep: Reputation: 30
hmmm.... I think the newer kernel got somehow installed when I updated or installed some other package. I don't really have a grip on how these things happen, or what I should want to happen.

I have emerged some games, some packages like the MSN messenger thing, some net stuff like nmap, etc., GIMP, and a half-dozen smaller command-line things and plug-ins.

When I got interested in installing a firewall and beefing up security, I found out about needing to update the kernel to prevent hackers compromising my system. By logic, the most recent kernel should be the best, but now they have told me there is a special 'hardened' kernel you can install, or perhaps it is a 'kernel module', which I assume is a kernel 'add-on' like a plug-in. It has a non-intuitive name like 'something-dev-packages' or whatever. I am a bit jumpy about messing with my kernel,
since right now my system boots fine, although it seems to hang if I try to boot with the DSL internet connection removed...another disturbing effect.

Perhaps you could comment on all this, giving me a bit of background and advice before I do something stupid, like compile the wrong package and lock my machine up dead.

signed, - nervous.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Getting Nvidia 3d driver after compiling kernel using apt-get PeaceTank Linux - Software 2 12-08-2004 06:09 AM
Compiling Rebus Nvidia Kernel 07dcolem Linux - Software 0 11-27-2004 10:25 PM
Compiling NVidia kernel module under SuSE 9.1 ZX_SA Linux - Hardware 0 06-11-2004 10:24 AM
Error while compiling kernel jeffreybluml Linux - Newbie 11 06-10-2004 01:32 PM
Compiling Nvidia Driver on 2.6.0-test11 kernel... TheOneAndOnlySM Linux - General 6 12-20-2003 09:54 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration