I've installed RH 7 on my ThinkPad 600X laptop, and then did all the upgrades on the RedHat ftp site. Now I'm trying to recompile the kernel using the kernel-source RPM, so it will properly support APM on my ThinkPad. I can't cut and paste the errors right now (I'm doing this from my sister's PC, I can't use the Internet on my laptop here because of the soft modem), but the failure is in ksyms.c:18, in function kstat_irqs, `smp_num_cpus' is undeclared. There are also a lot of warnings in the other files; a lot of redefined symbols, I don't know if this is normal, it's been a while since I recompiled a kernel. In any case, this is after using make xconfig and saving right away without changing any options. kgcc is apparently no longer installed on my system, so make is trying to use gcc. (locate kgcc shows nothing; find /usr -name kgcc doesn't show it either.)
BTW, I don't think this is a duplicate of bug 21655; I get a different error. That bug also mentions an "enterprise" kernel, I don't know what that means. I'm just using the standard RH 7 install (kernel-2.2.16-22) and kernel-source-2.2.16-22.i386.rpm.
<DUPE> You need to do a "make mrproper". Be sure to save your .config file to a safe place and copy it back after the "make mrpoper". Also do a "make oldconfig" after restoring the .config file. Then a "make dep", "make bzImage" etc as usual.
This definitely helps... but it still doesn't work. Now, it at least starts compiling, without the previous multitude of warnings, but it does eventually stop again at another error: make[2]: Entering directory `/usr/src/linux-2.2.16/arch/i386/lib' gcc -D__KERNEL__ -I/usr/src/linux/include -D__ASSEMBLY__ -traditional -c checksum.S -o checksum.o checksum.S:231: badly punctuated parameter list in #define checksum.S:237: badly punctuated parameter list in #define make[2]: *** [checksum.o] Error 1
Exact compilation steps that I took, fyi: % rpm -e kernel-source % rm -rf /usr/src/linux-2.2.16 % rpm -ivh kernel-source-2.2.16-22.i386.rpm % cd /usr/src/linux % make mrproper % make oldconfig % make dep % make bzImage I had originally tried it using my old .config file, then retried using the above steps to see if it would work using the exact configuration RedHat used to build it. (make oldconfig is supposed to create a .config file that is the same one that RedHat used in building the kernel RPM, so theoretically if you use the kernel-source RPM, plus make oldconfig, you will get the same kernel you get with the stock kernel RPM, including all RedHat patches, config options, etc.... right?)
You need to both: - make mrproper - and use 'kgcc'.
As I said in my original posting, somewhere along the line the upgrades I did wiped out kgcc. It's no longer installed on my system. (None of `which kgcc`, locate kgcc, or find / -name kgcc find it.)
Errr...
You can reinstall it from whatever media you installed from; it's the kgcc package.