Bug 18912
Summary: | Kernel compilation failure in RH 7.0 | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Alejandro Lee Ibarra <alee> |
Component: | kernel | Assignee: | Michael K. Johnson <johnsonm> |
Status: | CLOSED NOTABUG | QA Contact: | Brock Organ <borgan> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 7.0 | CC: | arjan |
Target Milestone: | --- | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2000-10-13 15:25:40 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Alejandro Lee Ibarra
2000-10-11 19:07:41 UTC
You need to do an "export CC=kgcc" before compiling the kernel. Alternatively, you can use a recent 2.2.18pre kernel (2.2.18pre15 is fine), which uses kgcc automatically if available. (kgcc is the kernel-compiler which is a version of gcc which is known to compile the kernel in a reliable way) Hi! It's me again. I did what you said and I got new error: [root@HOST1 linux]# make bzImage kgcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pip e -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -c -o init/main.o init/main .c kgcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pip e -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -DUTS_MACHINE='"i386"' -c -o init/version.o init/version.c make -C kernel make[1]: Cambiando a directorio `/usr/src/linux-2.2.16/kernel' make all_targets make[2]: Cambiando a directorio `/usr/src/linux-2.2.16/kernel' kgcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pip e -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -DEXPORT_SYMTAB -c signal. c In file included from /usr/src/linux/include/linux/modversions.h:49, from /usr/src/linux/include/linux/module.h:19, from signal.c:10: /usr/src/linux/include/linux/modules/i386_ksyms.ver:6: warning: `cpu_data' redefined /usr/src/linux/include/asm/processor.h:96: warning: this is the location of the previous definition /usr/src/linux/include/linux/modules/i386_ksyms.ver:28: warning: `smp_num_cpus' redefined /usr/src/linux/include/linux/smp.h:77: warning: this is the location of the previous definition /usr/src/linux/include/linux/modules/i386_ksyms.ver:118: warning: `smp_call_function' redefined /usr/src/linux/include/linux/smp.h:83: warning: this is the location of the previous definition kgcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pip e -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -DEXPORT_SYMTAB -c ksyms.c In file included from /usr/src/linux/include/linux/modversions.h:49, from /usr/src/linux/include/linux/module.h:19, from ksyms.c:14: /usr/src/linux/include/linux/modules/i386_ksyms.ver:6: warning: `cpu_data' redefined /usr/src/linux/include/asm/processor.h:96: warning: this is the location of the previous definition /usr/src/linux/include/linux/modules/i386_ksyms.ver:28: warning: `smp_num_cpus' redefined /usr/src/linux/include/linux/smp.h:77: warning: this is the location of the previous definition /usr/src/linux/include/linux/modules/i386_ksyms.ver:118: warning: `smp_call_function' redefined /usr/src/linux/include/linux/smp.h:83: warning: this is the location of the previous definition In file included from /usr/src/linux/include/linux/interrupt.h:51, from ksyms.c:21: /usr/src/linux/include/asm/hardirq.h:23: warning: `synchronize_irq' redefined /usr/src/linux/include/linux/modules/i386_ksyms.ver:138: warning: this is the location of the previous definition In file included from /usr/src/linux/include/linux/interrupt.h:52, from ksyms.c:21: /usr/src/linux/include/asm/softirq.h:75: warning: `synchronize_bh' redefined /usr/src/linux/include/linux/modules/i386_ksyms.ver:142: warning: this is the location of the previous definition /usr/src/linux/include/linux/kernel_stat.h: In function `kstat_irqs': In file included from ksyms.c:17: /usr/src/linux/include/linux/kernel_stat.h:47: `smp_num_cpus' undeclared (first use in this function) /usr/src/linux/include/linux/kernel_stat.h:47: (Each undeclared identifier is reported only once /usr/src/linux/include/linux/kernel_stat.h:47: for each function it appears in.) make[2]: *** [ksyms.o] Error 1 make[2]: Saliendo directorio `/usr/src/linux-2.2.16/kernel' make[1]: *** [first_rule] Error 2 make[1]: Saliendo directorio `/usr/src/linux-2.2.16/kernel' make: *** [_dir_kernel] Error 2 [root@HOST1 linux]# Ok. This is caused by a 2nd thing. You have to do a "make mrproper" if you switch from SMP to non-SMP. If not, you get the errors you list. Warning: "make mrproper" also deletes the .config file, so you may want to copy that to a safe place first, do the make mrproper, copy it back and then do an "make oldconfig" before you do the "make bzImage". (of course, the kgcc thing remains.) Hi! I could make it work. Thanks for your patience and for your knowledge. :) |