LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-04-2004, 10:17 AM   #1
SolarBear
Member
 
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105

Rep: Reputation: 15
Can't compile anything


As stated in the kernel sticky up there, I couldn't compile my home-brewed kernel.

Today, out of curiosity, I tried compiling ALSA for use with my SB Audigy LS and could not compile either. I've got gcc, g++, make, etc. installed of course. I always get errors about missing libraries.

e.g.
In file included from /usr/src/linux/include/linux/fs.h:1345,
from /usr/src/linux/include/linux/mm.h:15,
from /usr/src/linux/include/linux/poll.h:10,
from /var/lib/cvs/alsa-driver/include/sound/pcm.h:28,
from /var/lib/cvs/alsa-driver/alsa-kernel/core/oss/rate.c:25,
from rate.c:2:
/usr/src/linux/include/linux/err.h:4:23: asm/errno.h: No such file or directory
In file included from /usr/src/linux/include/linux/poll.h:10,
from /var/lib/cvs/alsa-driver/include/sound/pcm.h:28,
from /var/lib/cvs/alsa-driver/alsa-kernel/core/oss/rate.c:25,
from rate.c:2:
/usr/src/linux/include/linux/mm.h:29:22: asm/page.h: No such file or directory
/usr/src/linux/include/linux/mm.h:30:25: asm/pgtable.h: No such file or directory
/usr/src/linux/include/linux/mm.h:31:27: asm/processor.h: No such file or directory
/usr/src/linux/include/linux/mm.h:32:24: asm/atomic.h: No such file or directory

and so on. So I figure I must be missing some library/libraries ! But which one(s) ? I don't plan on installing every single available library, of course...

So if you have any clue about what would be missing, thanks for pointing it out.
 
Old 11-04-2004, 08:03 PM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
Have you installed kernel-sources (we are ignorant of the distro you are referencing, BTW)?

Those are the missing dependencies the program needs, that are either not installed or installed in a different places than the configure file expects them to be (distros like to put stuff different places, use the locate command to see where they may be if installed).

The google engine (in a Linux frame of mind) may be of great help here.

I have a win<something> or some other kernel module driver I have to install.
# 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.

OK, I'm game. Now I want to compile and try a new kernel!
# Compiling/installing a new kernel
Kernel compiling guide for newbies

I have Linux installed, now how do I work some stuff like some software and file managers?
# I can't figure out what software I want and how to install/uninstall it
The table of equivalents, replacements, analogs of Windows software in Linux
# Find software here
Freshmeat
Sourceforge
rpmfind
# Guides to software management
Rute Guide's software explanation
You might want to check out CheckInstall to manage source code installations/uninstallation
# File managers
Midnight Commander
Gentoo file manager
ROX-Filer

Last edited by fancypiper; 11-04-2004 at 08:11 PM.
 
Old 11-06-2004, 10:31 PM   #3
SolarBear
Member
 
Registered: Oct 2003
Location: Québec, Canada
Distribution: Gentoo 2005.0(desktop), Debian 3.0 r2 (server)
Posts: 105

Original Poster
Rep: Reputation: 15
Thanks for the help.

As my sig says, I'm using Sarge right now. Yes, I've got kernel-source-2.6.8 installed as well as kernel-headers-2.6.8-1, kernel-headers-2.6.8-1-686-smp, kernel-patches. I've got the latest packages for gcc and I've symlinked kernel sources as /usr/src/linux.

I've compiled a kernel (once) on Slackware so I know the bare basics.
 
  


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
How do I compile? icecream33 Programming 3 12-20-2017 12:49 PM
compile 2.6.13 jupiter3437 Linux - Software 3 09-09-2005 05:09 PM
ntop compile/post-compile problem? tjb Linux - Software 3 12-28-2004 05:22 PM
Cannot compile c davidtsl Programming 8 12-13-2004 02:36 AM
Compile help Twiggy794 Linux - Software 1 12-03-2003 02:53 AM

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

All times are GMT -5. The time now is 09:51 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