Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37711 - gentoo-sources-2.4.22-r4 compilation error
Summary: gentoo-sources-2.4.22-r4 compilation error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Brian Jackson (RETIRED)
URL:
Whiteboard:
Keywords:
: 37723 37776 38160 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-09 09:27 UTC by Stefan Tittel
Modified: 2004-01-14 09:30 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The .config used. (.config,24.46 KB, text/plain)
2004-01-09 09:30 UTC, Stefan Tittel
Details
Another config that causes the same error. (config,22.35 KB, text/plain)
2004-01-09 13:34 UTC, Anders Bruun Olsen
Details
A patch that seems to work (gentoo-sources-2.4.22-r4-xp.patch,691 bytes, patch)
2004-01-09 21:06 UTC, James Kyte
Details | Diff
Previous patch broke "make oldconfig" (gentoo-sources-2.4.22-r4-xp2.patch,564 bytes, patch)
2004-01-09 23:42 UTC, Sean O'Leary
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Tittel 2004-01-09 09:27:55 UTC
If I take my .config from gentoo-sources-2.4.22-r3, put them into the directory of gentoo-sources-2.4.22-r4, make oldconfig, make menuconfig to change the platform from Athlon to Athlon-XP (since Athlon-XP was not explicitly supported in -r3) and try to compile, make bzImage errors as stated under "Actual Results". Of course I did "make mrproper" before the whole thing and "make dep" and "make clean" before "make bzImage".

I tried the whole thing multiple times slightly differently without success. Of course gentoo-sources-2.4.22-r3 compiled fine with the .config used back then.

Reproducible: Always
Steps to Reproduce:
1. emerge gentoo-sources-2.4.22-r4
2. cd /usr/src/gentoo-sources-2.4.22-r4
3. make mrproper
4. cp ../gentoo-sources-2.4.22-r3/.config .
5. make oldconfig
6. make menuconfig (change platform from Athlon to Athlon-XP), save settings.
7. make dep (without errors).
8. make clean (without errors).
9. make bzImage (fails as stated unter "Actual Results")
Actual Results:  
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o  
scripts/split-include scripts/split-include.c 
scripts/split-include include/linux/autoconf.h include/config 
gcc -D__KERNEL__ -I/usr/src/linux-2.4.22-gentoo-r4/include -Wall 
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-finline-limit=2000 -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 
-march=athlon-xp   -DKBUILD_BASENAME=main -c -o init/main.o init/main.c 
In file included 
from /usr/src/linux-2.4.22-gentoo-r4/include/linux/prefetch.h:13, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/list.h:6, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/wait.h:14, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/fs.h:12, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/capability.h:17, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/binfmts.h:5, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/sched.h:9, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/mm.h:4, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/slab.h:14, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/proc_fs.h:5, 
                 from init/main.c:15: 
/usr/src/linux-2.4.22-gentoo-r4/include/asm/processor.h:56: 
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function) 
/usr/src/linux-2.4.22-gentoo-r4/include/asm/processor.h:56: requested 
alignment is not a constant 
In file included from /usr/src/linux-2.4.22-gentoo-r4/include/linux/mm.h:12, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/slab.h:14, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/proc_fs.h:5, 
                 from init/main.c:15: 
/usr/src/linux-2.4.22-gentoo-r4/include/linux/mmzone.h:44: 
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function) 
/usr/src/linux-2.4.22-gentoo-r4/include/linux/mmzone.h:44: requested alignment 
is not a constant 
In file included from /usr/src/linux-2.4.22-gentoo-r4/include/asm/hardirq.h:6, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/interrupt.h:52, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/asm/smplock.h:9, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/smp_lock.h:16, 
                 from init/main.c:24: 
/usr/src/linux-2.4.22-gentoo-r4/include/linux/irq.h:65: 
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function) 
/usr/src/linux-2.4.22-gentoo-r4/include/linux/irq.h:65: requested alignment is 
not a constant 
In file included 
from /usr/src/linux-2.4.22-gentoo-r4/include/linux/interrupt.h:52, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/asm/smplock.h:9, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/smp_lock.h:16, 
                 from init/main.c:24: 
/usr/src/linux-2.4.22-gentoo-r4/include/asm/hardirq.h:19: 
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function) 
/usr/src/linux-2.4.22-gentoo-r4/include/asm/hardirq.h:19: requested alignment 
is not a constant 
In file included from /usr/src/linux-2.4.22-gentoo-r4/include/asm/smplock.h:9, 
                 from /usr/src/linux-2.4.22-gentoo-r4/include/linux/smp_lock.h:16, 
                 from init/main.c:24: 
/usr/src/linux-2.4.22-gentoo-r4/include/linux/interrupt.h:135: 
`CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function) 
/usr/src/linux-2.4.22-gentoo-r4/include/linux/interrupt.h:135: requested 
alignment is not a constant 
init/main.c: In function `start_kernel': 
init/main.c:377: `CONFIG_X86_L1_CACHE_SHIFT' undeclared (first use in this 
function) 
init/main.c:377: (Each undeclared identifier is reported only once 
init/main.c:377: for each function it appears in.) 
make: *** [init/main.o] Error 1 

Expected Results:
Comment 1 Stefan Tittel 2004-01-09 09:30:12 UTC
Created attachment 23489 [details]
The .config used.
Comment 2 Brian Jackson (RETIRED) gentoo-dev 2004-01-09 11:27:08 UTC
*** Bug 37723 has been marked as a duplicate of this bug. ***
Comment 3 Anders Bruun Olsen 2004-01-09 13:34:16 UTC
Created attachment 23511 [details]
Another config that causes the same error.

I also have this exact problem and have attached my .config.
Comment 4 James Kyte 2004-01-09 21:06:50 UTC
Created attachment 23527 [details, diff]
A patch that seems to work

patch with -p1
Comment 5 Sean O'Leary 2004-01-09 23:42:48 UTC
Created attachment 23532 [details, diff]
Previous patch broke "make oldconfig"

Adding (gcc>3.1) to the processor name tag broke "make oldconfig".
Here's a tweaked patch.
Comment 6 Brian Jackson (RETIRED) gentoo-dev 2004-01-10 00:01:31 UTC
Actually neither of them are sufficient, I've fixed it locally, but I appreciate the help from you guys. Too often I get bug reports that just say "It's broken, fix it", and I have to practically beat what's really wrong out of the reporter, not to mention fix it all by myself.
Comment 7 Sean O'Leary 2004-01-10 00:02:41 UTC
Comment on attachment 23532 [details, diff]
Previous patch broke "make oldconfig"

gentoo-sources-2.4.22-r4-xp2.patch

The addition of the (gcc>3.1) tag broke "make oldconfig"
Thanks for the inital patch, James Kyte <jkyte@rogers.com>

--- a/arch/i386/config.in	2004-01-09 23:18:13.000000000 -0500
+++ b/arch/i386/config.in	2004-01-09 23:29:53.000000000 -0500
@@ -42,7 +42,7 @@
	 K6/K6-II/K6-III			CONFIG_MK6 \
	 K6-II/K6-III				CONFIG_MK62 \
	 Athlon/Duron/K7			CONFIG_MK7 \
-	 Athlon-XP				CONFIG_MK7XP \
+	 Athlon-XP				CONFIG_MXP31 \
	 Athlon-MP				CONFIG_MK7MP \
	 Opteron/Athlon64/Hammer/K8		CONFIG_MK8 \
	 Elan					CONFIG_MELAN \
Comment 8 Sean O'Leary 2004-01-10 00:04:52 UTC
Thanks, Brian.

I don't know what I did to screw up that little patch, but I sure did.  :)
Comment 9 Brian Jackson (RETIRED) gentoo-dev 2004-01-10 07:34:59 UTC
*** Bug 37776 has been marked as a duplicate of this bug. ***
Comment 10 Marco Mascherpa (RETIRED) gentoo-dev 2004-01-11 17:37:34 UTC
just my two cents to add that i experienced the same problem
with athlon-mp and this line

Athlon-MP                              CONFIG_MK7MP \

should be replaced by this one

Athlon-MP                              CONFIG_MMP31 \

for compilation to work.
Comment 11 Jeff Quasarano 2004-01-12 23:20:37 UTC
Just to add a little to this (appears it is hinted at by iggy, but just to be safe:

The patch mentioned above does not resolve the issue, in either capacity (removing the gcc addition does not correct the failure of 'make oldconfig' to complete successfully), at least not as it relates to 'genkernel' usage.  (I didn't have time to try do a manual kernel to test it there).

Played with the files a bit, but even correcting config.in, as I mentioned and is mentioned above, will then break 'make oldconfig'.  There are also some mistakes in Makefile which could be to blame.  I'm sure its been easily diagnosed already, but thought I would clarify the current situation for anyone trying to use the above patch(es) with respect to using genkernel and gentoo-sources.
Comment 12 Brian Jackson (RETIRED) gentoo-dev 2004-01-14 08:46:37 UTC
*** Bug 38160 has been marked as a duplicate of this bug. ***
Comment 13 Brian Jackson (RETIRED) gentoo-dev 2004-01-14 09:30:08 UTC
Fixed in -r5, which is in cvs. give it a little while, then sync and update. Thanks for all the help guys.