LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 06-01-2006, 03:31 AM   #1
sharad
Member
 
Registered: Dec 2005
Posts: 48

Rep: Reputation: 15
problem in compiling kernel 2.2.16 on a 2.6.13 system


hi all,
I want to compile and install a linux kernel 2.2.16-22 on my machine which is currently running kernel version 2.6.13. But I am getting an error when I execute "make bzImage" command, I get following error. My glibc version is 2.3.5 and gcc version 3.4.3

/home/nisg/linux/include/linux/genhd.h: In function `ptype':
/home/nisg/linux/include/linux/genhd.h:83: error: label at end of compound statement
init/main.c:249:8: warning: extra tokens at end of #endif directive
init/main.c:253:8: warning: extra tokens at end of #endif directive
init/main.c:256:8: warning: extra tokens at end of #endif directive
init/main.c:259:8: warning: extra tokens at end of #endif directive
init/main.c:262:8: warning: extra tokens at end of #endif directive
init/main.c:265:8: warning: extra tokens at end of #endif directive
init/main.c:268:8: warning: extra tokens at end of #endif directive
init/main.c:271:8: warning: extra tokens at end of #endif directive
init/main.c:274:8: warning: extra tokens at end of #endif directive
init/main.c:277:8: warning: extra tokens at end of #endif directive
init/main.c:280:8: warning: extra tokens at end of #endif directive
init/main.c:283:8: warning: extra tokens at end of #endif directive
init/main.c:292:8: warning: extra tokens at end of #endif directive
init/main.c:922:8: warning: extra tokens at end of #endif directive
init/main.c:925:8: warning: extra tokens at end of #endif directive
init/main.c:928:8: warning: extra tokens at end of #endif directive
init/main.c:931:8: warning: extra tokens at end of #endif directive
init/main.c:934:8: warning: extra tokens at end of #endif directive
init/main.c:937:8: warning: extra tokens at end of #endif directive
init/main.c:940:8: warning: extra tokens at end of #endif directive
init/main.c:943:8: warning: extra tokens at end of #endif directive
init/main.c:946:8: warning: extra tokens at end of #endif directive
init/main.c:949:8: warning: extra tokens at end of #endif directive
init/main.c:952:8: warning: extra tokens at end of #endif directive
make: *** [init/main.o] Error 1

please help in this problem.

thank you.

sharad
 
Old 06-01-2006, 08:39 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
I'm not going to ask why. I'm not even going to tell you that linux kernels are usually tied pretty closely to different versions of gcc, which in turn generally require different versions of libc, which in turn ...

To remove the error (since all that matters is a binary gets spit out of the compiler) just remove the offending line. Yes that's line 82 in include/linux/genhd.h. The line should have said:
Code:
		default:
No, it will not break anything (seriously, it is a difference in how GCC has evolved).

P.S.
If you are trying such a daunting task, expect more of these.
 
  


Reply



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
script to analyze system then write a .config file for kernel compiling jmannik Linux - Newbie 7 12-19-2005 02:15 PM
Compiling an older kernel on a newer system J_Szucs Linux - General 7 05-30-2005 01:49 AM
??Compiling new Linux Kernel in DOS,and then installing and booting System whit that isilinux Linux - General 2 01-26-2005 10:28 AM
Compiling in ACPI support on Compaq 2135CA (system crashes while compiling) Dag Linux - Laptop and Netbook 20 07-30-2004 07:56 PM
Problem after compiling the kernel niac Linux - General 3 10-14-2002 12:32 PM

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

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