LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 06-15-2008, 02:38 PM   #1
Gatemaze
LQ Newbie
 
Registered: Oct 2007
Posts: 24

Rep: Reputation: 0
compilation error: something to do with finding the right kernel source directories?


Hi, I am getting the following compilation error:
make -C /lib/modules/2.6.15-51-386/build -I/lib/modules/2.6.15-51-386/build/drivers/usb/serial SUBDIRS=/home/gats/PhDProgramming/Modules/Real_Robots/SICK_LMS200/driver for serial to usb/utm1925 adapter/mos7715-2.6-1.0.4 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.15'
Makefile:490: .config: No such file or directory
make[1]: *** No rule to make target `for'. Stop.
make[1]: Leaving directory `/usr/src/linux-source-2.6.15'
make: *** [default] Error 2

I have untared the kernel source in /usr/src/linux-source-2.6.15/ and made the following sym link:

ln -sf /usr/src/linux-source-2.6.15/ /lib/modules/2.6.15-51-386/build

I am suspecting that I am not guiding to the right kernel dirs.... Any help? Thanks.
 
Old 06-15-2008, 02:54 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,731
Blog Entries: 1

Rep: Reputation: 224Reputation: 224Reputation: 224
There is no .config file in /usr/src/linux-source-2.6.15. It is created or updated when you execute make menuconfig.
 
Old 06-15-2008, 03:11 PM   #3
Gatemaze
LQ Newbie
 
Registered: Oct 2007
Posts: 24

Original Poster
Rep: Reputation: 0
Hi and thanks for the reply. However, I am not trying to compile the kernel but a driver for a device of mine... which is supposed to be dynamically loaded. Then again I may be talking nonsense.... as now after doing make menuconfig on the kernel source dir... I am getting the following error when I am trying to compile the module.

make -C /lib/modules/2.6.15-51-386/build -I/lib/modules/2.6.15-51-386/build/drivers/usb/serial SUBDIRS=/home/gats/PhDProgramming/Modules/Real_Robots/SICK_LMS200/driver for serial to usb/utm1925 adapter/mos7715-2.6-1.0.4 modules
make[1]: Entering directory `/usr/src/linux-source-2.6.15'
make[1]: *** No rule to make target `for'. Stop.
make[1]: Leaving directory `/usr/src/linux-source-2.6.15'
make: *** [default] Error 2

Last edited by Gatemaze; 06-15-2008 at 03:41 PM.
 
Old 06-15-2008, 04:03 PM   #4
Gatemaze
LQ Newbie
 
Registered: Oct 2007
Posts: 24

Original Poster
Rep: Reputation: 0
One thing that seemed to be annoying the compilation was the long directory name.... after moving it somewhere with a shorter directory name I am getting the following errors:

make -C /lib/modules/2.6.15-51-386/build -I/lib/modules/2.6.15-51-386/build/drivers/usb/serial SUBDIRS=/home/gats/Desktop/mos7715-2.6-1.0.4 modules
make[1]: Entering directory `/lib/modules/2.6.15-51-386/build'

WARNING: Symbol version dump /lib/modules/2.6.15-51-386/build/Module.symvers
is missing; modules will have no dependencies and modversions.

CC [M] /home/gats/Desktop/mos7715-2.6-1.0.4/mos7715.o
/home/gats/Desktop/mos7715-2.6-1.0.4/mos7715.c:41:27: error: linux/version.h: No such file or directory
In file included from include/linux/fs.h:11,
from include/linux/tty.h:20,
from /home/gats/Desktop/mos7715-2.6-1.0.4/mos7715.c:42:
include/linux/ioctl.h:4:23: error: asm/ioctl.h: No such file or directory
In file included from include/linux/posix_types.h:47,
from include/linux/types.h:14,
from include/linux/rcuref.h:35,
from include/linux/fs.h:12,
from include/linux/tty.h:20,
from /home/gats/Desktop/mos7715-2.6-1.0.4/mos7715.c:42:
/usr/lib/gcc/i486-linux-gnu/4.0.3/include/asm/posix_types.h:13:22: error: features.h: No such file or directory
/usr/lib/gcc/i486-linux-gnu/4.0.3/include/asm/posix_types.h:14:35: error: no include path in which to search for asm/posix_types.h
In file included from include/linux/rcuref.h:35,
from include/linux/fs.h:12,
from include/linux/tty.h:20,
from /home/gats/Desktop/mos7715-2.6-1.0.4/mos7715.c:42:
include/linux/types.h:15:23: error: asm/types.h: No such file or directory
In file included from include/linux/rcuref.h:35,
from include/linux/fs.h:12,
from include/linux/tty.h:20,
from /home/gats/Desktop/mos7715-2.6-1.0.4/mos7715.c:42:





All the way until compilation fails.... Any help? Thanks.
 
Old 06-15-2008, 05:17 PM   #5
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
What distro do you have?

The 'build' isn't meant to be a link to the source directory; it's meant to be a link to a directory (laid out a bit like the source dir) which has configuration information and headers for your specific build. Most distros will have a package that installs that stuff; on Debian it's just:

apt-get install linux-headers-$(uname -r)
 
  


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
Finding and installing kernel source code Piespy Linux - Kernel 2 08-08-2006 03:47 PM
finding right kernel-source package matthaeus Suse/Novell 2 02-04-2006 10:19 AM
does kernel-source installs with the compilation cum installtion of a new kernel? luqman Linux - General 18 03-04-2005 07:33 AM
finding the kernel source Damon Spector Linux - Software 4 02-20-2005 10:45 AM
Finding My --kernel-source-path CAL Linux - Newbie 6 04-14-2004 07:57 AM


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