LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-27-2004, 03:32 PM   #1
kermit
Member
 
Registered: Jul 2002
Location: Madrid. Spain
Distribution: considering ubuntu
Posts: 87

Rep: Reputation: 15
kernel source


Hi all,

I need a little bit of help, because I've spent the whole day trying to install nVidia drivers in my debian laptop and I'm about suicide

I just installed sarge, with kernel 2.6.7-1-386 and as i need the sources to compile the nvidia driver, I made an apt-get install kernel-source-2.6.7 to get them.

The thing is that it looks like the installer breaks because the source I downloaded is 2.6.7-4. This is a snippet of the install log file:

[...]
-> Kernel module installation path (Answer:
'/lib/modules/2.6.7-1-386/kernel/drivers/video')
-> Kernel module installation path: /lib/modules/2.6.7-1-386/kernel/drivers/vid
eo
-> No precompiled kernel interface was found to match your kernel; would you li
ke the installer to attempt to download a kernel interface for your kernel f
rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: No)
-> No precompiled kernel interface was found to match your kernel; this means
that the installer will need to compile a new kernel interface.
-> Checking development tools:
-> found `cc` : `/usr/bin/cc`
-> found `make` : `/usr/bin/make`
-> Kernel source path (Answer: '/usr/src/kernel-source-2.6.7/')
-> Kernel source path: '/usr/src/kernel-source-2.6.7/'
-> Performing CC test with CC="cc".
-> gcc-version-check failed:

Could not compile gcc-version-check.c

If you know what you are doing and want to ignore the gcc version check, sel
ect "No" to continue installation. Otherwise, select "Yes" to abort install
ation, set the CC environment variable to the name of the compiler used to c
ompile your kernel, and restart installation. Abort now? (Answer: No)
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 appropriate nvidia-installer command line option.



I went to www.kernel.org but there's only one 2.6.7 file, and I'm pretty sure it'll be 2.6.7-4.

What should I do, then?

I thought about compiling the kernel but I'm kind a and I don't know if I'll be capable, I prefer to make this installation to work and after that get experience to 'tune' my debian by myself.

Now I'm going out to buy a gun...

Thanks in advance guys
 
Old 11-27-2004, 05:05 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
You will need to at least configure your kernel sources to match your system before you will be able to compile the drivers.
Try this:
Code:
cd /usr/src/linux
make cloneconfig
Then repeat the nvidia-installer stage
 
Old 11-28-2004, 09:30 AM   #3
kermit
Member
 
Registered: Jul 2002
Location: Madrid. Spain
Distribution: considering ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Thanks a lot rjlee but I'm sorry, it doesn't work.

the /usr/src/linux folder didn't exist. Try to create it but


make: *** No rule to make target `cloneconfig'. Stop.

so I tried it in the 2.6.7-4 kernel folder:

asterix:/usr/src/kernel-source-2.6.7# make cloneconfig
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:97:23: sys/types.h: No such file or directory
scripts/basic/fixdep.c:98:22: sys/stat.h: No such file or directory
scripts/basic/fixdep.c:99:22: sys/mman.h: No such file or directory
scripts/basic/fixdep.c:100:20: unistd.h: No such file or directory
scripts/basic/fixdep.c:101:19: fcntl.h: No such file or directory
scripts/basic/fixdep.c:102:20: string.h: No such file or directory
scripts/basic/fixdep.c:103:20: stdlib.h: No such file or directory
scripts/basic/fixdep.c:104:19: stdio.h: No such file or directory
In file included from /usr/lib/gcc-lib/i486-linux/3.3.4/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-linux/3.3.4/include/limits.h:11,
from scripts/basic/fixdep.c:105:
/usr/lib/gcc-lib/i486-linux/3.3.4/include/limits.h:122:75: limits.h: No such file or directory
scripts/basic/fixdep.c:106:19: ctype.h: No such file or directory
scripts/basic/fixdep.c:107:24: netinet/in.h: No such file or directory
scripts/basic/fixdep.c: In function `usage':
scripts/basic/fixdep.c:121: warning: implicit declaration of function `fprintf'
scripts/basic/fixdep.c:121: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:121: error: (Each undeclared identifier is reported only once
scripts/basic/fixdep.c:121: error: for each function it appears in.)
scripts/basic/fixdep.c:122: warning: implicit declaration of function `exit'
scripts/basic/fixdep.c: In function `print_cmdline':
scripts/basic/fixdep.c:127: warning: implicit declaration of function `printf'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:130: error: `NULL' undeclared here (not in a function)
scripts/basic/fixdep.c: In function `grow_config':
scripts/basic/fixdep.c:143: warning: implicit declaration of function `realloc'
scripts/basic/fixdep.c:143: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:144: error: `NULL' undeclared (first use in this function)
scripts/basic/fixdep.c:145: warning: implicit declaration of function `perror'
scripts/basic/fixdep.c: In function `is_defined_config':
scripts/basic/fixdep.c:161: warning: implicit declaration of function `memcmp'
scripts/basic/fixdep.c: In function `define_config':
scripts/basic/fixdep.c:174: warning: implicit declaration of function `memcpy'
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:193: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:207: warning: implicit declaration of function `tolower'
scripts/basic/fixdep.c:193: warning: unused variable `s'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:212: error: parse error before "size_t"
scripts/basic/fixdep.c:213: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:214: error: `map' undeclared (first use in this function)scripts/basic/fixdep.c:214: error: `len' undeclared (first use in this function)scripts/basic/fixdep.c:220: warning: implicit declaration of function `ntohl'
scripts/basic/fixdep.c:231: warning: implicit declaration of function `isalnum'
scripts/basic/fixdep.c: In function `strrcmp':
scripts/basic/fixdep.c:244: warning: implicit declaration of function `strlen'
scripts/basic/fixdep.c: In function `do_config_file':
scripts/basic/fixdep.c:255: error: storage size of `st' isn't known
scripts/basic/fixdep.c:259: warning: implicit declaration of function `open'
scripts/basic/fixdep.c:259: error: `O_RDONLY' undeclared (first use in this function)
scripts/basic/fixdep.c:261: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:265: warning: implicit declaration of function `fstat'
scripts/basic/fixdep.c:267: warning: implicit declaration of function `close'
scripts/basic/fixdep.c:270: warning: implicit declaration of function `mmap'
scripts/basic/fixdep.c:270: error: `NULL' undeclared (first use in this function)
scripts/basic/fixdep.c:270: error: `PROT_READ' undeclared (first use in this function)
scripts/basic/fixdep.c:270: error: `MAP_PRIVATE' undeclared (first use in this function)
scripts/basic/fixdep.c:270: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:279: warning: implicit declaration of function `munmap'
scripts/basic/fixdep.c:255: warning: unused variable `st'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:284: error: parse error before "size_t"
scripts/basic/fixdep.c:285: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:286: error: `map' undeclared (first use in this function)scripts/basic/fixdep.c:287: error: `len' undeclared (first use in this function)scripts/basic/fixdep.c:289: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:291: warning: implicit declaration of function `strchr'
scripts/basic/fixdep.c:293: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:289: warning: unused variable `s'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:325: error: storage size of `st' isn't known
scripts/basic/fixdep.c:329: error: `O_RDONLY' undeclared (first use in this function)
scripts/basic/fixdep.c:331: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:341: error: `NULL' undeclared (first use in this function)
scripts/basic/fixdep.c:341: error: `PROT_READ' undeclared (first use in this function)
scripts/basic/fixdep.c:341: error: `MAP_PRIVATE' undeclared (first use in this function)
scripts/basic/fixdep.c:341: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:325: warning: unused variable `st'
scripts/basic/fixdep.c: In function `traps':
scripts/basic/fixdep.c:360: error: `stderr' undeclared (first use in this function)
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2

What is this command supposed to do? I must be using the wrong target folder I guess.

Any clues?
 
Old 11-28-2004, 09:47 AM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
You need to create a symbolic link from your kernel source to /usr/src/linux. This path is hard-coded into certain things, so it has to work.

Basically, delete the directory and then create the link:
Code:
cd /usr/src
rmdir linux
ln -s kernel-source-2.6.7 linux
The file /usr/include/sys/types.h is a standard glibc header file; you will need to install glibc-devel before you can even think about compiling any C software. This includes the nvidia driver, because it has to put additional code around the basic binary in order to make a working module.
 
Old 11-28-2004, 10:37 AM   #5
kermit
Member
 
Registered: Jul 2002
Location: Madrid. Spain
Distribution: considering ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Thanks again rjlee!

I'll try to do all that, and keep you informed
 
Old 12-03-2004, 03:50 AM   #6
kermit
Member
 
Registered: Jul 2002
Location: Madrid. Spain
Distribution: considering ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Hi again,

Is there any apt package to install those libs? I couldn't find it and that way I would be sure that the installation (paths, links, whatever) is correct.

Now, I have this problem

asterix:/usr/src/linux# make cloneconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/split-include
HOSTCC scripts/basic/docproc
make[1]: *** No rule to make target `cloneconfig'. Stop.
make: *** [cloneconfig] Error 2

Thanks a lot my friend, I owe you a couple of beers
 
Old 12-03-2004, 08:28 AM   #7
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
I think I just answered this question in another thread, but...

apt-get install libc6-dev

When you invoke this, look through what it spews out and note any recommended packages as well, as you may want to install those too.
 
Old 12-03-2004, 08:44 AM   #8
kermit
Member
 
Registered: Jul 2002
Location: Madrid. Spain
Distribution: considering ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
I already did

asterix:/home/angel# apt-get install libc6-dev
Reading Package Lists... Done
Building Dependency Tree... Done
libc6-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 261 not upgraded.

Sorry for making you work (post) twice
 
Old 12-03-2004, 10:10 AM   #9
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Quote:
Originally posted by kermit
I already did

asterix:/home/angel# apt-get install libc6-dev
Reading Package Lists... Done
Building Dependency Tree... Done
libc6-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 261 not upgraded.

Sorry for making you work (post) twice
261 not upgraded? That could easily be the problem in this case. It looks like you have a large number of packages that have not been upgraded yet, and that could be causing all kinds of problems.

Something else you could take a look at is making sure that you also have glibc installed.
 
Old 12-04-2004, 08:09 AM   #10
kermit
Member
 
Registered: Jul 2002
Location: Madrid. Spain
Distribution: considering ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
First of all, thanks for the priceless help

Second, what does this mean?

asterix:/usr/src# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages have been kept back:
amor [...] yelp
0 upgraded, 0 newly installed, 0 to remove and 261 not upgraded.

I thought that those 261 packages were not upgraded because they were already the last version. Is that correct??

About glibc, I think it is installed, isn't it?

asterix:/usr/src# dpkg --status libc6
Package: libc6
Status: install ok installed
Priority: required
Section: base
Installed-Size: 15604
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: i386
Source: glibc
Version: 2.3.2.ds1-18
Replaces: ldso (<= 1.9.11-9), timezone, timezones, gconv-modules, libtricks, libc6-bin, netkit-rpc, netbase (<< 4.0), libc6-dev (<< 2.3.2.ds1-14)
Provides: glibc-2.3.2.ds1-18
Depends: libdb1-compat
Suggests: locales, glibc-doc
Conflicts: strace (<< 4.0-0), libnss-db (<= 2.2-6.1.1), timezone, timezones, gconv-modules, libtricks, libc6-doc, libc5 (<< 5.4.33-7), libpthread0 (<< 0.7-10), libc6-bin, libwcsmbs, apt (<< 0.3.0), libglib1.2 (<< 1.2.1-2), netkit-rpc, wine (<< 0.0.20031118-1), cyrus-imapd (<< 1.5.19-15)
Description: GNU C Library: Shared libraries and Timezone data
Contains the standard libraries that are used by nearly all programs on
the system. This package includes shared versions of the standard C library
and the standard math library, as well as many others.
Timezone data is also included.
 
Old 12-04-2004, 08:48 AM   #11
Sslaxx
Member
 
Registered: Nov 2004
Location: Malvern, UK
Distribution: Debian Sarge (kernel 2.6.8)
Posts: 52

Rep: Reputation: 15
Try "apt-get -s dist-upgrade" and see if that brings up any foul-ups that would stop it from working. If it doesn't, "apt-get dist-upgrade" will download and install the latest versions of the packages you require. Be warned it may take some time on dial-up, depending on what those packages are.
 
Old 12-04-2004, 10:18 AM   #12
kermit
Member
 
Registered: Jul 2002
Location: Madrid. Spain
Distribution: considering ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Ok then, I upgraded everything (now 0 packages not upgraded).

I tried what rjlee said some posts ago:

asterix:/usr/src/linux# make cloneconfig
make[1]: *** No rule to make target `cloneconfig'. Stop.
make: *** [cloneconfig] Error 2

is that what I should have tried?? sorry I'm getting lost

Thanks for your help and support!!
 
Old 12-04-2004, 02:07 PM   #13
levicc00123
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 94

Rep: Reputation: 15
try make menuconfig (or make xconfig if you have X Windows and the qt libraries.)
 
Old 12-07-2004, 02:56 AM   #14
kermit
Member
 
Registered: Jul 2002
Location: Madrid. Spain
Distribution: considering ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
I tried but couldn't find menuconfig or xconfig, where should be that?
 
Old 12-07-2004, 03:12 AM   #15
Sslaxx
Member
 
Registered: Nov 2004
Location: Malvern, UK
Distribution: Debian Sarge (kernel 2.6.8)
Posts: 52

Rep: Reputation: 15
Make sure you're using
Code:
make xconfig
from the directory the Linux source code is installed in.
 
  


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
Debain kernel source or Linux kernel source? kushalkoolwal Debian 4 11-28-2005 01:56 PM
how to integrate driver source into kernel source tree zhchang Linux - Software 5 11-23-2005 12:34 AM
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 05:42 PM
difference between "pure" kernel source, and .deb packaged kernel source microsoft/linux Debian 1 06-19-2005 10:28 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM

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

All times are GMT -5. The time now is 04:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration