Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166145 - >=sys-kernel/gentoo-sources-2.6.19 is missing asm/suspend.h
Summary: >=sys-kernel/gentoo-sources-2.6.19 is missing asm/suspend.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC Linux
: High normal
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
: 150449 (view as bug list)
Depends on:
Blocks: 156814
  Show dependency tree
 
Reported: 2007-02-09 23:52 UTC by Lars Weiler (RETIRED)
Modified: 2007-07-22 16:21 UTC (History)
2 users (show)

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


Attachments
diff between the first and second run of genkernel on the pegasos (genkernel-pegasos-run.diff,3.90 KB, text/plain)
2007-02-15 00:23 UTC, Lars Weiler (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Weiler (RETIRED) gentoo-dev 2007-02-09 23:52:22 UTC
When I compile >=sys-kernel/gentoo-sources-2.6.19 with genkernel on my Pegasos (or for the Pegasos), it fails with an error about missing asm/suspend.h.  The file is available, but in include/asm-ppc.  This is a leftover from older kernels, as those header-files moved into include/asm-powerpc for include/asm.

When I copy include/asm-ppc/suspend.h into include/asm-powerpc/ everything compiles fine.  We need a patch for the copy, so that the compilation with genkernel runs fine and I can use it for creating the release-CDs.

Suggestions from the PPC-team: Is my workaround evil or can we use it?  Probably this is even an upstream bug?
Comment 1 Lars Weiler (RETIRED) gentoo-dev 2007-02-10 00:23:32 UTC
Somehow I missed to add ppc in the CC.
Comment 2 Daniel Drake (RETIRED) gentoo-dev 2007-02-10 01:18:20 UTC
Please post the full error message.
Comment 3 ebfe 2007-02-10 01:34:02 UTC
some old headers have gone from us, others have changed location with 2.6.19; upstream will need to fix the package (whatever it is you are talking about) so that it can compile with 2.6.19
Comment 4 Lars Weiler (RETIRED) gentoo-dev 2007-02-10 03:23:35 UTC
Here's the error:

 HOSTCC  scripts/mod/sumversion.o
In file included from arch/ppc/kernel/asm-offsets.c:18:
include/linux/suspend.h:5:25: error: asm/suspend.h: No such file or directory
make[1]: *** [arch/ppc/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....

I fixed it with another pre-processor-rule in linux/suspend.h:
#if defined(CONFIG_PPC32)
#include <asm-ppc/suspend.h>
#endif
and took out the CONFIG_PPC32 from the already defined rule.

Then I get an error with asm/highmem.h missing.  Again, I added a pre-processor-rule in linux/highmem.h:
#if defined(CONFIG_PPC32)
#include <asm-ppc/highmem.h>
#else
#include <asm/highmem.h>
#endif

Which brings me the next problem in include/asm/ide.h:
arch/ppc/kernel/time.c:63:27: error: asm/8xx_immap.h: No such file or directory

Well, I already know the game: sed -i "s:#include <asm/mpc8xx.h>:#include <asm-ppc/mpc8xx.h>:" include/asm/ide.h

And the next error.
arch/powerpc/kernel/setup_32.c:21:26: error: asm/residual.h: No such file or directory
arch/powerpc/kernel/setup_32.c:27:26: error: asm/amigappc.h: No such file or directory

I give up and copy every missing file from include/asm-ppc into include/asm.

I'll let you know if that helps.
Comment 5 Lars Weiler (RETIRED) gentoo-dev 2007-02-11 13:46:42 UTC
It does not help.  But now it seems to be a genkernel-problem.  Whenever genkernel compiles in busybox, I get this error.  When I omit compiling of the busybox, it works.

But speaking of release-building we need that busybox compiled...
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2007-02-14 03:48:23 UTC
Lars:  What happens if you use this config?

http://www.ppczone.org/downloads/config-2.6.16-pegasos
Comment 7 Lars Weiler (RETIRED) gentoo-dev 2007-02-15 00:22:34 UTC
(In reply to comment #6)
> Lars:  What happens if you use this config?
> 
> http://www.ppczone.org/downloads/config-2.6.16-pegasos

Tried with that config, which breaks as well.

But I chrooted into the catalyst-tmp-dir and run genkernel a second time, and this time I had success.

So, it ever fails on the first time but succeeds at the second time.  I made a diff between the two genkernel-outputs of the first and second run (the first run was with --mrproper).  As you can see, the busybox will not be compiled during the second run.

But I can also imagine, that the order of the compile-instructions are wrong and that there needs to be called something one time before it can be used.  Probably I should make a diff between the directories after the first and second run.
Comment 8 Lars Weiler (RETIRED) gentoo-dev 2007-02-15 00:23:33 UTC
Created attachment 110217 [details]
diff between the first and second run of genkernel on the pegasos
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2007-02-15 13:33:13 UTC
So you added mrproper the first time, or genkernel/catalyst did ?
Comment 10 Lars Weiler (RETIRED) gentoo-dev 2007-02-16 00:22:37 UTC
(In reply to comment #9)
> So you added mrproper the first time, or genkernel/catalyst did ?

I did.  But somehow it was called in the second run as well.  See the diff, as the genkernel-options are mentioned as well.

I created a diff of the two directories after the first and second run as well.  There are some lines which seem to be very interesting:

diff -ur linux-2.6.19-gentoo-r5.first/scripts/mod/.elfconfig.h.cmd linux-2.6.19-gentoo-r5/scripts/mod/.elfconfig.h.cmd
--- linux-2.6.19-gentoo-r5.first/scripts/mod/.elfconfig.h.cmd   2007-02-15 00:34:28.000000000 +0000
+++ linux-2.6.19-gentoo-r5/scripts/mod/.elfconfig.h.cmd 2007-02-15 00:35:24.000000000 +0000
@@ -1 +1 @@
-cmd_scripts/mod/elfconfig.h := scripts/mod/mk_elfconfig ppc < scripts/mod/empty.o > scripts/mod/elfconfig.h
+cmd_scripts/mod/elfconfig.h := scripts/mod/mk_elfconfig powerpc < scripts/mod/empty.o > scripts/mod/elfconfig.h
diff -ur linux-2.6.19-gentoo-r5.first/scripts/mod/.empty.o.cmd linux-2.6.19-gentoo-r5/scripts/mod/.empty.o.cmd
--- linux-2.6.19-gentoo-r5.first/scripts/mod/.empty.o.cmd       2007-02-15 00:34:28.000000000 +0000
+++ linux-2.6.19-gentoo-r5/scripts/mod/.empty.o.cmd     2007-02-15 00:35:23.000000000 +0000
@@ -1,4 +1,4 @@
-cmd_scripts/mod/empty.o := gcc -Wp,-MD,scripts/mod/.empty.o.d  -nostdinc -isystem /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Iarch/ppc -Iarch/ppc/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -Iarch/ppc -msoft-float -pipe -ffixed-r2 -mmultiple  -mno-altivec -mstring -Wa,-maltivec -fomit-frame-pointer  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign    -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(empty)"  -D"KBUILD_MODNAME=KBUILD_STR(empty)" -c -o scripts/mod/empty.o scripts/mod/empty.c
+cmd_scripts/mod/empty.o := gcc -Wp,-MD,scripts/mod/.empty.o.d  -nostdinc -isystem /usr/lib/gcc/powerpc-unknown-linux-gnu/4.1.1/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Iarch/powerpc -Iarch/powerpc/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -msoft-float -pipe -Iarch/powerpc -ffixed-r2 -mmultiple -mno-altivec -funit-at-a-time -mstring -mcpu=powerpc -Wa,-maltivec -fomit-frame-pointer  -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign    -D"KBUILD_STR(s)=\#s" -D"KBUILD_BASENAME=KBUILD_STR(empty)"  -D"KBUILD_MODNAME=KBUILD_STR(empty)" -c -o scripts/mod/empty.o scripts/mod/empty.c
 
So, in the first run it includes arch/ppc and in the second run arch/powerpc.  I wonder where that change is coming from?
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2007-02-24 18:13:57 UTC
Looks like a genkernel bug
Comment 12 Joe Jezak (RETIRED) gentoo-dev 2007-05-17 04:27:39 UTC
*** Bug 150449 has been marked as a duplicate of this bug. ***
Comment 13 Joe Jezak (RETIRED) gentoo-dev 2007-07-22 16:21:09 UTC
Fixed by new kenrel headers (2.6.21 is now stable).