LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 12-20-2004, 02:45 AM   #1
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Rep: Reputation: 30
error recompiling redhat linux 9 kernel 2.4.20-31.9 using original .config


I have been trying to recompile redhat's 2.4.20-31.9 kernel to include ntfs support for some time, but I keep getting errors.

Here's what I did:

1)cd /usr/src/linux-2.4.20-31.9
2)cp /boot/config-2.4.20-31.9 ./.config
3a)make menuconfig
3b)<selected "File systems">
4)<enter>
5)<set "NTFS file system support (read-only)" to <M>>
6)<ESC (to get back to main menu)>
7)<ESC (to exit kernel configuration)>
8)<enter (to select "Yes" to save new kernel configuration)>
9)make dep
10)make bzImage

Here's when the errors started. Here it is:

make -r -f tmp_include_depends all
make[1]: Entering directory `/usr/src/linux-2.4.20-31.9'
make[1]: Circular /usr/src/linux-2.4.20-31.9/include/asm/smplock.h <- /usr/src/linux-2.4.20-31.9/include/linux/interrupt.h dependency dropped.
make[1]: Circular /usr/src/linux-2.4.20-31.9/include/linux/netfilter_ipv4/ip_conntrack_helper.h <- /usr/src/linux-2.4.20-31.9/include/linux/netfilter_ipv4/ip_conntrack.h dependency dropped.
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/linux-2.4.20-31.9'
. scripts/mkversion > .tmpversion
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-31.9/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DUTS_MACHINE='"i386"' -DKBUILD_BASENAME=version -c -o init/version.o init/version.c
make CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.20-31.9/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 " -C kernel
make[1]: Entering directory `/usr/src/linux-2.4.20-31.9/kernel'
make all_targets
make[2]: Entering directory `/usr/src/linux-2.4.20-31.9/kernel'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-31.9/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=sched -fno-omit-frame-pointer -c -o sched.o sched.c
In file included from /usr/src/linux-2.4.20-31.9/include/linux/fs.h:200,
from /usr/src/linux-2.4.20-31.9/include/linux/capability.h:17,
from /usr/src/linux-2.4.20-31.9/include/linux/binfmts.h:4,
from /usr/src/linux-2.4.20-31.9/include/linux/sched.h:10,
from /usr/src/linux-2.4.20-31.9/include/linux/mm.h:22,
from sched.c:19:
/usr/src/linux-2.4.20-31.9/include/asm/semaphore.h:39:24: asm/system.h: No such
file or directory
In file included from /usr/src/linux-2.4.20-31.9/include/asm/semaphore.h:42,
from /usr/src/linux-2.4.20-31.9/include/linux/fs.h:200,
from /usr/src/linux-2.4.20-31.9/include/linux/capability.h:17,
from /usr/src/linux-2.4.20-31.9/include/linux/binfmts.h:4,
from /usr/src/linux-2.4.20-31.9/include/linux/sched.h:10,
from /usr/src/linux-2.4.20-31.9/include/linux/mm.h:22,
from sched.c:19:
/usr/src/linux-2.4.20-31.9/include/linux/rwsem.h:21:24: asm/system.h: No such file or directory
In file included from /usr/src/linux-2.4.20-31.9/include/linux/rwsem.h:29,
from /usr/src/linux-2.4.20-31.9/include/asm/semaphore.h:42,
from /usr/src/linux-2.4.20-31.9/include/linux/fs.h:200,
from /usr/src/linux-2.4.20-31.9/include/linux/capability.h:17,
from /usr/src/linux-2.4.20-31.9/include/linux/binfmts.h:4,
from /usr/src/linux-2.4.20-31.9/include/linux/sched.h:10,
from /usr/src/linux-2.4.20-31.9/include/linux/mm.h:22,
from sched.c:19:
/usr/src/linux-2.4.20-31.9/include/asm/rwsem.h:45:24: asm/system.h: No such file or directory
In file included from /usr/src/linux-2.4.20-31.9/include/linux/rwsem.h:29,
from /usr/src/linux-2.4.20-31.9/include/asm/semaphore.h:42,
from /usr/src/linux-2.4.20-31.9/include/linux/fs.h:200,
from /usr/src/linux-2.4.20-31.9/include/linux/capability.h:17,
from /usr/src/linux-2.4.20-31.9/include/linux/binfmts.h:4,
from /usr/src/linux-2.4.20-31.9/include/linux/sched.h:10,
from /usr/src/linux-2.4.20-31.9/include/linux/mm.h:22,
from sched.c:19:
/usr/src/linux-2.4.20-31.9/include/asm/rwsem.h: In function `__down_write_trylock':
/usr/src/linux-2.4.20-31.9/include/asm/rwsem.h:177: warning: implicit declaration of function `cmpxchg'
In file included from /usr/src/linux-2.4.20-31.9/include/linux/reiserfs_fs_sb.h:8,
from /usr/src/linux-2.4.20-31.9/include/linux/fs.h:731,
from /usr/src/linux-2.4.20-31.9/include/linux/capability.h:17,
from /usr/src/linux-2.4.20-31.9/include/linux/binfmts.h:4,
from /usr/src/linux-2.4.20-31.9/include/linux/sched.h:10,
from /usr/src/linux-2.4.20-31.9/include/linux/mm.h:22,
from sched.c:19:
/usr/src/linux-2.4.20-31.9/include/linux/tqueue.h:19:24: asm/system.h: No such file or directory
In file included from /usr/src/linux-2.4.20-31.9/include/linux/reiserfs_fs_sb.h:8,
from /usr/src/linux-2.4.20-31.9/include/linux/fs.h:731,
from /usr/src/linux-2.4.20-31.9/include/linux/capability.h:17,
from /usr/src/linux-2.4.20-31.9/include/linux/binfmts.h:4,
from /usr/src/linux-2.4.20-31.9/include/linux/sched.h:10,
from /usr/src/linux-2.4.20-31.9/include/linux/mm.h:22,
from sched.c:19:
/usr/src/linux-2.4.20-31.9/include/linux/tqueue.h: In function `queue_task':
/usr/src/linux-2.4.20-31.9/include/linux/tqueue.h:105: warning: implicit declaration of function `local_irq_save'
/usr/src/linux-2.4.20-31.9/include/linux/tqueue.h:107: warning: implicit declaration of function `local_irq_restore'
In file included from /usr/src/linux-2.4.20-31.9/include/linux/mm.h:22,
from sched.c:19:
/usr/src/linux-2.4.20-31.9/include/linux/sched.h:19:24: asm/system.h: No such file or directory
In file included from /usr/src/linux-2.4.20-31.9/include/linux/sched.h:26,
from /usr/src/linux-2.4.20-31.9/include/linux/mm.h:22,
from sched.c:19:
/usr/src/linux-2.4.20-31.9/include/linux/tty.h:27:24: asm/system.h: No such file or directory
In file included from /usr/src/linux-2.4.20-31.9/include/asm/highmem.h:25,
from /usr/src/linux-2.4.20-31.9/include/linux/highmem.h:11,
from sched.c:23:
/usr/src/linux-2.4.20-31.9/include/linux/interrupt.h:13:24: asm/system.h: No such file or directory
In file included from /usr/src/linux-2.4.20-31.9/include/asm/highmem.h:25,
from /usr/src/linux-2.4.20-31.9/include/linux/highmem.h:11,
from sched.c:23:
/usr/src/linux-2.4.20-31.9/include/linux/interrupt.h: In function `tasklet_disable':
/usr/src/linux-2.4.20-31.9/include/linux/interrupt.h:184: warning: implicit declaration of function `smp_mb'
In file included from sched.c:23:
/usr/src/linux-2.4.20-31.9/include/linux/highmem.h: In function `bh_kmap_irq':
/usr/src/linux-2.4.20-31.9/include/linux/highmem.h:36: warning: implicit declaration of function `__save_flags'
/usr/src/linux-2.4.20-31.9/include/linux/highmem.h:47: warning: implicit declaration of function `__cli'
/usr/src/linux-2.4.20-31.9/include/linux/highmem.h: In function `bh_kunmap_irq':/usr/src/linux-2.4.20-31.9/include/linux/highmem.h:61: warning: implicit declaration of function `__restore_flags'
sched.c: In function `this_rq_lock':
sched.c:213: warning: implicit declaration of function `local_irq_disable'
sched.c: In function `rq_unlock':
sched.c:222: warning: implicit declaration of function `local_irq_enable'
sched.c: In function `sched_exit':
sched.c:506: warning: `flags' might be used uninitialized in this function
sched.c: In function `context_switch':
sched.c:557: warning: implicit declaration of function `switch_to'
sched.c: In function `__wake_up':
sched.c:1113: warning: `flags' might be used uninitialized in this function
sched.c: In function `complete':
sched.c:1163: warning: `flags' might be used uninitialized in this function
sched.c: In function `complete_all':
sched.c:1173: warning: `flags' might be used uninitialized in this function
sched.c: In function `interruptible_sleep_on':
sched.c:1218: warning: `flags' might be used uninitialized in this function
sched.c: In function `interruptible_sleep_on_timeout':
sched.c:1229: warning: `flags' might be used uninitialized in this function
sched.c: In function `sleep_on':
sched.c:1242: warning: `flags' might be used uninitialized in this function
sched.c: In function `sleep_on_timeout':
sched.c:1253: warning: `flags' might be used uninitialized in this function
sched.c: In function `show_state':
sched.c:1885: warning: unused variable `g'
sched.c: In function `init_idle':
sched.c:1912: warning: `flags' might be used uninitialized in this function
make[2]: *** [sched.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.20-31.9/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-31.9/kernel'
make: *** [_dir_kernel] Error 2

Do you have any idea why sched.c has so many errors? What is sched.c anyway? Since I set the ntfs support in a module, the main kernel should not be affected, so what is wrong with redhat's original kernel source and .config? What should I do now?


Help me!


Thanks

Last edited by whipermr5; 12-23-2004 at 09:15 PM.
 
Old 12-20-2004, 04:57 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 66
The problem lies in the configuration stage between steps 2) and 3).

I'm going from memory but I think you need to run
Code:
make oldconfig
to actually update the kernel configuration from the .config file, before doing any other configuration. The various
Code:
make *config
stages do more than just write out the .config file.

It's also good practice to do
Code:
make mrproper
between steps 1 and 2. /usr/src/linux/README says that this should be done before every compile.
 
Old 12-20-2004, 06:35 AM   #3
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Original Poster
Rep: Reputation: 30
Thanks, I actually forgot to type make menuconfig in the previous post; I've updated it now. I did exactly what you said, but the same error still occurs. Any idea how this would happen?
 
Old 12-20-2004, 06:42 AM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 66
Check the /usr/include/asm symbolic link and see where it points to.

Also, if I recall correctly, then /usr/src/linux needs to be a symbolic link to the actual location of the kernel source when compiling a 2.4 series kernel. NB: this isn't the case with a 2.6 series kernel, where you should not install the source in /usr/src/linux (unless you know what you're doing; i.e.your package manager puts it there for you).
 
Old 12-20-2004, 07:14 AM   #5
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Original Poster
Rep: Reputation: 30
I checked /usr/include/asm, but it isn't a symlink, it's a directory. Also, there is a symlink named /usr/src/linux-2.4 that points to /usr/src/linux-2.4.20-31.9. Do I need to create a /usr/src/linux symlink to point to /usr/src/linux-2.4.20-31.9?
 
Old 12-20-2004, 07:58 AM   #6
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 66
Yes. I would point it at linux-2.4, but either should work.
 
Old 12-20-2004, 08:13 AM   #7
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Original Poster
Rep: Reputation: 30
I've made the link, but it still does not work! If you really have no idea how to fix it, then maybe i'll just have to stick without ntfs support. Thanks anyway. You've been a great help. Hope you have more ideas.
 
Old 12-22-2004, 12:04 AM   #8
whipermr5
Member
 
Registered: Dec 2004
Location: Singapore
Distribution: Fedora Core 5 Linux
Posts: 202

Original Poster
Rep: Reputation: 30
I've solved the problem by getting kernel 2.4.28. Thanks to Thetargos.

Last edited by whipermr5; 12-23-2004 at 03:24 AM.
 
  


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
Error compiling the original kernel in Mandrake 9 xbaez Mandriva 0 06-20-2004 05:46 PM
original Sarge's kernel-source-2.6.5/.config ? yotam Debian 3 05-29-2004 07:17 PM
Getting .config file for original kernel ghight Linux - Software 4 12-22-2003 12:28 PM
Recompiling RedHat 8.0 Kernel Touchstone Linux - General 14 08-09-2003 12:01 PM
recompiling redhat 8 kernel Deepu Sudhakar Linux - Newbie 11 10-11-2002 09:56 AM


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