Find the answer to your Linux question:
Results 1 to 7 of 7
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    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

  2. #2
    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.

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    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"
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  4. #4
    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...

  5. #5
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    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.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  6. #6
    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.

  7. #7
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •