Bug 22867 - can't compile kernel after gcc/glibc upgrades
Summary: can't compile kernel after gcc/glibc upgrades
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-12-27 07:05 UTC by Raul Acevedo
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-12-28 20:37:09 UTC
Embargoed:


Attachments (Terms of Use)

Description Raul Acevedo 2000-12-27 07:05:53 UTC
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 07:09:38 UTC
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 10:42:48 UTC
<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 07:29:31 UTC
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 08:13:03 UTC
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 19:29:59 UTC
You need to both:

- make mrproper
- and use 'kgcc'.

Comment 6 Raul Acevedo 2000-12-28 20:36:23 UTC
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 20:37:06 UTC
Errr...

Comment 8 Bill Nottingham 2000-12-29 05:24:36 UTC
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.