Bug 16775 - cannot compile source 2.2.16-21
cannot compile source 2.2.16-21
Status: CLOSED NOTABUG
Product: Red Hat Raw Hide
Classification: Retired
Component: kernel (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-08-23 05:03 EDT by Bernhard Ege
Modified: 2017-10-23 17:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-09-11 16:13:15 EDT
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 Bernhard Ege 2000-08-23 05:03:45 EDT
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 11:53:53 EDT
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 03:52:33 EDT
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 13:25:07 EDT
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 10:46:19 EDT
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 10:53:33 EDT
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 07:07:42 EDT
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 15:05:26 EDT
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 03:01:29 EDT
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 16:13:13 EDT
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 18:57:50 EDT
If you are rebuilding with a different config, you need to run 'make mrproper'
Comment 11 openshift-github-bot 2017-10-19 20:51:15 EDT
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 17:33:22 EDT
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

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