phunni Posted May 7, 2004 Report Share Posted May 7, 2004 (edited) I have recently tried to re-install linux on my laptop (arch linux this time) and had problems when it came to recompiling the kernel. I copied the .config from my previous install and tried to use that, but I get the following errors during the make bzImage stage: gcc -D__KERNEL__ -I/usr/src/linux-2.4.26/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 sched.c:213: error: conflicting types for 'reschedule_idle' sched.c:210: error: previous declaration of 'reschedule_idle' was here sched.c:213: error: conflicting types for 'reschedule_idle' sched.c:210: error: previous declaration of 'reschedule_idle' was here sched.c:371: error: conflicting types for 'wake_up_process' /usr/src/linux-2.4.26/include/linux/sched.h:603: error: previous declaration of 'wake_up_process' was here sched.c:371: error: conflicting types for 'wake_up_process' /usr/src/linux-2.4.26/include/linux/sched.h:603: error: previous declaration of 'wake_up_process' was here sched.c:409: error: conflicting types for 'schedule_timeout' /usr/src/linux-2.4.26/include/linux/sched.h:148: error: previous declaration of 'schedule_timeout' was here sched.c:409: error: conflicting types for 'schedule_timeout' /usr/src/linux-2.4.26/include/linux/sched.h:148: error: previous declaration of 'schedule_timeout' was here sched.c:739: error: conflicting types for '__wake_up' /usr/src/linux-2.4.26/include/linux/sched.h:595: error: previous declaration of '__wake_up' was here sched.c:739: error: conflicting types for '__wake_up' /usr/src/linux-2.4.26/include/linux/sched.h:595: error: previous declaration of '__wake_up' was here sched.c:749: error: conflicting types for '__wake_up_sync' /usr/src/linux-2.4.26/include/linux/sched.h:596: error: previous declaration of '__wake_up_sync' was here sched.c:749: error: conflicting types for '__wake_up_sync' /usr/src/linux-2.4.26/include/linux/sched.h:596: error: previous declaration of '__wake_up_sync' was here sched.c:759: error: conflicting types for 'complete' /usr/src/linux-2.4.26/include/linux/completion.h:31: error: previous declaration of 'complete' was here sched.c:759: error: conflicting types for 'complete' /usr/src/linux-2.4.26/include/linux/completion.h:31: error: previous declaration of 'complete' was here sched.c:769: error: conflicting types for 'wait_for_completion' /usr/src/linux-2.4.26/include/linux/completion.h:30: error: previous declaration of 'wait_for_completion' was here sched.c:769: error: conflicting types for 'wait_for_completion' /usr/src/linux-2.4.26/include/linux/completion.h:30: error: previous declaration of 'wait_for_completion' was here sched.c:804: error: conflicting types for 'interruptible_sleep_on' /usr/src/linux-2.4.26/include/linux/sched.h:600: error: previous declaration of 'interruptible_sleep_on' was here sched.c:804: error: conflicting types for 'interruptible_sleep_on' /usr/src/linux-2.4.26/include/linux/sched.h:600: error: previous declaration of 'interruptible_sleep_on' was here sched.c:815: error: conflicting types for 'interruptible_sleep_on_timeout' /usr/src/linux-2.4.26/include/linux/sched.h:601: error: previous declaration of 'interruptible_sleep_on_timeout' was here sched.c:815: error: conflicting types for 'interruptible_sleep_on_timeout' /usr/src/linux-2.4.26/include/linux/sched.h:601: error: previous declaration of 'interruptible_sleep_on_timeout' was here sched.c:828: error: conflicting types for 'sleep_on' /usr/src/linux-2.4.26/include/linux/sched.h:597: error: previous declaration of 'sleep_on' was here sched.c:828: error: conflicting types for 'sleep_on' /usr/src/linux-2.4.26/include/linux/sched.h:597: error: previous declaration of 'sleep_on' was here sched.c:839: error: conflicting types for 'sleep_on_timeout' /usr/src/linux-2.4.26/include/linux/sched.h:598: error: previous declaration of 'sleep_on_timeout' was here sched.c:839: error: conflicting types for 'sleep_on_timeout' /usr/src/linux-2.4.26/include/linux/sched.h:598: error: previous declaration of 'sleep_on_timeout' was here sched.c:210: warning: 'reschedule_idle' declared `static' but never defined make[2]: *** [sched.o] Error 1 make[2]: Leaving directory `/usr/src/linux-2.4.26/kernel' make[1]: *** [first_rule] Error 2 make[1]: Leaving directory `/usr/src/linux-2.4.26/kernel' make: *** [_dir_kernel] Error 2 What could be causing these errors? Edited May 7, 2004 by phunni Quote Link to comment Share on other sites More sharing options...
iphitus Posted May 7, 2004 Report Share Posted May 7, 2004 Was the .config from a different version of the kernel? Did you still run make menuconfig? You should always run it if you copied the .config from another version. Newer or older. Quote Link to comment Share on other sites More sharing options...
phunni Posted May 7, 2004 Author Report Share Posted May 7, 2004 I think it may have been from an earlier version of the kernel - I might try and run make oldconfig and see if I can get it working that way Quote Link to comment Share on other sites More sharing options...
Hirogen2 Posted June 14, 2004 Report Share Posted June 14, 2004 (edited) GCC before 3.3.3 had "something" missing so that prototypes' attributes could be different from attributes declared at the function body. Since now GCC 3.3.3 correctly emits a warning whenever the prototype doesnot match the function UP TO THE CHAR, it barks out. And Linux 2.4.x is affected by this now. I have put up a fix that solves this. fastcall.diff Even though it's diffed against 2.4.21-SuSE202, it should work against most other 2.4s. If not, well, you can only correct offending hunks by hand :-) edit@aug09: fixed link Edited August 9, 2004 by Hirogen2 Quote Link to comment Share on other sites More sharing options...
Hirogen2 Posted August 17, 2004 Report Share Posted August 17, 2004 Would be nice to hear if it helped anyone... because it gets downloaded often. Quote Link to comment Share on other sites More sharing options...
phunni Posted August 17, 2004 Author Report Share Posted August 17, 2004 I've been using the stock arch kernel now - so I haven't downlaoded your fix because, as yet, i haven't needed a fix for the laptop... But thanks for doing it - I'm sure it'll be a help to others! Quote Link to comment Share on other sites More sharing options...
Hirogen2 Posted January 12, 2005 Report Share Posted January 12, 2005 There are no further compiling problems for Linux 2.4.28 (the vanilla one from kernel.org) using GCC 3.3.4. I therefore stopped supplying a patch. If anyone is using GCC 3.3.3, I would like to hear back if it is still broken there. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.