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

Bug 391845

Summary: sys-kernel/genkernel-3.4.20 initramfs creation fails for e2fsprogs-1.41.14 (was initramfs: busybox can't compile with glibc 2.14.1)
Product: Gentoo Linux Reporter: Massimo Fantin <massimo.fantin>
Component: [OLD] Core systemAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED NEEDINFO    
Severity: normal CC: clement.cc, donald.r.gray, HidekiAI, non7top
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 379481    
Bug Blocks:    
Attachments: e2fsprogs-genkernel-fix-host.diff
Full genkernel output of busybox failure

Description Massimo Fantin 2011-11-25 09:46:29 UTC
genkernel initramfs 

can't compile busybox 1.18.1(included on genkernel 3.4.20)  or busybox 1.19.1 
with glibc 2.14.1

same error of bugs https://bugs.gentoo.org/show_bug.cgi?id=379481


  LINK    busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -march=i386 -mpreferred-stack-boundary=2 -static -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--start-group applets/built-in.o archival/lib.a archival/libarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lcrypt -lm -Wl,--end-group
==========
coreutils/lib.a(id.o): In function `get_groups':
id.c:(.text.get_groups+0x11): warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(bb_pwd.o): In function `xgetgrgid':
bb_pwd.c:(.text.xgetgrgid+0x5): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
archival/libarchive/lib.a(data_extract_all.o): In function `data_extract_all':
data_extract_all.c:(.text.data_extract_all+0x2c4): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
shell/lib.a(ash.o): In function `argstr':
ash.c:(.text.argstr+0xe4): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(bb_pwd.o): In function `xgetpwuid':
bb_pwd.c:(.text.xgetpwuid+0x5): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(xconnect.o): In function `str2sockaddr':
xconnect.c:(.text.str2sockaddr+0xeb): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(inet_common.o): In function `INET_rresolve':
inet_common.c:(.text.INET_rresolve+0xb5): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
util-linux/lib.a(mount.o): In function `nfsmount':
mount.c:(.text.nfsmount+0xbc): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(xconnect.o): In function `bb_lookup_port':
xconnect.c:(.text.bb_lookup_port+0x3b): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

emerge sys-apps/busybox-1.19.1 compile right.
only in genkernel crash.

--------------------------------






Reproducible: Always
Comment 1 Massimo Fantin 2011-11-25 10:17:25 UTC
i set in 
  /usr/share/genkernel/defaults/busy-config

CONFIG_FEATURE_MOUNT_NFS=n

Now compile fine...
Comment 2 Donald R. Gray Jr 2011-11-26 21:56:17 UTC
Even worse on freshly installed ~amd64 no-multilib, fails at e2fsprogs

* Gentoo Linux Genkernel; Version 3.4.20
* Running with options: initramfs

* Linux Kernel 3.1.1-hardened-r1 for x86_64...
* e2fsprogs: >> Configuring...
Generating configuration file for e2fsprogs version 1.41.14
Release date is December, 2010
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/var/tmp/genkernel/29984.2834.24586.19917/e2fsprogs-1.41.14':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
* Gentoo Linux Genkernel; Version 3.4.20
* Running with options: initramfs

* ERROR: Configuring e2fsprogs failed!
* -- Grepping log... --
* -- End log... --
* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs
Comment 3 Donald R. Gray Jr 2011-11-26 22:16:55 UTC
Created attachment 293889 [details, diff]
e2fsprogs-genkernel-fix-host.diff

This change allows e2fsprogs to compile on my system.
Comment 4 Donald R. Gray Jr 2011-11-26 22:22:17 UTC
Created attachment 293891 [details]
Full genkernel output of busybox failure
Comment 5 Ulenrich 2011-11-28 17:29:16 UTC
Donalds e2fs-bild patch doesnt help me. 
And I wonder why KERNEL_ARCH is x86 (see below) even if i had set it x86_64 ?
---
coreutils/lib.a(id.o): In function `get_groups':
id.c:(.text.get_groups+0xe): warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(bb_pwd.o): In function `xgetgrgid':
bb_pwd.c:(.text.xgetgrgid+0x4): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
archival/libarchive/lib.a(data_extract_all.o): In function `data_extract_all':
data_extract_all.c:(.text.data_extract_all+0x307): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
shell/lib.a(ash.o): In function `argstr':
ash.c:(.text.argstr+0xf8): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(bb_pwd.o): In function `xgetpwuid':
bb_pwd.c:(.text.xgetpwuid+0x4): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(xconnect.o): In function `str2sockaddr':
xconnect.c:(.text.str2sockaddr+0x102): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(inet_common.o): In function `INET_rresolve':
inet_common.c:(.text.INET_rresolve+0xbd): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
util-linux/lib.a(mount.o): In function `nfsmount':
mount.c:(.text.nfsmount+0xd4): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(xconnect.o): In function `bb_lookup_port':
xconnect.c:(.text.bb_lookup_port+0x41): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
--
* Gentoo Linux Genkernel; Version 3.4.20
* Running with options: initramfs
* KERNEL_ARCH=x86
* Clearing cache dir contents from /var/cache/genkernel

* ERROR: Failed to compile the "all" target...
---
Comment 6 Ulenrich 2011-11-28 17:39:30 UTC
Thats funny:
- Massimos link in this threads first message shows the exact same error output in that bug. But 2 weeks erlier. 
- I can successfully build busybox on its own (emerge busybox)

I think most probably there is a newer patch in the ebuild of busybox,
but which is not considered when using genkernel!
Comment 7 Ulenrich 2011-11-28 17:52:00 UTC
(In reply to comment #1)
> i set in 
>   /usr/share/genkernel/defaults/busy-config
> 
> CONFIG_FEATURE_MOUNT_NFS=n
> 
> Now compile fine...

This workaround helps me ... now all fine is building an initramfs.
Comment 8 Serge FELIX 2011-11-29 14:13:24 UTC
(In reply to comment #7)
> (In reply to comment #1)
> > i set in 
> >   /usr/share/genkernel/defaults/busy-config
> > 
> > CONFIG_FEATURE_MOUNT_NFS=n
> > 
> > Now compile fine...
> 
> This workaround helps me ... now all fine is building an initramfs.

Same problem for me and the workaround works for me too
Comment 9 Vladimir Berezhnoy 2011-12-17 20:14:42 UTC
(In reply to comment #1)
> i set in 
>   /usr/share/genkernel/defaults/busy-config
> 
> CONFIG_FEATURE_MOUNT_NFS=n
> 
> Now compile fine...

Confirming the bug an the workaround  with sys-kernel/genkernel-3.4.20
Comment 11 Sebastian Pipping gentoo-dev 2012-01-04 14:45:28 UTC
(In reply to comment #3)
> Created attachment 293889 [details, diff] [details, diff]
> e2fsprogs-genkernel-fix-host.diff
> 
> This change allows e2fsprogs to compile on my system.

Donald, is this about cross compilation?

On my ~amd64 machine this very version of e2fsprogs compiles fine from withing busybox (with an older version of glibc, though).  Any ideas how to reproduce this problem?
Comment 12 Ulenrich 2012-01-08 08:44:40 UTC
genkernel seems to never respect ARCH x86_64 , it ever displays
ARCH=x86 with loglevel=2
Therefore this "cross" problem?
Comment 13 Xake 2012-01-08 09:25:40 UTC
(In reply to comment #12)
> genkernel seems to never respect ARCH x86_64 , it ever displays
> ARCH=x86 with loglevel=2
> Therefore this "cross" problem?

I guess what you see here is that fact that the kernel itself only has ARCH x86 (x86 and x86_64 were unified a couple of releases back).
Comment 14 Ulenrich 2012-01-08 10:14:48 UTC
@Xake, you talk about linux source-tree integration?

/me: have this output:

genkernel initramfs
* Gentoo Linux Genkernel; Version 3.4.20
* Running with options: initramfs

* KERNEL_ARCH=x86
* Clearing cache dir contents from /var/cache/genkernel
*        >> removing /var/cache/genkernel/busybox-1.18.5-x86_64.tar.bz2
*        >> removing /var/cache/genkernel/blkid-1.42-x86_64.bz2
*        >> removing /var/cache/genkernel/mdadm-3.1.4-x86_64.tar.bz2
* Linux Kernel 3.1.8-0.bfs.noinitrd for x86_64...

See KERNEL_ARCH above! I got refuge by noinitrd ...
Comment 15 Xake 2012-01-08 11:51:10 UTC
(In reply to comment #14)
> @Xake, you talk about linux source-tree integration?
> 
> /me: have this output:
> 
> genkernel initramfs
> * Gentoo Linux Genkernel; Version 3.4.20
> * Running with options: initramfs
> 
> * KERNEL_ARCH=x86
> * Clearing cache dir contents from /var/cache/genkernel
> *        >> removing /var/cache/genkernel/busybox-1.18.5-x86_64.tar.bz2
> *        >> removing /var/cache/genkernel/blkid-1.42-x86_64.bz2
> *        >> removing /var/cache/genkernel/mdadm-3.1.4-x86_64.tar.bz2
> * Linux Kernel 3.1.8-0.bfs.noinitrd for x86_64...
> 
> See KERNEL_ARCH above! I got refuge by noinitrd ...

Ok, I went back to the code and took a look. KERNEL_ARCH should ALWAYS be "x86" for a processors based there upon (which holds true for both x86_32 and x86_64), however ARCH should be the same as "uname -m" unless you want to crosscompile (in which case you want to use ARCH_OVERRIDE).

However your output looks strange...
So please try to emerge genkernel-3.4.21.2 (latest in ~arch) and run it one time with the stock configuration, so we are sure nothing in your /etc/genkernel.conf has gotten screwed.

If this does not work, please post your genkernel.conf, emerge --info and "uname -m" together with your full genkernel commandline and genkernel.log.
Comment 16 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-10-13 23:00:19 UTC
No response from user for nearly a user.
Presuming this is fixed with the changes in the meantime (test ~arch to confirm).