Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 376877 - sys-kernel/genkernel-3.4.18 and mdadm support fails to compile
Summary: sys-kernel/genkernel-3.4.18 and mdadm support fails to compile
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-29 09:50 UTC by Richard Scott
Modified: 2012-10-13 21:36 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Scott 2011-07-29 09:50:27 UTC
I am unable to build genkernel with mdadm support if my local mdadm tools are built dynamicly. If I have static mdadm tools installed, it works ok as genkernel uses those bins rather than compiling them. Here's my error log:

Using username "root".
Authenticating with public key "HP Laptop (Boris) Nov 07" from agent
Last login: Fri Jul 29 09:39:12 BST 2011 from 10.254.0.2 on pts/0
biostar ~ # cat /var/log/genkernel.fail

* Gentoo Linux Genkernel; Version 3.4.18
* Running with options: --mdadm --mdadm-config=/etc/mdadm.conf ramdisk

* Linux Kernel 2.6.39-hardened-r8 for x86_64...
* blkid: >> Using cache
* busybox: >> Using cache
* initramfs: >> Initializing...
*         >> Appending base_layout cpio data...
*         >> Appending auxilary cpio data...
*         >> Appending busybox cpio data...
*         >> Appending mdadm cpio data...
*               MDADM: Adding support (compiling binaries)...
* mdadm: >> Compiling...
COMMAND: make -j2 CC="gcc" LD="ld" AS="as"
gcc -Os -DUSE_PTHREADS   -c -o mdadm.o mdadm.c
gcc -Os -DUSE_PTHREADS   -c -o config.o config.c
gcc -Os -DUSE_PTHREADS   -c -o mdstat.o mdstat.c
gcc -Os -DUSE_PTHREADS   -c -o ReadMe.o ReadMe.c
gcc -Os -DUSE_PTHREADS   -c -o util.o util.c
gcc -Os -DUSE_PTHREADS   -c -o Manage.o Manage.c
gcc -Os -DUSE_PTHREADS   -c -o Assemble.o Assemble.c
gcc -Os -DUSE_PTHREADS   -c -o Build.o Build.c
gcc -Os -DUSE_PTHREADS   -c -o Create.o Create.c
gcc -Os -DUSE_PTHREADS   -c -o Detail.o Detail.c
gcc -Os -DUSE_PTHREADS   -c -o Examine.o Examine.c
gcc -Os -DUSE_PTHREADS   -c -o Grow.o Grow.c
gcc -Os -DUSE_PTHREADS   -c -o Monitor.o Monitor.c
gcc -Os -DUSE_PTHREADS   -c -o dlink.o dlink.c
gcc -Os -DUSE_PTHREADS   -c -o Kill.o Kill.c
gcc -Os -DUSE_PTHREADS   -c -o Query.o Query.c
gcc -Os -DUSE_PTHREADS   -c -o Incremental.o Incremental.c
gcc -Os -DUSE_PTHREADS   -c -o mdopen.o mdopen.c
gcc -Os -DUSE_PTHREADS   -c -o super0.o super0.c
gcc -Os -DUSE_PTHREADS   -c -o super1.o super1.c
gcc -Os -DUSE_PTHREADS   -c -o super-ddf.o super-ddf.c
gcc -Os -DUSE_PTHREADS   -c -o super-intel.o super-intel.c
gcc -Os -DUSE_PTHREADS   -c -o bitmap.o bitmap.c
gcc -Os -DUSE_PTHREADS   -c -o restripe.o restripe.c
gcc -Os -DUSE_PTHREADS   -c -o sysfs.o sysfs.c
gcc -Os -DUSE_PTHREADS -DHAVE_STDINT_H -o sha1.o -c sha1.c
gcc -Os -DUSE_PTHREADS   -c -o mapfile.o mapfile.c
gcc -Os -DUSE_PTHREADS   -c -o crc32.o crc32.c
gcc -Os -DUSE_PTHREADS   -c -o sg_io.o sg_io.c
gcc -Os -DUSE_PTHREADS   -c -o msg.o msg.c
gcc -Os -DUSE_PTHREADS   -c -o platform-intel.o platform-intel.c
gcc -Os -DUSE_PTHREADS   -c -o probe_roms.o probe_roms.c
gcc -Os -DUSE_PTHREADS   -c -o mdmon.o mdmon.c
gcc -Os -DUSE_PTHREADS   -c -o monitor.o monitor.c
gcc -Os -DUSE_PTHREADS   -c -o managemon.o managemon.c
gcc -static -o mdadm mdadm.o config.o mdstat.o  ReadMe.o util.o Manage.o Assemble.o Build.o Create.o Detail.o Examine.o Grow.o Monitor.o dlink.o Kill.o Query.o Incremental.o mdopen.o super0.o super1.o super-ddf.o super-intel.o bitmap.o restripe.o sysfs.o sha1.o mapfile.o crc32.o sg_io.o msg.o platform-intel.o probe_roms.o
gcc -static -pthread -z now -o mdmon mdmon.o monitor.o managemon.o util.o mdstat.o sysfs.o config.o Kill.o sg_io.o dlink.o ReadMe.o super0.o super1.o super-intel.o super-ddf.o sha1.o crc32.o msg.o bitmap.o platform-intel.o probe_roms.o
config.o: In function `load_conffile':
config.c:(.text+0x18af): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
config.c:(.text+0x181d): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
config.o: In function `load_conffile':
config.c:(.text+0x18af): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
config.c:(.text+0x181d): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
*       >> Copying to bincache...
* Gentoo Linux Genkernel; Version 3.4.18
* Running with options: --mdadm --mdadm-config=/etc/mdadm.conf ramdisk

* ERROR: Could not strip mdadm binaries!
* -- 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 1 Xake 2011-07-30 07:05:50 UTC
Please always include your emerge --info, as that gives us information about your current active versions of glibc, binutils and gcc.


On my system genkernel compiles mdadm fine, but I will look into if the mdadm packages has some fixes for newer glibc that may be needed too.
Comment 2 Richard Scott 2011-07-30 08:06:30 UTC
emerge info:

Portage 2.1.10.3 (hardened/linux/amd64/no-multilib, gcc-4.4.5, glibc-2.12.2-r0, 2.6.39-hardened-r8 x86_64)
=================================================================
System uname: Linux-2.6.39-hardened-r8-x86_64-Intel-R-_Pentium-R-_4_CPU_3.60GHz-with-gentoo-2.0.3
Timestamp of tree: Fri, 29 Jul 2011 12:30:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.10.3, 1.11.1
sys-devel/binutils:       2.20.1-r1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.2.10
sys-devel/make:           3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo science sunrise x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /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"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/lib/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.ovh.net/gentoo-distfiles/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /var/lib/layman/sunrise /opt/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cups cxx dri fuse gdbm gpm hardened iconv ipv6 justify mmx modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline session sse sse2 ssl sysfs tcpd urandom xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="s3" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Xake 2011-07-30 21:30:50 UTC
Hmm, I have a system which is software-version-wise close to your system but cannot reproduce this.

Can you please try "rm /var/cache/genkernel/*.bz2 /var/tmp/genkernel/*" and try genkernel again after that? This will clean out old genkernel-cache and make sure that is not interfering.
Comment 4 Richard Scott 2011-08-01 08:19:36 UTC
I've just tried clearing out those folders and its still got the same result.

If I build my systems mdadm with "static" then all is well... if I build with "-static" then genkernel tries to build them and fails.

I am in the process of rebuilding 'world' (rebuilding 'system' was no solution to this)
Comment 5 Sebastian Pipping gentoo-dev 2011-08-02 08:49:35 UTC
(In reply to comment #4)
> I've just tried clearing out those folders and its still got the same result.

Which version of mdadm are we speaking of?

# fgrep -R MDADM_VER= /etc/genkernel.conf
MDADM_VER="3.1.4"

MDADM 3.1.4 compiles well for me.  Arch, GCC and glibc are identical with yours over here.


> If I build my systems mdadm with "static" then all is well... if I build with
> "-static" then genkernel tries to build them and fails.

With static enabled genkernel does not bother conmpiling himself but rather uses the system's file, yes.


> I am in the process of rebuilding 'world' (rebuilding 'system' was no solution
> to this)
Comment 6 Richard Scott 2011-08-02 09:25:07 UTC
Yes, that's the version I have too :-(

(In reply to comment #5)
> > I've just tried clearing out those folders and its still got the same result.
> Which version of mdadm are we speaking of?
> # fgrep -R MDADM_VER= /etc/genkernel.conf
> MDADM_VER="3.1.4"
> MDADM 3.1.4 compiles well for me.  Arch, GCC and glibc are identical with yours
> over here.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-02-12 07:04:09 UTC
I can't reproduce on latest genkernel (yes, with building the mdadm in genkernel)
Comment 8 Richard Scott 2012-02-12 15:27:06 UTC
(In reply to comment #7)
> I can't reproduce on latest genkernel (yes, with building the mdadm in
> genkernel)

Are you compiling your own mdadm package with "-static"?

# emerge -pv mdadm
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild   R    ] sys-fs/mdadm-3.1.4  USE="-static" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB

I've just tried it on v3.4.24 and got this result:

# genkernel --mdadm --mdadm-config=/etc/mdadm.conf --makeopts=-j4 --install ramdisk
* Gentoo Linux Genkernel; Version 3.4.24
* Running with options: --mdadm --mdadm-config=/etc/mdadm.conf --makeopts=-j4 --install ramdisk

* Linux Kernel 3.2.2-hardened-r1 for x86_64...
* blkid: >> Using cache
* busybox: >> Using cache
* initramfs: >> Initializing...
*         >> Appending base_layout cpio data...
*         >> Appending auxilary cpio data...
*         >> Appending busybox cpio data...
*         >> Appending mdadm cpio data...
*               MDADM: Adding support (compiling binaries)...
* mdadm: >> Compiling...
*       >> Copying to bincache...
strip: 'sbin/mdadm': No such file
strip: 'sbin/mdmon': No such file
* ERROR: Could not strip mdadm binaries!

* -- Grepping log... --

gcc -Os -DUSE_PTHREADS   -c -o monitor.o monitor.c
gcc -Os -DUSE_PTHREADS   -c -o managemon.o managemon.c
gcc -static -o mdadm mdadm.o config.o mdstat.o  ReadMe.o util.o Manage.o Assemble.o Build.o Create.o Detail.o Examine.o Grow.o Monitor.o dlink.o Kill.o Query.o Incremental.o mdopen.o super0.o super1.o super-ddf.o super-intel.o bitmap.o restripe.o sysfs.o sha1.o mapfile.o crc32.o sg_io.o msg.o platform-intel.o probe_roms.o
gcc -static -pthread -Wl,-z,now -o mdmon mdmon.o monitor.o managemon.o util.o mdstat.o sysfs.o config.o Kill.o sg_io.o dlink.o ReadMe.o super0.o super1.o super-intel.o super-ddf.o sha1.o crc32.o msg.o bitmap.o platform-intel.o probe_roms.o
config.o: In function `load_conffile':
config.c:(.text+0x1684): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
config.c:(.text+0x15f9): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
config.o: In function `load_conffile':
config.c:(.text+0x1684): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
config.c:(.text+0x15f9): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
*       >> Copying to bincache...
* Gentoo Linux Genkernel; Version 3.4.24
* Running with options: --mdadm --mdadm-config=/etc/mdadm.conf --makeopts=-j4 --install ramdisk

* ERROR: Could not strip mdadm binaries!

* -- 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 9 Richard Scott 2012-07-20 08:22:31 UTC
I've just tested and this is still the case with Genkernel 3.4.24_p2

Perhaps having a statically compiled mdadm should be made a requirement as its needed for installing genkernel?
Comment 10 Richard Scott 2012-07-20 08:23:03 UTC
latest output:

* Gentoo Linux Genkernel; Version 3.4.24_p2
* Running with options: --mdadm --mdadm-config=/etc/mdadm.conf --makeopts=-j4 --install ramdisk

* Linux Kernel 3.4.2-hardened-r1 for x86_64...
* blkid: >> Using cache
* busybox: >> Using cache
* initramfs: >> Initializing...
*         >> Appending base_layout cpio data...
*         >> Appending auxilary cpio data...
*         >> Appending busybox cpio data...
*         >> Appending mdadm cpio data...
*               MDADM: Adding support (compiling binaries)...
* mdadm: >> Compiling...
*       >> Copying to bincache...
strip: 'sbin/mdadm': No such file
strip: 'sbin/mdmon': No such file
* ERROR: Could not strip mdadm binaries!

* -- Grepping log... --

gcc -Os -DUSE_PTHREADS   -c -o monitor.o monitor.c
gcc -Os -DUSE_PTHREADS   -c -o managemon.o managemon.c
gcc -static -o mdadm mdadm.o config.o mdstat.o  ReadMe.o util.o Manage.o Assemble.o Build.o Create.o Detail.o Examine.o Grow.o Monitor.o dlink.o Kill.o Query.o Incremental.o mdopen.o super0.o super1.o super-ddf.o super-intel.o bitmap.o restripe.o sysfs.o sha1.o mapfile.o crc32.o sg_io.o msg.o platform-intel.o probe_roms.o
gcc -static -pthread -Wl,-z,now -o mdmon mdmon.o monitor.o managemon.o util.o mdstat.o sysfs.o config.o Kill.o sg_io.o dlink.o ReadMe.o super0.o super1.o super-intel.o super-ddf.o sha1.o crc32.o msg.o bitmap.o platform-intel.o probe_roms.o
config.o: In function `load_conffile':
config.c:(.text+0x1684): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
config.c:(.text+0x15f9): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
config.o: In function `load_conffile':
config.c:(.text+0x1684): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
config.c:(.text+0x15f9): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
*       >> Copying to bincache...
* Gentoo Linux Genkernel; Version 3.4.24_p2
* Running with options: --mdadm --mdadm-config=/etc/mdadm.conf --makeopts=-j4 --install ramdisk

* ERROR: Could not strip mdadm binaries!

* -- End log... --

* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-10-13 21:36:14 UTC
Please retest with genkernel 3.4.43. Something isn't right of the path of the old version you are using.