Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > The Linux Kernel > help compiling new kernel

Forgot Password?
 The Linux Kernel   Compiling, theory, programming or other discussion about the linux kernel

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 06-28-2009   #1 (permalink)
Just Joined!
 
Join Date: Jun 2009
Posts: 2
help compiling new kernel

I'm trying to compile a smaller faster kernel to replace the prepackaged one i'm currently using.

Currently running recent stable version of debian lenny (net install)

linux kernel 2.6.26
kde 3.5.10

when i try to run menuconfig as root, i get this:

sonofcluster****:/home/flyinglow# cd /usr/src/linux-2.6.3/
sonofcluster****:/usr/src/linux-2.6.3# make menuconfig
make[1]: `scripts/fixdep' is up to date.
HOSTCC scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:91: error: static declaration of ‘current_menu’ follows non-static declaration
scripts/kconfig/lkc.h:63: error: previous declaration of ‘current_menu’ was here
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2
sonofcluster****:/usr/src/linux-2.6.3#

xconfig exits in a similar way. Any ideas what i've missed?

I don't have much programming experience, but i have gotten things to compile and run in the past. Just don't know what to do with this error message.

thanks for any help, Zack
flyinglow is offline  


Reply With Quote
Old 06-30-2009   #2 (permalink)
Just Joined!
 
mingdao's Avatar
 
Join Date: Jun 2009
Location: Dali, China
Posts: 16
kernel rebuild guide

Hey Zack,

I'm not familiar with that error, but I've built quite a few kernels over the years.

My recommendation is to build your kernel somewhere under your ~/ directory.

You might find use of my kernel rebuild guide - can't post a link, so maybe you
can Google "2.6-kernel-build.txt". It was the first hit for me - it is on my website
named slackwarebox.

It was written for Slackware, but I don't see why it wouldn't work on Debian. You
might have GrUB rather than LiLO; if so, you can Google how to edit grub.conf
or whatever file.
mingdao is offline   Reply With Quote
Old 06-30-2009   #3 (permalink)
Linux Engineer
 
Lakshmipathi's Avatar
 
Join Date: Sep 2006
Location: 3rd rock from sun
Posts: 1,093
Don't use /usr/src for compiling kernel.Get the book O'Reilly's "Linux Kernel In A Nutshell - A Desktop Quick Reference" by Greg Kroah-Hartman.
For complete user guide.

may be try "make defconfig"
__________________
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
Lakshmipathi is offline   Reply With Quote
Old 06-30-2009   #4 (permalink)
Just Joined!
 
Join Date: Jun 2009
Posts: 2
I tried moving out of /usr/src, still get the same error message. i've tried defconfig, xconfig, menuconfig. same result from all of them.

If i knew what the error message meant, i might have a chance of fixing the problem...
flyinglow is offline   Reply With Quote
Old 06-30-2009   #5 (permalink)
Linux Engineer
 
Lakshmipathi's Avatar
 
Join Date: Sep 2006
Location: 3rd rock from sun
Posts: 1,093
Check this link:
scripts/kconfig/mconf.c:91: error: static declaration of 'current_menu' follows non-static declaration - Olaf Hering - org.kernel.vger.linux-kernel - MarkMail


What's your kernel version and compiler version?
Download a latest kernel tar file ,that should work.
__________________
- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
Lakshmipathi is offline   Reply With Quote
Old 06-30-2009   #6 (permalink)
Just Joined!
 
mingdao's Avatar
 
Join Date: Jun 2009
Location: Dali, China
Posts: 16
You have this in your first post:
Code:
sonofcluster****:/home/flyinglow# cd /usr/src/linux-2.6.3/
sonofcluster****:/usr/src/linux-2.6.3# make menuconfig
make[1]: `scripts/fixdep' is up to date.
HOSTCC scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:91: error: static declaration of ‘current_menu’ follows non-static declaration
scripts/kconfig/lkc.h:63: error: previous declaration of ‘current_menu’ was here
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2
sonofcluster****:/usr/src/linux-2.6.3#
Now since you state you're presently running 2.6.26, I have my doubts
as to whether or not you're trying to build 2.6.3. Instead, I'm going to
guess you're building 2.6.30.

You can check those two files listed. I'm not certain of this, either, but I
think scripts/kconfig/mconf.c:91 is scripts/kconfig/mconf.c line 91, and
scripts/kconfig/lkc.h:63 is scripts/kconfig/lkc.h line 63. Checking those files
might give you some hint, also.

If you follow my guide, there should be no reason to have a problem. It
can be done by copy/paste on a Slackware system, and it seems to be
generic enough to do so on Debian. Maybe, maybe not ... haven't touched
a Debian kernel since 2003.
mingdao is offline   Reply With Quote
Old 06-30-2009   #7 (permalink)
Just Joined!
 
mingdao's Avatar
 
Join Date: Jun 2009
Location: Dali, China
Posts: 16
What is the output of:
"gcc --version"
"ld -V"
without the quotes.
mingdao is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 12:22 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2