Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 424579

Summary: sys-kernel/genkernel-3.4.24_p1 fails to build busybox - util-linux/mkfs_ext2.c:51:27: fatal Kerror: K linux/ext2_fs.h: No such file or directory
Product: Gentoo Hosted Projects Reporter: Michael Mol <mikemol>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: bkohler, clemente.aguiar, gentoo, gregg.casillo, stephane
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: genkernel output including build failure
kernel configuration
emerge --info
genkernel output with BUSYBOX_VER=1.20.1

Description Michael Mol 2012-07-03 01:31:51 UTC
Created attachment 317011 [details]
genkernel output including build failure

On a fresh system, with =sys-kernel/gentoo-sources-3.3.8 and =sys-kernel/genkernel-3.4.24_p1, I tried to build my kernel, modules and initramfs using this command:

genkernel --kernel-config=/root/kernel-config all

I get a build failure:

util-linux/mkfs_ext2.c:51:27: fatal error: linux/ext2_fs.h: No such file or directory

It's probably worth noting that I have ext2 and ext3 disabled. I have ext4 *enabled*, as the kernels' ext4 support is sufficient to mount ext2 and ext3 filesystems.

Kernel config forthcoming.
Comment 1 Michael Mol 2012-07-03 01:32:39 UTC
Created attachment 317013 [details]
kernel configuration
Comment 2 Michael Mol 2012-07-03 01:35:45 UTC
Created attachment 317015 [details]
emerge --info

Including the emerge --info. Not that I think it will do terribly much good; I really don't know what kind of parameters or environment genkernel provides.
Comment 3 Stéphane BARBARAY 2012-07-03 05:37:55 UTC
genkernel 3.4.24_p1 is using its own busybox which is 1.19.3 with patches (see in /var/cache/genkernel/src/) but unfortunately that version of busybox won't compile with kernel 3.4 headers because ext2_fs.h were moved

This doesn't happen with genkernel 3.4.35 but it is masked and require other masked dependencies like >=openrc-0.9.9

see also https://bugs.gentoo.org/show_bug.cgi?id=419511

as a workaround (but without patches), you can try comment #4 : https://bugs.gentoo.org/show_bug.cgi?id=419511#c4
Comment 4 Michael Mol 2012-07-04 13:14:27 UTC
Created attachment 317127 [details]
genkernel output with BUSYBOX_VER=1.20.1

BUSYBOX_VER="1.20.1" genkernel --kernel-config=/root/kern_config --lvm --mdadm --disklabel all

and

export BUSYBOX_VER="1.20.1"
genkernel --kernel-config=/root/kern_config --lvm --mdadm --disklabel all

give the same error and output.
Comment 5 Stéphane BARBARAY 2012-07-04 14:23:18 UTC
You have to edit /etc/genkernel.conf and copy busybox 1.20 distfile to genkernel cache dir

Btw, patches included with genkernel's busybox won't be available, this could cause troubles if you need some special functionalities in initrd
Comment 6 Michael Mol 2012-07-04 20:40:49 UTC
Ah. I'd done the copy, but I hadn't noticed /etc/genkernel.conf. Trying again.

How do I look at the patch set applied to busybox, to see if it includes features I need?
Comment 7 Michael Mol 2012-07-05 12:30:59 UTC
As it turns out, it Works For Me.
Comment 8 Gregg Casillo 2012-07-06 17:10:29 UTC
I have been unable to compile a kernel with genkernel since at least gentoo-sources-3.4.0, and I'm running into the issue described here. I've tried editing my /etc/genkernel.conf accordingly and copying the corresponding busybox tarball to /var/cache/genkernel/src directory, but nothing seems to work, and I run into the problem mentioned here:

http://forums.gentoo.org/viewtopic-p-7064238.html

I need genkernel to work on this particular server. Any help would be appreciated.
Comment 9 Ben Kohler gentoo-dev 2012-07-07 17:02:26 UTC
This is the same as bug #419511 right?
Comment 10 Stéphane BARBARAY 2012-07-07 20:37:20 UTC
Yes indeed
Comment 11 Michael Mol 2012-07-07 20:48:23 UTC
I'll venture a guess this should be marked as a duplicate of bug #419511?
Comment 12 Sebastian Pipping gentoo-dev 2012-07-08 18:39:25 UTC
I'm closing this as a duplicate of bug #417261.

If using genkernel 3.4.36 is an option to you, that might help.
If you want/need to stick with stable genkernel, you will need to wait for 3.4.24_p2 to go stable (bug #425360).

*** This bug has been marked as a duplicate of bug 417261 ***
Comment 13 Gregg Casillo 2012-07-10 19:12:51 UTC
Not sure if my issue is related to this, but I needed to patch lpfc_scsi.c according to this forum post:

http://forums.gentoo.org/viewtopic-p-7056926.html#7056926

Applying that patch allowed genkernel-3.4.38 to build and install a kernel from gentoo-sources-3.4.4. I'm willing to bet it resolved the issues I was seeing while attempting to build kernels > 3.3.5. Should I open a new bug report for this, because that patch would seem to be quite necessary now for genkernel users?
Comment 14 Michael Mol 2012-07-10 19:15:36 UTC
Definitely file a different bug; that's for a much newer version of genkernel than this bug's about, and it's about a different issue.
Comment 15 Gregg Casillo 2012-07-10 19:22:04 UTC
Let me clarify that my problem was with any version of genkernel that tried to build kernels from gentoo-sources newer than 3.3.5. My issue seems to be a bug in the kernel code, i.e. gentoo-sources, rather than genkernel. I'll file a separate bug report.