Cannot compile kernel due to bzImage error
I'm not a newbie at kernel compilation at all. I've compiled kernel more than 100 times (at least). I'm using Debian sid. My problem is the following: I want to compile 2.4.x kernel (I tried 2.4.25 2.4.27). I got the sources from the ftp.hu.kernel.org. I untarred them, made the config. I made it up to the "make dep" but the "make bzImage" failed. It says something about main.h error (I will include it soon, I am not at home right now).
So here is the error message:
"In file included from /usr/src/linux/include/linux/prefetch.h:13,
/usr/src/linux/include/asm/processor.h:75: error: array type has incomplete
In file included from /usr/src/linux/include/linux/sched.h:23,
/usr/src/linux/include/linux/smp.h:29: error: conflicting types for
/usr/src/linux/include/asm/smp.h:42: error: previous declaration of
'smp_send_reschedule' was here
In file included from /usr/src/linux/include/linux/unistd.h:9,
/usr/src/linux/include/asm/unistd.h:375: warning: conflicting types for
built-in function '_exit'
make: *** [init/main.o] Error 1"
I even tried to compile 2.6.5 kernel (of course with "make" instead of "make dep" and "make bzImage") but it failed too.
The strange thing is that I compiled the 2.4.25 kernel before on this system. The only change I made is that I made an apt-get dist-upgrade (since it used to be a woody). But I reinstalled the whole system from the very beginning (fdisk, etc...) and put a clear sid on the laptop. The result is the same. I'm not able to compile any of kernels despite that I'm using original "fresh" kernel-sources.
There might be some problem with the sid packages?
Any help is appreciated!
Which version of Gcc do you have installed?
type gcc -v in console to check
Some versions of gcc are unable to build the kernel due to various problems.
your hint solved my problem. I think when I made a dist-upgrade to sid the gcc was updated to gcc-4.x. I set up a pure sarge system on my computer and everything is fine now.
I just don't know what was I missing in my sid version in order to be able to compile the kernel with a very new compiler like gcc-4.x. I think I got to figure it out if want to keep up with sid. Does anyone have an idea or experience about this (compiling kernel with gcc > 4.0) problem?
I have the same problem in unstable debian, solved it like this:
I'ts your choice if you leave gcc to point "old" gcc or not
|All times are GMT -5. The time now is 01:58 AM.|