LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-14-2006, 06:02 AM   #1
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283
Blog Entries: 3

Rep: Reputation: 35
how to compile 32 bit kernel on 64bit system


I want to compile a 32bit kernel on a 64bit computer with a 64bit compiler. I'm using the 2.4 kernel branch which doesn't want to compile at all on my computer at all, even when I leave on 64 bit.

I'm using Suse10 with gcc 4.0 gcc 32-bit 4.0 installed.

I tried the following flag, ARCH=i386 but it doesn't work. After I try to compile I end up getting this message

init/main.c:1: error: CPU you selected does not support x86-64 instruction set

Which is mysterious because under cpu options I have selected 386. But regardless, I get the same error message even with 64 selected.

And won't even compile straight, with no arch flags and just the following commands

make dep
make bzImage

It returns the following error.

/home/jnl/linux-2.4.32/include/asm/processor.h:71: error: array type has incomplete element type

What can I do here?

Last edited by slantoflight; 03-14-2006 at 06:04 AM.
 
Old 03-14-2006, 11:08 PM   #2
paragn
Member
 
Registered: Jan 2006
Distribution: Red Hat EL5, Fedora 7
Posts: 259

Rep: Reputation: 30
hi,
Try Adding to HOSTCFLAGS -m32 that will compile programs in 32bit
 
Old 03-15-2006, 03:16 PM   #3
slantoflight
Member
 
Registered: Aug 2005
Distribution: Smoothwall
Posts: 283

Original Poster
Blog Entries: 3

Rep: Reputation: 35
Quote:
Originally Posted by paragn
hi,
Try Adding to HOSTCFLAGS -m32 that will compile programs in 32bit
Now I get this error instead.

Code:
/home/jnl/linux-2.4.32/include/asm/processor.h:71: error: array type has incomplete element type
 
Old 03-15-2006, 11:12 PM   #4
cranium2004
Member
 
Registered: Feb 2004
Distribution: FC4,RHEL4
Posts: 223

Rep: Reputation: 30
hi,
i dont have kernel-2.4.32 source code. so can you show few lines from processor.h file where error occurred? may be its source file compile error and not kernel compilation error.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
32 bit sofware with 64bit cpu? computergee Linux - Software 6 05-25-2006 11:36 AM
32 bit -> 64bit OS lavluda Debian 1 02-05-2006 05:28 AM
how to build a 32 bit chroot for 64bit nathj72 Linux - Newbie 1 03-26-2005 03:14 PM
Compile 64-bit kernel FC3 jiman Fedora 3 11-30-2004 04:15 AM
x86-64 Kernel compile ---> i only get 32-bit Ben2210 Linux - Hardware 1 07-09-2004 07:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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