Bug 16775

Summary: cannot compile source 2.2.16-21
Product: [Retired] Red Hat Raw Hide Reporter: Bernhard Ege <bme>
Component: kernelAssignee: Michael K. Johnson <johnsonm>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-09-11 20:13:15 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 Bernhard Ege 2000-08-23 09:03:45 UTC
Compiling 2.2.16-21 leads to an early error *(sorry, a bit long):

make[2]: Entering directory `/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 -pipe -fno-strength-reduce -m386
-DCPU=386   -DEXPORT_SYMTAB -c signal.c
In file included from /usr/src/linux/include/linux/modversions.h:50,
                 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:26: 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:110: 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 -pipe -fno-strength-reduce -m386
-DCPU=386   -DEXPORT_SYMTAB -c ksyms.c
In file included from /usr/src/linux/include/linux/modversions.h:50,
                 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:26: 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:110: 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:140: 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:136: 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]: Leaving directory `/usr/src/linux-2.2.16/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.2.16/kernel'
make: *** [_dir_kernel] Error 2

I have kernel-headers-2.4.0-0.21 and kernel-source-2.2.16-21 installed. All
stuff is either rh70beta or rawhide (whatever is newest).

I did a make xconfig; make dep; make bzImage where the last one is the one
that failed. I tried with the config that came with the package and my own
config, but it made no difference.

What could be the problem?

regards,

Bernhard Ege

Comment 1 Michael K. Johnson 2000-08-23 15:53:53 UTC
Build the kernel with kgcc -- the 2.2 kernel won't build with latest
gcc.

Our latest kernel source tree will patch the Makefile to use kgcc
so that you don't have to deal with it at all when rebuilding, so
this shouldn't come up except when building a kernel from the
official sources.

Comment 2 Bernhard Ege 2000-08-24 07:52:33 UTC
It is already compiling with kgcc and even if I change HOSTCC to kgcc, it fails
the same way. gcc is not used at any point during the compilation (only compiled
3-4 source files before it failed.

Is this because the include files in /usr/include/{asm,linux} are from 2.4.0 and
the kernel include files are from 2.2.16-21? It doesn't appear that the kernel
compilation uses the /usr/include files, though.

Bernhard


Comment 3 Michael K. Johnson 2000-08-24 17:25:07 UTC
I'm not sure what all we have changed since then, but we just tested
this with our latest tree and it was successful.

Comment 4 Sammy 2000-08-25 14:46:19 UTC
Yes....according to the new Linus convention system inlcude files reside
in /usr/include and kernel include files reside in /usr/src/linux/include.
So, these should not be a link! I had the same problem and had to remove
that link before installing the 2.4.0 header rpm and kernerl source rpm.
After this everything works fine.

Comment 5 Michael K. Johnson 2000-08-25 14:53:33 UTC
Our current source tree has that all done right According To Linux[tm]
so we should be safe.

Comment 6 Bernhard Ege 2000-09-05 11:07:42 UTC
I have now tried on a new machine with a clean install of pinstripe (rh70beta)
and upgraded with rawhide packages and exactly the same compilation error
occurs. I have no more ideas on how to track this problem, but smp_num_cpus
appears not to be defined. The only include files not included from
/usr/src/linux are these:

/usr/lib/gcc-lib/i386-glibc21-linux/egcs-2.91.66/include/stdarg.h
/boot/kernel.h

and kernel.h is 0 bytes. As this is appears to be an include problem and smp
related, I don't think stdarg.h is to blaim.

Is anyone capable of compiling kernel-source-2.2.16-21 as it is on rawhide?

regards,

Bernhard Ege


Comment 7 Sammy 2000-09-07 19:05:26 UTC
Yes I have been compiling 2.2.16-21 from rawhide, with everything else from
rawhide for a while
now...but not straight out the box!!! See my commens above.....

Comment 8 Bernhard Ege 2000-09-08 07:01:29 UTC
Yes, I forgot to remove the links /usr/include/{asm,linux} and create them as
directories. Doing that and reinstalling kernel-headers still doesn't let me
compile the kernel.

From the top:

Install RedHat 7.0 beta (pinstripe).
Upgrade with the latest rawhide packages.
rpm -V kernel-headers shows no file changes.
rpm -V kernel-source shows no file changes.
cd /usr/src/linux
make xconfig
click save and exit (no config change, just for test)
make dep
make bzImage
observe the compile error in ksyms.c (for me that is always the case).

What did you do differently (maybe except for a xconfig change)?

Bernhard Ege

Comment 9 Sammy 2000-09-11 20:13:13 UTC
Well, I did the same BUT changed many options with xconfig. I remember my
recompilation failing initially until I fixed the include directory stuff.
Perhaps it also depends whether you did rpm -i or rpm -U. But I have the
exact same configuration!

Comment 10 Bill Nottingham 2000-09-12 22:57:50 UTC
If you are rebuilding with a different config, you need to run 'make mrproper'

Comment 11 openshift-github-bot 2017-10-20 00:51:15 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/9d9ff7ade91a4686ea6362cd16ab61a085e4767a
Merge pull request #16935 from jim-minter/issue16775

Automatic merge from submit-queue (batch tested with PRs 16896, 16908, 16935, 16898, 16090).

wait for group cache to avoid flake in templateinstance test

fixes #16775 (hopefully).

@smarterclayton @bparees @enj

Comment 12 openshift-github-bot 2017-10-23 21:33:22 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/8e73380b526ab4d8bfaee7536a4349b83ac152cb
Merge pull request #16979 from jim-minter/issue16775-2

Automatic merge from submit-queue.

delete templateinstances in foreground where necessary in extended tests

fixes #16775 (2nd attempt)
Proposing to comment out the previous "fix" in case it's superstition