LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 01-29-2007, 01:00 PM   #1
abk4523
Member
 
Registered: Jun 2004
Distribution: RH8/Fedora Core 4
Posts: 139

Rep: Reputation: 15
Question unable to compile module


I am running Fedora core 4 and updated my kerenel to 2.6.17-1.2142_FC4-i686 through yumex. I updated the kernel development packages as well. To tes, I tried compiling the hello.cc module with the command " make -C /usr/src/kernels/2.6.17-1.2142_FC4-i686", but get this for output:

make: Entering directory `/usr/src/kernels/2.6.17-1.2142_FC4-i686'
CHK include/linux/version.h
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/kxgettext.o
HOSTCC scripts/kconfig/mconf.o
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/i386/Kconfig
#
# using defaults found in .config
#
SPLIT include/linux/autoconf.h -> include/config/*
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/genksyms/lex.o
HOSTCC scripts/genksyms/parse.o
HOSTLD scripts/genksyms/genksyms
CC scripts/mod/empty.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
make[1]: *** No rule to make target `init/main.o', needed by `init/built-in.o'. Stop.
make: *** [init] Error 2
make: Leaving directory `/usr/src/kernels/2.6.17-1.2142_FC4-i686'

I understand I need a configured and built kernel tree on my computer to compile modules, but I thought the kernel-devel package would take care of that. Is that the case or do I have to download a kernel from kernel.org and manually configure it? Also, if I have to manually configure the kernel, what options should I select? Thanks in advance.

Last edited by abk4523; 01-29-2007 at 01:01 PM.
 
Old 01-31-2007, 09:55 AM   #2
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,834

Rep: Reputation: 108Reputation: 108
Hi,

I have not used FC, so I only can guess.

Kernel-dev-package did not take care of configuration. (This is my guess)
In this case, you DO NOT have to visit www.kernel.org. (This is NOT my guess)
Instead, find your current .config file, copy it where you compile new one (the directory where you do make, make_modules...), there, do 'make oldconfig' This will take care of your concern. (This is NOT my guess)
You do not need to have fun finding correct options.

Happy Penguins!

PS, if my first guess is wrong, my post does not mean anything.
 
Old 02-02-2007, 09:45 AM   #3
abk4523
Member
 
Registered: Jun 2004
Distribution: RH8/Fedora Core 4
Posts: 139

Original Poster
Rep: Reputation: 15
Thanks for the help. I tried downloading kernel 2.6.19.2 and installing. When rebooting, I found it would not start unless I disabled SELinux. I did find a workaround for the compile problem though.
 
  


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
unable to compile module source FC4 abk4523 Fedora 3 07-06-2007 04:52 AM
Please Compile This Module For Me... hellmet Linux - Software 10 05-08-2006 05:30 AM
unable to compile scsi_mod as module in 2.6.9 nbd Linux - General 5 11-28-2004 10:56 AM
can't Compile a module under Kernel 2.4.20-8 srsairam Linux - Software 3 11-09-2004 12:45 AM
Nvidia module will not compile Shafted Debian 6 04-18-2004 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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