• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Debian won't let me recompile my kernel

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Christoph

JAPH Senior
Joined
Oct 8, 2001
Location
Redmond, WA
This is really wierd.
I was playing with my kernel and decided to recompile. Error. Hmmm, that's strange. Backup .config, make mrproper and recompile. Error. Delete .config, make menuconfig and use whatever defaults to make clean and recompile. Error. Download 2.4.20 source, nuke old dir, extract, make menuconfig, use defaults, make clean, recompile. Error. Try again in a random dir with enough free space. Error.
Copy 2.4.20 source code to chroot'd Gentoo, copy my .config file, recompile. Success.
I just apt-get updated and dist-upgraded my install, and I suspect that it's just a passing bug. Can anyone confirm this?

BTW, here are the errors. I doubt that they'll mean much to anyone but devs, but maybe some of you like this sort of thing.
gcc -D__KERNEL__ -I/home/ideamagnate/otra/linux/linux-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -nostdinc -iwithprefix include -DKBUILD_BASENAME=ide_cd -c -o ide-cd.o ide-cd.c
In file included from ide-cd.c:318:
ide-cd.h:440: error: long, short, signed or unsigned used invalidly for `slot_tablelen'
make[3]: *** [ide-cd.o] Error 1
make[3]: Leaving directory `/home/ideamagnate/otra/linux/linux-2.4.20/drivers/ide'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/home/ideamagnate/otra/linux/linux-2.4.20/drivers/ide'
make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/home/ideamagnate/otra/linux/linux-2.4.20/drivers'
make: *** [_dir_drivers] Error 2
 
don't think this is a good solution, but I've often gotten over kernel compile problems by simply not compiling the problematic driver (in this case ide-cd) or compiling it as a module if I really needed it...
You could just try another kernel version, say, download it from kernel.org without using apt-get...
 
mirko_3 said:
don't think this is a good solution, but I've often gotten over kernel compile problems by simply not compiling the problematic driver (in this case ide-cd) or compiling it as a module if I really needed it...
You could just try another kernel version, say, download it from kernel.org without using apt-get...

i agree, seen it happened a few times.
 
Stuff should compile in the stable kernel though. Have you patched your kernel source at all?

And under Debian, you should be building your kernel with make-kpkg.

apt-get install kernel-package && man make-kpkg
 
Are you running an overclocked PC (why am I even asking this....)?
gcc is very sensitive to OCing and usually the first software on Linux which breaks. Especially on long compiles like a kernel.
 
hmmm.... I just have to point this out, after compiling OpenOffice, I don't think I'll ever again think of the kernel compilation as 'long' ...:D
 
mirko_3: I thought about that, but IIRC the driver was for reiserfs. I tried taking that out, but I got another error, and I suspect that I'd see a whole lot of them if I kept going. I don't feel like crippling my kernel just because there's some GCC problem.

XWRed1: What's special about that method? I like using a process that that I can use on any standard Linux box, since not everyone's enlightened enough to use Debian.
The problem started after I patched the kernel, but that was just coincidence. A similar thing happens with completely untouched kernel source and doesn't happen with the same source in Gentoo.

klingens: that's why I'm not OCed. OCing was fine when I was on windows and everything was pre-compiled. In Linux, I routinely compile packages (esp with Gentoo), and I don't want to have the instability that OCing can cause.
BTW, I have recompiled the kernel on a P90. IDR how many hours it took, but I remember that I never looked at my XP1600+ the same way.
I don't even want to think of how many weeks compiling Oo_O on a 486 would take, assuming that you had enough ram.
 
Last edited:
Christoph said:
mirko_3: I thought about that, but IIRC the driver was for reiserfs. I tried taking that out, but I got another error, and I suspect that I'd see a whole lot of them if I kept going. I don't feel like crippling my kernel just because there's some GCC problem.

I suppose that means that you've also tried compiling them as modules? In case you have, I'm afraid I can't really help you... :(
 
well, I can say that I have the EXACT same problem as christoph. I am using debian unstable (sid) and I am wonder what christoph is using ?? I am re-compiling my computer with ide cd-rom support as a module, and so far, so good.

I am also downloading the latest beta kernel, hoping that the problem with - whatever it is - has been fixed. i'll report back later on my findings.

*EDIT*
not so good, i get the same type of error with some networking package :mad: .. i'm gonna try 2.5.x and see if it works.
 
Spector_306 said:
well, I can say that I have the EXACT same problem as christoph. I am using debian unstable (sid) and I am wonder what christoph is using ?? I am re-compiling my computer with ide cd-rom support as a module, and so far, so good.

I am also downloading the latest beta kernel, hoping that the problem with - whatever it is - has been fixed. i'll report back later on my findings.

*EDIT*
not so good, i get the same type of error with some networking package :mad: .. i'm gonna try 2.5.x and see if it works.

That's all I need to hear. I'm using the most recent unstable version of Debian too, and since both of us are using the same version and having the same problem, it's very likely that it's a bug with Debian.
IIRC, 2.5.65 compiled OK, but I didn't want to go through getting it to work and I didn't want to get stuck with some major bug. I'm getting 2.4.19 and 2.5.70 to see if either works.
 
okay, I couldnt get menuconfig or xconfig to work w/ 2.5, so i'm gonna try some older kernels (2.2 series) and see if any of them work.

*EDIT*
apt-get install libncurses5-dev
make menuconfig
duh :-/
 
Last edited:
What's special about that method?

Make-kpkg can manage the compiling for you, and it creates nice dpkgs so you can keep all you kernel stuff in with the package management system.
 
Now I know. I'll stick with the manual compile, but it's good to have that option.
It looks like there's some gcc, cpp, g++ and binutils stuff in the latest upgrade. I hope it fixes my problem.
Edit: no dice. :mad:
 
Last edited:
compiling a kernel package is great for the "I need a new kernel on this 486" scenario: it let´s you compile it on a fask desktop (some athlon) and deploy it on the 486. It´s much more of a hassle to move the kernel image and especially all those modules if you compile manually. The inistence of kernel-package to use lilo as a bootloader is annoying tho.
 
Spector_306 said:

however, whenever i boot to the new kernel, it panics saying that it cant find the root partition....

Two ways to solve this: either tell the kernel your root-partition with a boot parameter, e.g.:
/vmlinuz root=/dev/hda5

or man rdev to set it in your kernel image
 
Yeah, I use lilo as my boot manager. I pass the paramater 'root=/dev/hdb1' (my linux root partion) and it still doesnt work... oh well, thats my problem.

Just wondering, christoph - did you ever find a way to update the kernel or not ??

I accidently killed my linux (my normal and backup kernel now give me the dreded root partition not found) so I have to reinstall before I can help. I will probably install the new kernel before i upgrade and dist-upgrade woody to sid.

just wondering if there are any good ideas floating around out there ??
 
So far, the most hopeful method is to try to get my Gentoo install working while apt-get updating frequently to see if there are any updates to gcc et al.
I'm a little lucky that I can still use my computer. For some reason, I ran my fixkernel script (to add nvidia and alsa drivers to the kernel), and the alsa driver didn't work. I can still get into X fine, but my sound won't work without the alsa module.
The upside is that it always takes something like this to get me to switch distros, and I've been meaning to do so for a while.

Edit: I had a better idea. I've changed from unstable to stable and am now updating. After I'm done, I'll methodically remove and reinstall gcc and anything else that might be relevant. I'll post back when I know what works.

Edit2.0: Booya! It works! I just wish I hadn't decided to recompile my kernel while emerge worlding my Gentoo installation.

In short, the solution is this:
In /etc/apt, change unstable to stable wherever it occurs.
Do apt-get update, apt-get remove gcc and apt-get install gcc.
That'll get you back to the earlier version of the compiler, which will has the COMPILE_VALID_C_CODE flag set to true instead of false.
 
Last edited:
[gentoo_recruiting_mode]
I hope that doesn't mean that you won't switch to Gentoo??? In gentoo I've had no kernel compile problems yet (just like in redhat.... :D), and, besides, there are nvidia kernels already patched ecc ecc...
[/gentoo_recruiting_mode]

hehe... I've never used debian, but, having use apt-get on redhat, I have to admit that emerge works much better...
 
Back