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

Bug 413247

Summary: sys-kernel/genkernel-3.4.20: should not build busybox with NFS support
Product: Gentoo Hosted Projects Reporter: Giampaolo Tomassoni <giampaolo>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED FIXED    
Severity: major CC: barzog, n.czempin, swdrumm
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 415483    
Bug Blocks: 381391    
Attachments: Complete genkernel log
genkernel log as requested

Description Giampaolo Tomassoni 2012-04-23 13:01:39 UTC
This is possibly an upstream problem (if a all).

The recently-stabilized sys-libs/glibc-2.14.1-r3 seems not supply any xdr_/pmap_ symbols anymore.

This causes troubles to 'genkernel initramfs' when going to build a static version of sys-apps/busybox, thereby possibly impairing kernel upgrades and normal distribution behaviour.

Reproducible: Always

Steps to Reproduce:
1.upgrade to sys-libs/glibc-2.14.1-r3
2.clean cached packages from /var/cache/genkernel
3.configure genkernel to build busybox (BUSYBOX="yes" in /etc/genkernel.conf)
3.issue 'genkernel initramfs'
Actual Results:  
xconnect.c:(.text.bb_lookup_port+0x41): warning: Using 'getservbyname' in statically linked applications requires at r
untime the shared libraries from the glibc version used for linking
util-linux/lib.a(mount.o): In function `xdr_fhstatus':
mount.c:(.text.xdr_fhstatus+0xd): undefined reference to `xdr_u_int'
mount.c:(.text.xdr_fhstatus+0x2e): undefined reference to `xdr_opaque'
util-linux/lib.a(mount.o): In function `xdr_dirpath':
mount.c:(.text.xdr_dirpath+0x6): undefined reference to `xdr_string'
util-linux/lib.a(mount.o): In function `xdr_mountres3':
mount.c:(.text.xdr_mountres3+0xd): undefined reference to `xdr_enum'
mount.c:(.text.xdr_mountres3+0x2c): undefined reference to `xdr_bytes'
mount.c:(.text.xdr_mountres3+0x46): undefined reference to `xdr_int'
mount.c:(.text.xdr_mountres3+0x55): undefined reference to `xdr_array'
util-linux/lib.a(mount.o): In function `nfsmount':
mount.c:(.text.nfsmount+0x852): undefined reference to `pmap_getmaps'
mount.c:(.text.nfsmount+0x987): undefined reference to `clntudp_create'
mount.c:(.text.nfsmount+0x9c9): undefined reference to `clnttcp_create'
mount.c:(.text.nfsmount+0x9f0): undefined reference to `clnt_spcreateerror'
mount.c:(.text.nfsmount+0xa02): undefined reference to `authunix_create_default'
mount.c:(.text.nfsmount+0xa9a): undefined reference to `clnt_sperror'
mount.c:(.text.nfsmount+0xac1): undefined reference to `clnt_sperror'
mount.c:(.text.nfsmount+0xc79): undefined reference to `bindresvport'
mount.c:(.text.nfsmount+0xcc5): undefined reference to `pmap_getport'
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1


Expected Results:  
Success in busibox compilation.

From the error above, you may see the first undefined symbol is 'xdr_u_int'.

Issuing 'nm -A /usr/lib/libc.a 2>/dev/null | grep xdr_' in a glibc-2.14.1-r3 system I get no output (i.e.: no match).

Issuing the same command in a sys-libs/glibc-2.13-r4 one, I get:

	/usr/lib/libc.a:authuxprot.o:	U xdr_u_int
	/usr/lib/libc.a:rpc_cmsg.o:	U xdr_u_int
	/usr/lib/libc.a:xdr.o:000000f0	T xdr_u_int
	/usr/lib/libc.a:xdr_array.o:	U xdr_u_int
	/usr/lib/libc.a:key_prot.o:	U xdr_u_int

Anybody do replicates this?
Comment 1 Giampaolo Tomassoni 2012-04-23 13:03:54 UTC
Created attachment 309851 [details]
Complete genkernel log

The complete genkernel log from the failing system
Comment 2 SpanKY gentoo-dev 2012-04-24 15:29:09 UTC
use libtirpc, or disable userspace nfs support in busybox (not really necessary with recent kernels), or don't build statically
Comment 3 Giampaolo Tomassoni 2012-04-24 15:41:43 UTC
This happens using sys-kernel/genkernel-3.4.20 from a stable box with stock busybox setup (no BUSYBOX_CONFIG="/path/to/file" defined in /etc/genkernel.conf).

May this mean that a more recent, non-stable, genkernel version invokes busybox compilation with the right options?

If this is the case, we should probably route this case to the genkernel team in order to stabilize that version. People running stable system can't successfully run genkernel otherwise.
Comment 4 SpanKY gentoo-dev 2012-04-24 19:52:18 UTC
(In reply to comment #3)

i have no idea what genkernel does
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2012-04-25 04:46:23 UTC
I can confirm that this seems to be fixed in 3.4.30.  Didn't have time to debug more though.
Comment 6 Giampaolo Tomassoni 2012-04-25 09:47:54 UTC
(In reply to comment #5)

Unfortunately genkernel-3.4.30 likes sys-apps/openrc-0.9.9 which is not stable.

I get the following on my stable system:


xxx ~ # emerge -uDvpN world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ~] sys-kernel/genkernel-3.4.30 [3.4.20] USE="bash-completion -crypt% (-ibm) (-selinux)" 1,243 kB
[blocks B      ] <sys-apps/openrc-0.9.9 ("<sys-apps/openrc-0.9.9" is blocking sys-kernel/genkernel-3.4.30)

Total: 1 package (1 upgrade), Size of downloads: 1,243 kB
Conflict: 1 block (1 unsatisfied)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (sys-kernel/genkernel-3.4.30::gentoo, ebuild scheduled for merge) pulled in by
    sys-kernel/genkernel required by @selected

  (sys-apps/openrc-0.9.8.4::gentoo, installed) pulled in by
    sys-apps/openrc required by (sys-apps/baselayout-2.0.3::gentoo, installed)
    sys-apps/openrc required by (dev-db/mysql-init-scripts-2.0_pre1-r2::gentoo, installed)
Comment 7 Sebastian Pipping gentoo-dev 2012-04-28 00:56:17 UTC
This problem has been fixed with v3.4.21.1 and later releases, see commit <http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=b977d66940fdbbe552bb735a54141b69da873b5b>.

We could try get a more recent version marked stable.  Any proposals for a version to pick?
Comment 8 Giampaolo Tomassoni 2012-04-28 17:41:34 UTC
What about sys-kernel/genkernel-3.4.24 ?

It is the latest version not enforcing sys-apps/openrc-0.9.9.
Comment 9 jeremy 2012-05-01 14:56:24 UTC
(In reply to comment #8)
> What about sys-kernel/genkernel-3.4.24 ?
> 
> It is the latest version not enforcing sys-apps/openrc-0.9.9.

Ive been running sys-kernel/genkernel-3.4.24 on my amd64 stable keyworded system since this issue came up. Everything seems fine here so this would get my vote.
Comment 10 Giampaolo Tomassoni 2012-05-11 14:06:39 UTC
Lets move on with this.

See (bug#415483)
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2012-05-23 14:31:23 UTC
*** Bug 417167 has been marked as a duplicate of this bug. ***
Comment 12 Alex Buell 2012-05-23 17:39:28 UTC
This problem has come back with v3.4.24-p1 :(
Comment 13 Giampaolo Tomassoni 2012-05-23 17:48:17 UTC
(In reply to comment #12)

I can't second your statement. These are my results:

staging ~ # genkernel initramfs
* Gentoo Linux Genkernel; Version 3.4.24_p1
* Running with options: initramfs

* Clearing cache dir contents from /var/cache/genkernel
* Linux Kernel 3.2.12-gentoo for x86...
* e2fsprogs: >> Applying patches...
*           - e2fsprogs-1.41.12-getpagesize.patch
* e2fsprogs: >> Configuring...
* e2fsprogs: >> Compiling...
* blkid: >> Copying to cache...
* busybox: >> Applying patches...
*           - 1.18.1-openvt.diff
*           - busybox-1.19.3-mdstart.patch
*           - busybox-1.7.4-signal-hack.patch
* busybox: >> Configuring...
* busybox: >> Compiling...
* busybox: >> Copying to cache...
* initramfs: >> Initializing...
*         >> Appending base_layout cpio data...
*         >> Appending auxilary cpio data...
*         >> Appending busybox cpio data...
*         >> Appending modules cpio data...
*         >> Appending blkid cpio data...

* WARNING... WARNING... WARNING...
* Additional kernel cmdline arguments that *may* be required to boot properly...
* With support for several ext* filesystems around it may be needed to
* add "rootfstype=ext3" or "rootfstype=ext4"

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest ~arch genkernel before reporting bugs.

* RUNNING FINAL CACHE/TMP CLEANUP
* CACHE_DIR: /var/cache/genkernel
* Clearing cache dir contents from /var/cache/genkernel
*        >> removing /var/cache/genkernel/blkid-1.42-x86.bz2
*        >> removing /var/cache/genkernel/busybox-1.19.3-x86.tar.bz2

* TMPDIR: /var/tmp/genkernel
* Removing tmp dir contents
*        >> removing initramfs-3.2.12-gentoo


These are my settings in /etc/genkernel.conf:

INSTALL="yes"
OLDCONFIG="no"
MENUCONFIG="yes"
CLEAN="yes"
MRPROPER="yes"
MOUNTBOOT="yes"
SAVE_CONFIG="yes"
USECOLOR="yes"
CLEAR_CACHE_DIR="yes"
POSTCLEAR="1"
MAKEOPTS="-j2"
DISKLABEL="yes"
BOOTLOADER="grub"
GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"
CACHE_DIR="/var/cache/genkernel"
DISTDIR="${CACHE_DIR}/src"
LOGFILE="/var/log/genkernel.log"
LOGLEVEL=1
DEFAULT_KERNEL_SOURCE="/usr/src/linux"
BUSYBOX_VER="1.19.3"
BUSYBOX_SRCTAR="${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2"
BUSYBOX_DIR="busybox-${BUSYBOX_VER}"
BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2"
DEVICE_MAPPER_VER="1.02.22"
DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}"
DEVICE_MAPPER_SRCTAR="${DISTDIR}/device-mapper.${DEVICE_MAPPER_VER}.tgz"
DEVICE_MAPPER_BINCACHE="%%CACHE%%/device-mapper-${DEVICE_MAPPER_VER}-%%ARCH%%.tar.bz2"
LVM_VER="2.02.88"
LVM_DIR="LVM2.${LVM_VER}"
LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz"
LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2"
MDADM_VER="3.1.5"
MDADM_DIR="mdadm-${MDADM_VER}"
MDADM_SRCTAR="${DISTDIR}/mdadm-${MDADM_VER}.tar.bz2"
MDADM_BINCACHE="%%CACHE%%/mdadm-${MDADM_VER}-%%ARCH%%.tar.bz2"
DMRAID_VER="1.0.0.rc14"
DMRAID_DIR="dmraid/${DMRAID_VER}"
DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2"
DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2"
ISCSI_VER="2.0-872"
ISCSI_DIR="open-iscsi-${ISCSI_VER}"
ISCSI_SRCTAR="${DISTDIR}/open-iscsi-${ISCSI_VER}.tar.gz"
ISCSI_BINCACHE="%%CACHE%%/iscsi-${ISCSI_VER}-%%ARCH%%.bz2"
E2FSPROGS_VER="1.42"
E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}"
E2FSPROGS_SRCTAR="${DISTDIR}/e2fsprogs-${E2FSPROGS_VER}.tar.gz"
BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2"
FUSE_VER="2.8.6"
FUSE_DIR="fuse-${FUSE_VER}"
FUSE_SRCTAR="${DISTDIR}/fuse-${FUSE_VER}.tar.gz"
FUSE_BINCACHE="%%CACHE%%/fuse-${FUSE_VER}-%%ARCH%%.tar.bz2"
UNIONFS_FUSE_VER="0.24"
UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}"
UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2"
UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2"
GPG_VER="1.4.11"
GPG_DIR="gnupg-${GPG_VER}"
GPG_SRCTAR="${DISTDIR}/gnupg-${GPG_VER}.tar.bz2"
GPG_BINCACHE="%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2"
REAL_ROOT="/dev/sda6"


WHich are your results and settings?
Comment 14 Alex Buell 2012-05-23 18:59:43 UTC
--
  CC      libbb/xrealloc_vector.o
  CC      libbb/xregcomp.o
  AR      libbb/lib.a
  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
--
mount.c:(.text.nfsmount+0x98e): undefined reference to `clnt_sperror'
mount.c:(.text.nfsmount+0x9b3): undefined reference to `clnt_sperror'
mount.c:(.text.nfsmount+0xb38): undefined reference to `bindresvport'
mount.c:(.text.nfsmount+0xb82): undefined reference to `pmap_getport'
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
* Gentoo Linux Genkernel; Version 3.4.24_p1
* Running with options: --no-clean --no-mrproper --kernel-cc=distcc all

* ERROR: Failed to compile the "all" target...

* -- End log... --


# Configuration file for genkernel
# $Id: b39a952ab3df9371a15786986e417f187396a39c $

# This file is sourced by genkernel at startup and determines which options
# we will be using to compile our kernel.  The order of precidence is simple,
# with the internal settings being least important, configuration file
# settings next, and command line options being most important.

# =========Common Command Line Option Defaults=========

# Should we install to $BOOTDIR?  Default is "no" because genkernel is used in
# catalyst and stage building.
#INSTALL="yes"

# Run 'make oldconfig' before compiling this kernel?
OLDCONFIG="yes"

# Run 'make menuconfig' before compiling this kernel?
MENUCONFIG="no"

# Run 'make clean' before compilation?
# If set to NO, implies MRPROPER WILL NOT be run
# Also, if clean is NO, it won't copy over any configuration
# file, it will use what's there.
CLEAN="yes"

# Run 'make mrproper' before configuration/compilation?
MRPROPER="yes"

# Override the arch detection?
# ARCH_OVERRIDE="x86"

# Mount BOOTDIR automatically if it isn't mounted?
MOUNTBOOT="yes"

# Make symlinks in BOOTDIR automatically?
# SYMLINK="no"

# Save the new configuration in /etc/kernels upon
# successfull compilation
SAVE_CONFIG="yes"

# Use Color output in Genkernel?
USECOLOR="yes"

# Add new kernel to grub?
BOOTLOADER="grub"

# Clear build cache dir
# CLEAR_CACHE_DIR="yes"

# Clear all tmp files and caches after genkernel has run
#POSTCLEAR="1"

# Genkernel uses an independent configuration for MAKEOPTS, and does not source
# /etc/make.conf . You can override the default setting by uncommenting and
# tweaking the following line. Default setting is set up by
# ${GK_SHARE}/${ARCH_OVERRIDE}/config.sh . The recommended value for -j
# argument is: <number of processors>*<number of cores per processor>+1
MAKEOPTS="-j5"

# Add in LVM support from static binaries if they exist on the system, or
# compile static LVM binaries if static ones do not exist.
# LVM="no"

# Add in Luks support. Needs sys-fs/cryptsetup with -dynamic installed.
# LUKS="no"

# Add in GnuPG support
# GPG="no"

# Add in EVMS support from static binaries if they exist on the system: you
# should run "emerge evms" first.
# EVMS="no"

# Add DMRAID support.
# DMRAID="no"

# Include (or suppresses the inclusion of) busybox in the initrd or initramfs.
# If included, busybox is rebuilt if the cached copy is out of date.
# BUSYBOX="yes"

# Includes mdadm/mdmon binaries in initramfs.
# Without sys-fs/mdadm[static] installed, this will build a static mdadm.
# MDADM="no"

# Specify a custom mdadm.conf.
# By default the ramdisk will be built *without* an mdadm.conf and will auto-detect
# arrays during bootup.  Usually, this should not be needed.
# MDADM_CONFIG="/etc/mdadm.conf"

# Add Multipath support.
# MULTIPATH="no"

# Add iSCSI support.
# ISCSI="no"

# Include support for unionfs
#UNIONFS="1"

# Enable copying of firmware into initramfs
# FIRMWARE="no"
# Specify directory to pull from
# FIRMWARE_DIR="/lib/firmware"
# Specify specific firmware files to include. This overrides FIRMWARE_DIR
# FIRMWARE_FILES=""

# Enable disklabel support (copies blkid to initrd)
DISKLABEL="yes"

# Add new kernel to grub?
# BOOTLOADER="grub"

# Enable splashutils in early space (initrd). Default is "no".
# SPLASH="yes"

# Use this splash theme. If commented out - the "default" name theme is used.
# Also, SPLASH="yes" needs to be enabled for this one to one work.
# This supersedes the "SPLASH_THEME" option of /etc/conf.d/splash (in early space).
# SPLASH_THEME="gentoo"


# =========Keymap Settings=========
#
# Force keymap selection at boot
#DOKEYMAPAUTO="yes"


# Disables keymap selection support
#KEYMAP="0"


# =========Low Level Compile Settings=========
#
# GNU Make to use for kernel.  See also the --kernel-make command line option.
# KERNEL_MAKE="make"

# Compiler to use for the kernel (e.g. distcc).  See also the --kernel-cc
# command line option.
# KERNEL_CC="gcc"

# Assembler to use for the kernel.  See also the --kernel-as command line
# option.
# KERNEL_AS="as"

# Linker to use for the kernel.  See also the --kernel-ld command line option.
# KERNEL_LD="ld"

# GNU Make to use for the utilities.  See also the --utils-make command line
# option.
# UTILS_MAKE="make"

# Compiler to use for the utilities (e.g. distcc).  See also the --utils-cc
# command line option.
# UTILS_CC="gcc"

# Assembler to use for the utilities.  See also the --utils-as command line
# option.
# UTILS_AS="as"

# Linker to use for the utilities.  See also the --utils-ld command line
# option.
# UTILS_LD="ld"


# Common prefix of cros compile commands
#UTILS_CROSS_COMPILE="x86_64-pc-linux-gnu"


# Value of CROSS_COMPILE utils variable
# during kernel compilation
#KERNEL_CROSS_COMPILE="x86_64-pc-linux-gnu"


# =========GENKERNEL LOCATION CONFIGURATION============
# Variables:
#   %%ARCH%%  - Final determined architecture
#   %%CACHE%% - Final determined cache location

# Set genkernel's temporary work directory.  Default is /var/tmp/genkernel
# TMPDIR="/var/tmp/genkernel"

# Set the boot directory, default is /boot
#BOOTDIR="/boot"

# Default share directory location
GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"

# Location of the default cache
CACHE_DIR="/var/cache/genkernel"
# Location of DISTDIR, where our source tarballs are stored
DISTDIR="${CACHE_DIR}/src"
# Log output file
LOGFILE="/var/log/genkernel.log"
# Debug Level
LOGLEVEL=1

# =========COMPILED UTILS CONFIGURATION============
#
# Default location of kernel source
DEFAULT_KERNEL_SOURCE="/usr/src/linux"
# Default kernel config (only use to override using
# arch/%%ARCH%%/kernel-config-${VER}.${PAT} !)
# DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config"

# Specifies a user created busybox config
#BUSYBOX_CONFIG="/path/to/file"

BUSYBOX_VER="1.19.3"
BUSYBOX_SRCTAR="${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2"
BUSYBOX_DIR="busybox-${BUSYBOX_VER}"
BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2"
# BUSYBOX_APPLETS="[ ash sh mount uname echo cut cat"

DEVICE_MAPPER_VER="1.02.22"
DEVICE_MAPPER_DIR="device-mapper.${DEVICE_MAPPER_VER}"
DEVICE_MAPPER_SRCTAR="${DISTDIR}/device-mapper.${DEVICE_MAPPER_VER}.tgz"
DEVICE_MAPPER_BINCACHE="%%CACHE%%/device-mapper-${DEVICE_MAPPER_VER}-%%ARCH%%.tar.bz2"

LVM_VER="2.02.88"
LVM_DIR="LVM2.${LVM_VER}"
LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz"
LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2"

MDADM_VER="3.1.5"
MDADM_DIR="mdadm-${MDADM_VER}"
MDADM_SRCTAR="${DISTDIR}/mdadm-${MDADM_VER}.tar.bz2"
MDADM_BINCACHE="%%CACHE%%/mdadm-${MDADM_VER}-%%ARCH%%.tar.bz2"

DMRAID_VER="1.0.0.rc14"
DMRAID_DIR="dmraid/${DMRAID_VER}"
DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2"
DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2"

ISCSI_VER="2.0-872"
ISCSI_DIR="open-iscsi-${ISCSI_VER}"
ISCSI_SRCTAR="${DISTDIR}/open-iscsi-${ISCSI_VER}.tar.gz"
ISCSI_BINCACHE="%%CACHE%%/iscsi-${ISCSI_VER}-%%ARCH%%.bz2"

E2FSPROGS_VER="1.42"
E2FSPROGS_DIR="e2fsprogs-${E2FSPROGS_VER}"
E2FSPROGS_SRCTAR="${DISTDIR}/e2fsprogs-${E2FSPROGS_VER}.tar.gz"
BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2"

FUSE_VER="2.8.6"
FUSE_DIR="fuse-${FUSE_VER}"
FUSE_SRCTAR="${DISTDIR}/fuse-${FUSE_VER}.tar.gz"
FUSE_BINCACHE="%%CACHE%%/fuse-${FUSE_VER}-%%ARCH%%.tar.bz2"

UNIONFS_FUSE_VER="0.24"
UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}"
UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2"
UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2"

GPG_VER="1.4.11"
GPG_DIR="gnupg-${GPG_VER}"
GPG_SRCTAR="${DISTDIR}/gnupg-${GPG_VER}.tar.bz2"
GPG_BINCACHE="%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2"


# =========MISC KERNEL CONFIGURATION============
#
# Tag the kernel and ramdisk with a name:
# If not defined the option defaults to
# 'genkernel'
#KNAME="genkernel"


# This option is only valid if kerncache is
# defined. If there is a valid kerncache no checks
# will be made against a kernel source tree
#KERNEL_SOURCES="0"


# Build a static (monolithic kernel)
#BUILD_STATIC="1"


# Make and install kernelz image (PowerPC)
#GENZIMAGE="1"


# File to output a .tar.bz2'd kernel contents
# of /lib/modules/ and the kernel config
# NOTE: This is created before the callbacks
# are run!
#KERNCACHE="/path/to/file"


# Prefix to kernel module destination, modules
# will be installed in <prefix>/lib/modules
# (.conf equivalent of --module-prefix=<dir>)
#INSTALL_MOD_PATH=""


# =========MISC INITRD CONFIGURATION============
#
# Copy all kernel modules to the ramdisk
#ALLRAMDISKMODULES="1"


# Don't copy any modules to the ramdisk
#RAMDISKMODULES="0"


# File to output a .tar.bz2'd kernel and ramdisk:
# No modules outside of the ramdisk will be
# included...
#MINKERNPACKAGE="/path/to/file.bz2"


# File to output a .tar.bz2'd modules after the
# callbacks have run
#MODULESPACKAGE="/path/to/file.bz2"


# Directory structure to include in the initramfs,
# only available on >=2.6 kernels
#INITRAMFS_OVERLAY=""


# Build the generated initramfs into the kernel instead of
# keeping it as a separate file
#INTEGRATED_INITRAMFS="1"


# Create a self-contained env in the initramfs
#NETBOOT="1"


# =========MISC BOOT CONFIGURATION============
#
# Specify a default for real_root=
#REAL_ROOT="/dev/one/two/gentoo"
Comment 15 Giampaolo Tomassoni 2012-05-23 19:10:18 UTC
I would try to remove the content of the /var/tmp/genkernel directory and then retry 'genkernel initramfs': I see one difference between mine and your config is that you don't set 'POSTCLEAR="1"'.
Comment 16 Alex Buell 2012-05-23 19:44:29 UTC
(In reply to comment #15)
> I would try to remove the content of the /var/tmp/genkernel directory and
> then retry 'genkernel initramfs': I see one difference between mine and your
> config is that you don't set 'POSTCLEAR="1"'.

Just did that, same results. Could it be because I'm using glibc 2.14.1-r3?
Comment 17 Alex Buell 2012-05-23 20:40:55 UTC
Oh hang on, this works fine on AMD64. I'm on x86 and the problem is happening there.
Comment 18 Giampaolo Tomassoni 2012-05-23 21:29:47 UTC
Alex, my example genkernel run is from an x86 with sys-libs/glibc-2.14.1-r3 too.

Would you post the whole content of your /var/log/genkernel.log file as an attachment? Posting an 'emerge --info' output wouldn't hurt, too.

And please don't panic! ;)
Comment 19 Nicolai Czempin 2012-05-24 02:26:09 UTC
On my amd64 setup, it works fine with 3.4.24 including p1, where it had failed with the NFS error out-of-the-box with 3.4.20.

I didn't take any measures to try and reproduce the original error, other than adding the NFS parts in the kernel that I had (for good measure) left out when I first encountered this issue.

BTW, if this occurs/occurred on x86, perhaps this should be reflected in the bug attributes? AFAICT, it only mentions amd64.
Comment 20 Jeff (JD) Horelick (RETIRED) gentoo-dev 2012-05-24 02:40:35 UTC
You should *NOT* CC x86@gentoo.org
Comment 21 Giampaolo Tomassoni 2012-05-24 07:50:00 UTC
Nicolai, I encountered this problem in a x86_64 stable system first (see my attachment). However, the problem is due to glibc-2.14.1-r3 moving some rpc entries out of glibc, which is not related to a specific arch.

Guido Jäkel fixed this creating a genkernel-3.4.24_p1 which disables NFS features from busybox as a quick workaround to allow stable systems to successfully run genkernel (see bug#415483). Then, your attempt to reproduce the problem adding NFS support to the kernel couldn't succeed, because it was not a kernel problem but a busybox one.
Comment 22 Nicolai Czempin 2012-05-24 08:48:57 UTC
(In reply to comment #21)
> Nicolai, I encountered this problem in a x86_64 stable system first (see my
> attachment). However, the problem is due to glibc-2.14.1-r3 moving some rpc
> entries out of glibc, which is not related to a specific arch.
> 
> Guido Jäkel fixed this creating a genkernel-3.4.24_p1 which disables NFS
> features from busybox as a quick workaround to allow stable systems to
> successfully run genkernel (see bug#415483). Then, your attempt to reproduce
> the problem adding NFS support to the kernel couldn't succeed, because it
> was not a kernel problem but a busybox one.

In that case, Bug 417167 is not a duplicate of this one (but perhaps of #4154834?); it refers merely to the issue of not being able to use genkernel in the stable system, which works now that 24_p1 is considered stable.
Comment 23 Giampaolo Tomassoni 2012-05-24 09:09:40 UTC
Bug#415483 is the stabilization request for genkernel-3.4.24_p1 stemming from this very same bug (see comment#10). So, no: Bug#417167 is correctly a duplicate of this bug to me.

This bug IS about running genkernel on *stable* systems: unstable ones would use a more recent version (3.4.33.1?). See http://packages.gentoo.org/package/sys-kernel/genkernel .

I think however all this discussion is quite irrilevant to this bug, Nicolai. Are you a lawyer? ;)
Comment 24 Nicolai Czempin 2012-05-24 10:25:06 UTC
Bug#417167 is about the fact that at the time I encountered it, the version of genkernel that was considered stable (3.4.20) failed, on a fresh install, with no options changed, on amd64 (possibly on others too).

Since then (possibly shortly before I reported the bug), a version of 3.4.24, which for me did not fail, was stabilized. Thus the bug that a fresh install would lead to a non-working default genkernel was fixed.

This Bug,#413247, is still open. There are two possibilities:
a) It really is a duplicate, in which case it should be resolved as fixed.
b) It is not a duplicate (although it may be strongly related).

No, I am not a lawyer, nor does the impression that I possibly care whether something is a duplicate or not make me one.


Since I was one of those who were affected by this here bug, and a workaround (3.4.24_p1) was described, I just checked whether under conditions that are slightly closer to the ones I had when I originally encountered the bug, that the issue no longer occurs. I. e. I verified that it is fixed. If you just have two people, one seeing the problem go away, the other still having it, it may be valuable information when someone else uses the same workaround and the problem seems to go away.

Now this here bug talks about 3.4.20 that shouldn't build busybox with NFS, which would have been one way to fix my original issue (fixing 3.4.20). My bug was fixed in a different way, though.
Comment 25 Giampaolo Tomassoni 2012-05-24 14:15:56 UTC
Nicolai, I see your point and I was inexact in my previous statement.

The problem we experienced (genkernel failing in building busybox) was due to a change in glibc such that some xdr/pmap entries (mostly used by NFS tools) are not anymore available in libc. The earliest genkernel version reported to work with such libc was 3.4.21.1 (see comment#7) and we could stabilize that or a later version. Unfortunately, versions later than 3.4.24 did need (at least) sys-apps/openrc-0.9.9, which is unstable, so that my own impression about this was that 3.4.24 was the best candidate.

So, getting 3.4.24 stable was the only action needed in order to overcame the issue. And I infact asked for that, when in the middle Guido Jäkel found that LUKS support would have been broken too that way (it was in 3.4.20, fwik - see bug#409277, comment 4) and proposed to patch 3.4.24 accordingly, thereby the 3.4.24_p1 case.

Is this bug closed? Let's close it, then.
Comment 26 Alex Buell 2012-05-24 21:43:16 UTC
(In reply to comment #18)
> Alex, my example genkernel run is from an x86 with sys-libs/glibc-2.14.1-r3
> too.
> 
> Would you post the whole content of your /var/log/genkernel.log file as an
> attachment? Posting an 'emerge --info' output wouldn't hurt, too.
> 
> And please don't panic! ;)

OK :-)

Will do that as soon as I rerun genkernel initramfs. 

Here's emerge --info as requested:

Portage 2.1.10.49 (default/linux/x86/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r3, 3.3.0-gentoo i686)
=================================================================
System uname: Linux-3.3.0-gentoo-i686-Mobile_Intel-R-_Pentium-R-_4_CPU_2.80GHz-with-gentoo-2.1
Timestamp of tree: Thu, 24 May 2012 21:00:01 +0000
distcc 3.1 i686-pc-linux-gnu [enabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r1, 3.1.5, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo rion x11 The-Buell
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/games/angband/edit/ /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
FEATURES="assume-digests binpkg-logs distcc distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.tiscali.nl/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=30"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/rion /var/lib/layman/x11 /var/lib/layman/thebuell"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acpi akonadi alsa amr apache2 apng asf aspnet2 attica autoipd automount avahi battstat berkdb bluetooth branding brasero bzip2 cairo cdda cdr cli consolekit cracklib crypt css ctype cups curl custom-optimization cxx dbus declarative dell device-mapper dhcp dhcpcd dri drm dts dv dvd dvdr dvdread eds emboss emerald encode evo exchange exif extensions extras faac faad fam ffmpeg firefox flac fontconfig foomaticdb fortran fts3 fuse gallium gcj gdbm gdu gif gimpprint glut glx gnome gnome-keyring gnutls gpm gsm gstreamer gtk gtk2 gtk3 hddtemp hfs iconv icu id3tag imap ipv6 ithreads jadetex java jbig jpeg kde kdrive kerberos kpathsea lame laptop latex lcms ldap libkms libnotify llvm logrotate mad matroska mbox mdnsresponder-compat mikmod milter minizip mmx mmxext mng modules motif mozdevelop mp3 mp4 mpeg mpm-worker mppe-mppc mudflap multimedia mysql nautilus ncurses networkmanager nls nptl nptlonly nsplugin ntfsprogs objc offensive ogg okular opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qimageblitz qscintilla qt3support qt4 qwt readline samba sasl script sdk sdl semantic-desktop sensord session sms spell sql sqlite sse sse2 sse3 ssl ssse3 startup-notification stream svg taglib tcpd theora threads tiff timidity truetype udev udisks unicode upower usb v4l v4l2 vaapi video vorbis webkit webm wifi win32codecs wxwidgets x264 x86 xcb xface xine xinerama xml xorg xpdf-headers xrandr xsl xulrunner xv xvid zlib" ALSA_CARDS="intel8
Comment 27 Alex Buell 2012-05-24 22:09:25 UTC
Created attachment 313001 [details]
genkernel log as requested
Comment 28 Giampaolo Tomassoni 2012-05-25 06:43:12 UTC
It seems to me your genkernel is not using busybox-1.19.3 for its jobs, albeit your genkernel.conf states that. See these many lines in your log:

.config:15:warning: trying to assign nonexistent symbol NITPICK
.config:25:warning: trying to assign nonexistent symbol GETOPT_LONG
.config:43:warning: trying to assign nonexistent symbol FEATURE_FULL_LIBBUSYBOX
...
.config:675:warning: trying to assign nonexistent symbol ASH_READ_TIMEOUT
.config:677:warning: trying to assign nonexistent symbol ASH_MATH_SUPPORT
.config:678:warning: trying to assign nonexistent symbol ASH_MATH_SUPPORT_64
.config:694:warning: trying to assign nonexistent symbol LASH

Alex, I would set 'CLEAR_CACHE_DIR="yes"' in your genkernel.conf and retry.

Also, your 'emerge --info' data reports three different automake versions (1.9.6-r3, 1.10.3, 1.11.1). While this may be, it may also spot a scarce use of the 'emerge -e system; emerge -e world; emerge --depclean; revdep-rebuild'. Your system is a bit, well, messy, with probably a lot of stale packages still in use.
Comment 29 Alex Buell 2012-06-12 22:25:43 UTC
(In reply to comment #28)

> Also, your 'emerge --info' data reports three different automake versions
> (1.9.6-r3, 1.10.3, 1.11.1). While this may be, it may also spot a scarce use
> of the 'emerge -e system; emerge -e world; emerge --depclean;
> revdep-rebuild'. Your system is a bit, well, messy, with probably a lot of
> stale packages still in use.

Unnecessary. My fix for this was incredibly simple; just edit busy-config so that it says 'n' to CONFIG_FEATURE_MOUNT_NFS instead of 'y'. This solves the problem for once and all, no need for patches or big rebuilds; esp. on a slow old laptop :-)