LinuxQuestions.org
Register a domain and help support LQ
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 07-20-2005, 12:25 PM   #1
zahoo
Member
 
Registered: Nov 2004
Location: EU, HUNGARY, Budapest
Distribution: Debian SID
Posts: 40

Rep: Reputation: 15
Cannot compile kernel due to bzImage error


Hi,

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,
from /usr/src/linux/include/linux/list.h:6,
from /usr/src/linux/include/linux/wait.h:14,
from /usr/src/linux/include/linux/fs.h:12,
from /usr/src/linux/include/linux/capability.h:17,
from /usr/src/linux/include/linux/binfmts.h:5,
from /usr/src/linux/include/linux/sched.h:9,
from /usr/src/linux/include/linux/mm.h:4,
from /usr/src/linux/include/linux/slab.h:14,
from /usr/src/linux/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux/include/asm/processor.h:75: error: array type has incomplete
element type
In file included from /usr/src/linux/include/linux/sched.h:23,
from /usr/src/linux/include/linux/mm.h:4,
from /usr/src/linux/include/linux/slab.h:14,
from /usr/src/linux/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux/include/linux/smp.h:29: error: conflicting types for
'smp_send_reschedule'
/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,
from init/main.c:17:
/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!

Thanks!


Zahoo

Last edited by zahoo; 07-20-2005 at 03:13 PM.
 
Old 07-21-2005, 05:19 AM   #2
Zeistler
Member
 
Registered: May 2004
Distribution: Slackware
Posts: 108

Rep: Reputation: 15
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.
 
Old 07-25-2005, 09:23 PM   #3
zahoo
Member
 
Registered: Nov 2004
Location: EU, HUNGARY, Budapest
Distribution: Debian SID
Posts: 40

Original Poster
Rep: Reputation: 15
Thank Zeistler,

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?

Thanks anyway!


Zahoo
 
Old 08-18-2005, 07:33 AM   #4
Teukka
LQ Newbie
 
Registered: Aug 2003
Location: Finland
Distribution: Debian, Fedora, FreeBSD, OpenBSD
Posts: 22

Rep: Reputation: 15
Hi

I have the same problem in unstable debian, solved it like this:

Code:
apt-get install gcc-3.4
rm /usr/bin/gcc && ln -s /usr/bin/gcc3.4 /usr/bin/gcc
And then compiled the kernel, works just fine.

I'ts your choice if you leave gcc to point "old" gcc or not

Last edited by Teukka; 08-18-2005 at 07:35 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
make bzImage - error with kernel 2.4.26 2mk-master Linux - Newbie 2 03-02-2005 03:28 PM
NSS will not compile due to nspr4 library error juliensteel Linux - General 0 01-21-2005 08:40 AM
Error USB-HUC on booting due in mdk10 due to mx700 Boudewijn Mandriva 4 10-09-2004 08:36 AM
Error recompiling kernel 2.4.22 (Make bzImage) Spislander Debian 7 12-26-2003 12:03 AM
Kernel compile failing due to a file I can't find GreenPenInc Libranet 7 10-21-2003 11:55 AM


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