LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Kernel Compile Menuconfig Error (https://www.linuxquestions.org/questions/debian-26/kernel-compile-menuconfig-error-353099/)

Xian 08-14-2005 07:33 AM

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#


koobert637 08-14-2005 12:05 PM

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.

utanja 08-14-2005 12:56 PM

ok....i can understand the problems with GCC4.....so how can i set that gcc3.xx will be used to compile..:)

koobert637 08-14-2005 02:05 PM

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.

Xian 08-14-2005 03:16 PM

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"

Xian 08-14-2005 03:19 PM

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.

SlowIQ 09-06-2005 05:03 PM

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.


All times are GMT -5. The time now is 07:58 AM.