# genkernel won't build initrd

## Rion

i tried various versions of kernel but with genkernel i constantly get next error

 *Quote:*   

> * busybox: >> Configuring...
> 
> * busybox: >> Compiling...
> 
> * ERROR: Failed to compile the "all" target...
> ...

 

genkernel-3.4.7_pre3

emerge --info

 *Quote:*   

> Portage 2.1.2-r12 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.5.90.20070214-r0, 2.6.20-viper3 x86_64)
> 
> =================================================================
> 
> System uname: 2.6.20-viper3 x86_64 AMD Athlon(tm) 64 Processor 3200+
> ...

 

week or more ago everything was fine. i've updated gcc and maybe something else

----------

## lmmsci

I had the same problem.

Check which version of linux-headers you have. I suppose that it is version 2.6.20-r1. If try to look for /usr/include/asm/page.h file you'll find nothing and this file is necessary for kernel compilation as you can see in your logs:

 *Quote:*   

> /var/tmp/genkernel/6528.19024.3323.4812/busybox-1.1.3+gentoo/libbb/procps.c:15:22: error: asm/page.h: No such file or directory 

 

 Just downgrade linux-headers to version 2.6.20:

```
emerge -va =sys-kernel/linux-headers-2.6.20
```

or more drastically (e.g.):

```
emerge -va /usr/portage/sys-kernel/linux-headers/linux-headers-2.6.20.ebuild
```

- if path to your portage tree is /usr/portage of course.

I think that after that procedure, removing of kernel sources (e.g. gentoo-sources) and installing them again is good idea (and surely save for your purpose).

It should work.

Best regards.

----------

## --raptor--

try

```
ln -s /usr/src/linux/include/asm/page.h /usr/include/asm/
```

----------

## kernelOfTruth

 *lmmsci wrote:*   

> I had the same problem.
> 
> Check which version of linux-headers you have. I suppose that it is version 2.6.20-r1. If try to look for /usr/include/asm/page.h file you'll find nothing and this file is necessary for kernel compilation as you can see in your logs:
> 
>  *Quote:*   /var/tmp/genkernel/6528.19024.3323.4812/busybox-1.1.3+gentoo/libbb/procps.c:15:22: error: asm/page.h: No such file or directory  
> ...

 

thanks, that worked for me, too   :Smile: 

----------

## Rion

thanks, works for me too

----------

## lmmsci

So, if it works, I think adding [SOLVED] to subject of this thread is very good idea.   :Wink: 

----------

## mightymephisto

I actually found that by using a more recent version of busybox solved my problem.

```
FEATURES="keepwork" emerge busybox
```

which kept the source code in /var/tmp/portage/sys-apps/busybox-1.4.1-r2/work/busybox-1.4.1. I used that to create the .tar.bz2 file package which genkernel uses.

```
cd /tmp

cp -R /var/tmp/portage/sys-apps/busybox-1.4.1-r2/work/busybox-1.4.1 busybox-1.4.1-r2

tar -jcf busybox-1.4.1-r2.tar.bz2 busybox-1.4.1-r2

mv busybox-1.4.1-r2.tar.bz2 /usr/share/genkernel/pkg/

```

Then I edited /etc/genkernel.conf to use the newer version of busybox, by changing BUSYBOX_VER to 1.4.1-r2

```
BUSYBOX_VER="1.4.1-r2"
```

Then genkernel worked as normal   :Very Happy: 

----------

## System_Failure

 *mightymephisto wrote:*   

> I actually found that by using a more recent version of busybox solved my problem.
> 
> ```
> FEATURES="keepwork" emerge busybox
> ```
> ...

 

while a little bit longer of a solution, I like it better because it keeps things up-to-date. Seems to have solved the problem prefectly^^ thank you

----------

## ToeiRei

Great thing. You should file a bug that the package for genkernel gets updated...

Nevertheless it is strange that genkernel needs its own packages - why can't it just build busybox?

Rei

----------

## richard77

lmmsci suggestion worked also for me.

Should this be reported as a genkernel bug?

----------

## Soultaker

I encountered the same problem, and fixed it by unmasking the latest version of genkernel, 3.4.8, by adding "genkernel ~x86" to /etc/portage/package.use.

So if it was a bug in genkernel, it has been fixed by now, and it's just annoying that the latest stable version of kernel-headers does not work with the latest stable version of genkernel.Last edited by Soultaker on Thu Jul 19, 2007 3:34 pm; edited 1 time in total

----------

## SkyLine

 *lmmsci wrote:*   

> I had the same problem.
> 
> Check which version of linux-headers you have. I suppose that it is version 2.6.20-r1. If try to look for /usr/include/asm/page.h file you'll find nothing and this file is necessary for kernel compilation as you can see in your logs:
> 
>  *Quote:*   /var/tmp/genkernel/6528.19024.3323.4812/busybox-1.1.3+gentoo/libbb/procps.c:15:22: error: asm/page.h: No such file or directory  
> ...

 

Same Problem.

Is have been solved by genkernel-3.4.8.

```

ACCEPT_KEYWORDS="~x86" emerge -v genkernel

```

Thanks another information.

----------

