Can't compile linux kernel!

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
Hi,

After making some changes in the configuration of the kernel, I tried to compile it several times but all the times I got the following error:

In file included from ide-cd.c:318: ide-cd.h:440: error: long, short, signed or unsigned used invalidly for `slot_tablelen'

When I issue gcc --version, I get:

gcc (GCC) 3.3.1 20030626 (Debian prerelease)

Please help me,
pitupepito
 

Haden

Senior member
Nov 21, 2001
578
0
0
gcc 3.3 is too imature now, use gcc-3.2, you have it installed: simple solution go to /usr/bin and change gcc link to point to gcc-3.2
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
when I do an apt-get install of gcc-3.2, it tells me: gcc-3.2 is already the newest version.

Can you shed some light in my confusion

thanks
 

Haden

Senior member
Nov 21, 2001
578
0
0
No you have gcc-3.2 and gcc-3.3 and probably even gcc-2.95.
Problem is, default one is 3.3.
Go to the /usr/bin, there is link "gcc" which points to "gcc-3.3" now, delete it, then create other [link] which would point to gcc-3.2 [named gcc of course].
There are other options, but this is very simple and convenient imo.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Or use make-kpkg, which handles gcc versions for you.

tar xzf kernel-source-2.4.20.tar.gz
cd kernel-source-2.4.20
make menuconfig
make-kpkg --revision BLAHBLAH.1 kernel_image



edit: typo
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Hrm... that is odd, then. gcc --version doesn't tell you anything - even though /usr/bin/gcc is a link to gcc-3.3, make-kpkg should override that back to 2.95. Have you modified the /etc/kernel-*.conf files or set the CC environment variable by any chance? Other than that, I don't have any good ideas other than starting with a fresh source tree if you haven't already. It sure does look a gcc problem of some sort.
 

pitupepito2000

Golden Member
Aug 2, 2002
1,181
0
0
I asked a friend and he said to look into /etc/alternatives. I am going to do some reading and see if I can fix my problem.

It seems that Linux teaches me a lot and one of the lessons that it teaches me all the time is to be patient and try to develop my problem solving skills. :)

 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
From what I have heard, gcc with make-kpkg is a special case - it bypasses alternatives as well as symlinks. I don't have the time at the moment to verify that, unfortunately. Maybe later...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
just use CC=gcc-3.2 when you compile, that should be passed to all the levels of the compile.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
You probably already now this, but don't forget to run "make mrproper" after you install the sources and before you run the "make menuconfig" and "make dep && make clean bzImage modules modules_install"
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
'make mrproper' isn't important, all it does is reset it back to the freshly untarred state, hell it even deletes your .config.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
It's always a good idea to use it when you install new sources, also when you change compilers or patch the kernel, or build a kernel for another platforms... It just cleans up any loose files you have laying around from a previous install (or attempt at install). You know how if it doesn't have to the kernel compilation tries to save time by re-using old code that it produced.

All though, make clean pretty much does the same thing...

It's not one of those things that is ablsotulty nessicarry, but in the past it has helped solve a comple problems for me, escpescially when changing modules around and stuff. It helps get past the occasional bug in the kernel installer.

Also you can backup your .config file and then run make menuconfig and choose the backup file as your config file and save it... thus restoring the .config. I probably should of mentioned that :)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
All though, make clean pretty much does the same thing...

Minus the removal of your .config...

I think the only real reason to use 'make mrproper' is when transporting source trees, to make sure it's absolutely pristine. Otherwise 'make clean' is good enough.