LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-14-2005, 08:33 AM   #1
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Rep: Reputation: 32
Kernel Compile Menuconfig Error


I'm getting the error below.
Any chance it is related to the gcc 4.0.1 upgrade?

Code:
# cd /usr/src/linux
# ls
arch                  fs           Makefile        security
COPYING               include      mm              sound
CREDITS               init         net             usr
crypto                ipc          README          version.Debian
Debian.src.changelog  kernel       README.Debian
Documentation         lib          REPORTING-BUGS
drivers               MAINTAINERS  scripts

/usr/src/linux# make menuconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/split-include
  HOSTCC  scripts/basic/docproc
  SHIPPED scripts/kconfig/zconf.tab.h
  HOSTCC  scripts/kconfig/conf.o
  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
linux:/usr/src/linux#
 
Old 08-14-2005, 01:05 PM   #2
koobert637
LQ Newbie
 
Registered: Jun 2005
Distribution: Debian Etch (mostly :D)
Posts: 16

Rep: Reputation: 0
Your problem is related to the gcc 4.0.1 upgrade.

I had the same problem after upgrading to etch and using the 2.6.8 kernel sources from apt. I inteded on using etch on both a server and a desktop (seperate machines), but could not compile the debian kernel source. For my server, i ended up reinstalling with sarge and compiling 2.6.8 with gcc 3.3.5. For my desktop I upgraded to 2.6.12-nitro5 and I did not get this error (although i did get plenty of warnings!) Hopefully one of these solutions will be of use.
 
Old 08-14-2005, 01:56 PM   #3
utanja
Member
 
Registered: Apr 2004
Location: Europe:Salzburg Austria USA:Orlando,Florida;
Distribution: Debian
Posts: 643

Rep: Reputation: 32
ok....i can understand the problems with GCC4.....so how can i set that gcc3.xx will be used to compile..
 
Old 08-14-2005, 03:05 PM   #4
koobert637
LQ Newbie
 
Registered: Jun 2005
Distribution: Debian Etch (mostly :D)
Posts: 16

Rep: Reputation: 0
Well, if you have both gcc-3.3.5 and gcc-4.0.1 installed, a quick/dirty way to do it would be something like "HOSTCC=gcc-3.3.5 make-kpkg kernel_image" or similar. It seems like the upgrade will leave the older gcc installed??? I'm not sure if this works, will try when I get home.

//EDIT:

Quote:
Originally posted by makuyl
Hmm, which gcc version are you using? : ls -l /usr/bin/gcc* /usr/bin/cpp* /usr/bin/g++*
Try using 3.3 if 4.0 doesn't work. For example:
rm /usr/bin/gcc
ln -s /usr/bin/gcc-3.3 /usr/bin/gcc
and do the same for cpp and g++
If you don't have them do: apt-get install gcc-3.3 cpp-3.3 g++-3.3
Give this a try, seems to be a better if more permanent way to do it.

Last edited by koobert637; 08-14-2005 at 03:17 PM.
 
Old 08-14-2005, 04:16 PM   #5
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Original Poster
Rep: Reputation: 32
I filed a bug report on this and received a reply on same day:

This is an automatic notification regarding your Bug report
#323059: kernel-source-2.6.8 fails at make menuconfig command,
which was filed against the kernel-source-2.6.8 package.

It has been closed by one of the developers, namely
Norbert Tretkowski

"2.6.8 doesn't work with gcc 4.0, try 2.6.12"
 
Old 08-14-2005, 04:19 PM   #6
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 918

Original Poster
Rep: Reputation: 32
Quote:
Originally posted by koobert637
It seems like the upgrade will leave the older gcc installed???
Yes, this is the case. The older gcc is left installed.

EDIT: The method below works perfecty.
I was able to compile the 2.6.8 kernel source normally.

# rm /usr/bin/gcc
# ln -s /usr/bin/gcc-3.3 /usr/bin/gcc

Thanks, koobert637 and makuyl.

Last edited by Xian; 08-14-2005 at 05:54 PM.
 
Old 09-06-2005, 06:03 PM   #7
SlowIQ
LQ Newbie
 
Registered: Sep 2005
Location: Near to the sea
Distribution: Debian
Posts: 1

Rep: Reputation: 0
man apt_preferences

It is written that removing or downgrading is dangerous.
For the sake of the above posting that requires an upgrade of the kernel,
Is it not possible to:

vi /etc/apt/preferences

i key (insert mode).

Package: gcc
Pin: version = 3.3*
Pin-Priority: 1001

Esc key (leave insert mode).
: key.
x key.
Enter key.

apt-get update

If gcc is not downgraded and you already had a version 4 or greater perhaps
apt-get remove gcc-4.0-base

I have not tested this so don't be angry if it decimates your picket fence.

Update: I find libgcc1 will cause problems if it was also updated. Downgrading that file... may be somewhat tricky unless someone knows a way to may apt think it is 'upgrading' to the older version.

Last edited by SlowIQ; 09-06-2005 at 06:44 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel 2.4.31 make menuconfig error technician Slackware 4 07-21-2005 11:11 PM
Kernel 2.6.9 compile error burn0ut Linux - General 3 12-08-2004 09:05 AM
error 2 trying to compile 2.4 kernel TonyJ Fedora 2 09-15-2004 08:51 PM
cannot compile menuconfig frankprogramer Linux - Software 3 03-16-2004 02:05 AM
kernel compile error (2.6.1) Tisch Debian 1 02-06-2004 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration