Building mdadm with gcc-4.1.1 won't work, gcc-3.4.6 works. The relevant bit: >>> Source unpacked. gcc -Wall -Werror -Wstrict-prototypes -DCONFFILE=\"/etc/mdadm.conf\" -march=i686 -Os -pipe -mmmx -msse -fomit-frame-pointer -DSendmail=\""/usr/sbin/sendmail -t"\" -c -o mdadm.o mdadm.c gcc -Wall -Werror -Wstrict-prototypes -DCONFFILE=\"/etc/mdadm.conf\" -march=i686 -Os -pipe -mmmx -msse -fomit-frame-pointer -DSendmail=\""/usr/sbin/sendmail -t"\" -c -o config.o config.c cc1: warnings being treated as errors config.c: In function 'free_line': config.c:192: warning: dereferencing type-punned pointer will break strict-aliasing rules config.c:192: warning: dereferencing type-punned pointer will break strict-aliasing rules config.c: In function 'devline': config.c:245: warning: dereferencing type-punned pointer will break strict-aliasing rules config.c:245: warning: dereferencing type-punned pointer will break strict-aliasing rules config.c: In function 'arrayline': config.c:279: warning: dereferencing type-punned pointer will break strict-aliasing rules config.c:279: warning: dereferencing type-punned pointer will break strict-aliasing rules config.c: In function 'mailline': config.c:384: warning: dereferencing type-punned pointer will break strict-aliasing rules config.c:384: warning: dereferencing type-punned pointer will break strict-aliasing rules config.c: In function 'programline': config.c:399: warning: dereferencing type-punned pointer will break strict-aliasing rules config.c:399: warning: dereferencing type-punned pointer will break strict-aliasing rules make: *** [config.o] Error 1 Seems like "cc1: warnings being treated as errors" is the show stopper here. Ofcourse, the real problem seems to be untidy code :P emerge --info Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.3.6-r3, 2.6.16-gentoo-r3 i686) ================================================================= System uname: 2.6.16-gentoo-r3 i686 AMD Athlon(tm) XP Gentoo Base System version 1.6.14 ccache version 2.3 [disabled] dev-lang/python: 2.3.5-r2, 2.4.2 dev-python/pycrypto: [Not Present] dev-util/ccache: 2.3 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=i686 -Os -pipe -mmmx -msse -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=i686 -Os -pipe -mmmx -msse -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 acl apache2 apm audiofile avi berkdb bitmap-fonts bzip2 cli crypt cups dba dedicated dri eds emboss encode ethereal expat foomaticdb gd gdbm gif gmp gpm gstreamer idn imagemagick imap imlib innodb ipv6 isdnlog java jpeg ldap libg++ libwww mad maildir mhash mikmod mmx mp3 mpeg mysql ncurses nls nptl odbc ogg oss pam pcre pdflib perl php png postgres pppd python quicktime readline recode reflection samba sasl sdl session slang slp spell spl ssl tcpd tetex tiff truetype truetype-fonts type1-fonts udev usb vorbis xml xmms xorg xv zlib userland_GNU kernel_linux elibc_glibc" Unset: CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
Reopen if 2.4.1-r1 doesn't work for you.
*** Bug 137474 has been marked as a duplicate of this bug. ***
ACCEPT_KEYWORDS="~amd64" emerge mdadm fixed the problem on amd64 and installes mdadn 2.5