-   Linux - Newbie (
-   -   Trying to recompile kernel but config's not working. (

SonicGT 08-20-2005 12:08 PM

Trying to recompile kernel but config's not working.
Well, I'm trying to recompile the kernel so that I can get rivafb support so that I couls have a bootsplash. However, when I try to run make xconfig, it didn't work. same for make menuconfig. Here's what I got:


user@hostname:/usr/src/kernel-source-2.6.8$ make xconfig
  HOSTCC  scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:91: error: static declaration of 'current_menu' followsnon-static declaration
scripts/kconfig/lkc.h:63: error: previous declaration of 'current_menu' was here
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [xconfig] Error 2
user@hostname:/usr/src/kernel-source-2.6.8$ make menuconfig
  HOSTCC  scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:91: error: static declaration of 'current_menu' followsnon-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

I'm using Debian testing and as you can see, a 2.6.8 kernel.

PenguinPwrdBox 08-20-2005 12:39 PM

Try going into this file:


and commenting out line 91.
Then run it again.
If that doesn't work - uncomment 91 - and comment 63.

BTW - to "comment" is to put a hash (#) at the beginning of the line

SonicGT 08-20-2005 03:09 PM

Thanks, though now I see that it's quite an obvious solution. Maybe I should of looked at the error before posting.

EDIT: Well, Ok, now I'm getting this when I actually try to compile the kernel:

make[1]: Entering directory `/usr/src/kernel-source-2.6.8'
  SPLIT  include/linux/autoconf.h -> include/config/*
  CC      arch/i386/kernel/asm-offsets.s
In file included from include/asm/thread_info.h:16,
                from include/linux/thread_info.h:21,
                from include/linux/spinlock.h:12,
                from include/linux/capability.h:45,
                from include/linux/sched.h:7,
                from arch/i386/kernel/asm-offsets.c:7:
include/asm/processor.h:87: error: array type has incomplete element type
make[2]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 2
make[1]: Leaving directory `/usr/src/kernel-source-2.6.8'
make: *** [stamp-kernel-configure] Error 2

I checked processor.h, and the area with the offending line is this:

 * capabilities of CPUs

extern struct cpuinfo_x86 boot_cpu_data;
extern struct cpuinfo_x86 new_cpu_data;
extern struct tss_struct init_tss[NR_CPUS];

It's the third extern struct. Do you think I can just comment the line out, or will it need more drastic measures?

P.S. You can really use the hash mark for commenting instead of /*foo*/ in a C file?

PenguinPwrdBox 08-20-2005 06:25 PM

I would download another source package and try again. I've never been one for fixing other peoples coding errors. Do report this, though - and let them figure out if it is a valid bug - instead of just something on your machine (gcc version - etc) - unless you are pretty adventurous...

SonicGT 08-21-2005 08:51 AM

Starting over is always a nice idea.
Ok, I think I will start over. Maybe I messed up somewhere and because of it caused this to happen. I might try using that guide to recompiling that's a sticky in the Debian forum here.

Of course, I first have to fix my messed up lilo. conf:rolleyes:

btmiller 08-21-2005 09:47 AM

BTW, a # is not a comment for C source code as it would be for Perl or bash, which is part of the reason why that didn't work. Instead you would enclose the line as follows /* line */.

What version of gcc are you using? If you're using gcc 4 try installing an older version, as gcc 4 does some things differently and has a few issues since it's quite a bit stricter about enforcing some language rules than gcc 3 was.

SonicGT 08-21-2005 09:23 PM

Yep, the problem was that gcc was too new of a version, so I found a way to fix it so it uses the old one. So yes, my kernel was compiled. However, I still don't have a bootsplash. I checked and vesafb did load. Is it because I made the options in lilo.conf wrong? Here's my lilo.conf now:

        initrd= /boot/initrd.img-2.6.8-custom

SonicGT 08-22-2005 11:05 AM

Ok, I'm bumping this up now, for I think I added the last comment way too late at night.

Axo 08-23-2005 12:36 AM

install=/boot/boot.b ?
Going Graphical

TimmyP 08-25-2005 04:39 PM


i'm having the same problem you were having, and when i last tried to downgrade my gcc i managed to delete gnome and left quite a few packages in my system unusable.

how did you manage to do it?


SonicGT 08-25-2005 06:12 PM

Wonder how that happened...all I jused was Synaptic's Force Version feature to downgrade and from there it worked fine...

At least that's what I think I did.:D

TimmyP 08-25-2005 08:01 PM

ah, i'm mostly an aptitude guy...i'll have to give synaptec another try. what i did though was to go to and download the lower version .deb package and install it with dpkg.

i don't remember what i did before...

it seems to me though that etch seems to be a bit more unstable than sid right now. there are a lot of packages (like alsa-utils for example) that the current version in testing is not compatable with other major testing software (like alsa-utils and gnome)

All times are GMT -5. The time now is 02:48 AM.