Bug 22867 - can't compile kernel after gcc/glibc upgrades
can't compile kernel after gcc/glibc upgrades
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-12-27 02:05 EST by Raul Acevedo
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-12-28 15:37:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Raul Acevedo 2000-12-27 02:05:53 EST
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.)
Comment 1 Raul Acevedo 2000-12-27 02:09:38 EST
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.
Comment 2 Arjan van de Ven 2000-12-27 05:42:48 EST
<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.
Comment 3 Raul Acevedo 2000-12-28 02:29:31 EST
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
Comment 4 Raul Acevedo 2000-12-28 03:13:03 EST
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?)
Comment 5 Bill Nottingham 2000-12-28 14:29:59 EST
You need to both:

- make mrproper
- and use 'kgcc'.
Comment 6 Raul Acevedo 2000-12-28 15:36:23 EST
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.)
Comment 7 Raul Acevedo 2000-12-28 15:37:06 EST
Errr...
Comment 8 Bill Nottingham 2000-12-29 00:24:36 EST
You can reinstall it from whatever media you installed from; it's the
kgcc package.

Note You need to log in before you can comment on or make changes to this bug.