OK, this is a regression. mdadm-2.6.4-r1 compiles fine with both gcc-4.2.3 and 4.3.0. -r2 doesn't compile with either one, with the failure in the newly compiling mdassemble code. Having read the bug requesting mdassemble, I've a suggestion too. Make the mdassemble thing USE flag based as some of us either don't do mdraid until after boot or don't have an initrd/initramfs, assembling the root mdraid on the kernel command line directly, and thus don't need mdassamble, particularly when it's causing compile trouble. I'll attach emerge --info. Here's the errors (using gcc-4.2.3). In file included from /usr/include/sys/types.h:220, from /usr/include/stdlib.h:320, from dlink.c:6: /usr/include/sys/select.h:112: error: conflicting types for 'select' /usr/include/sys/select.h:112: error: previous declaration of 'select' was here /usr/include/sys/select.h:125: error: conflicting types for 'pselect' /usr/include/sys/select.h:125: error: previous declaration of 'pselect' was here In file included from dlink.c:7: /usr/include/string.h:270: error: conflicting types for 'strerror_r' /usr/include/string.h:282: error: previous declaration of 'strerror_r' was here In file included from /usr/include/sys/types.h:220, from mdadm.h:40, from util.c:30: /usr/include/sys/select.h:112: error: conflicting types for 'select' /usr/include/sys/select.h:112: error: previous declaration of 'select' was here /usr/include/sys/select.h:125: error: conflicting types for 'pselect' /usr/include/sys/select.h:125: error: previous declaration of 'pselect' was here In file included from mdadm.h:49, from util.c:30: /usr/include/string.h:282: error: conflicting types for 'strerror_r' /usr/include/string.h:270: error: previous declaration of 'strerror_r' was here In file included from sha1.c:32: /usr/include/string.h:270: error: conflicting types for 'strerror_r' /usr/include/string.h:282: error: previous declaration of 'strerror_r' was here In file included from /usr/include/sys/types.h:220, from /usr/include/stdlib.h:320, from pwgr.c:6: /usr/include/sys/select.h:112: error: conflicting types for 'select' /usr/include/sys/select.h:112: error: previous declaration of 'select' was here /usr/include/sys/select.h:125: error: conflicting types for 'pselect' /usr/include/sys/select.h:125: error: previous declaration of 'pselect' was here make: *** [mdassemble] Error 1 make: *** Waiting for unfinished jobs.... * * ERROR: sys-fs/mdadm-2.6.4-r2 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2397: Called die * The specific snippet of code: * emake CROSS_COMPILE=${CHOST}- CWFLAGS="-Wall" CXFLAGS="${CFLAGS}" all mdassemble || die "emake failed
Created attachment 147695 [details] emerge --info On the errors in the originating comment, yes, that's how they were spit out; it said the previous declaration was "here" but didn't say where "here" was.
Oops! CFLAGS related, CFLAGS="-march=k8 -O2 -pipe" emerge -1 mdadm works (with both gcc-4.2.3 and 4.3.0). So marking invalid. I'll note which one it was when I figure it out, in case anyone else comes across the problem.
It was -combine. Should have known to try removing that one first! Sorry for the noise. (It'd still be nice to have USE flag control over mdassemble, however.) Duncan
(In reply to comment #3) > It was -combine. Should have known to try removing that one first! Sorry for > the noise. > > (It'd still be nice to have USE flag control over mdassemble, however.) > > Duncan > I today got a similar problem with net-fs/samba-client just in case someone uses -combine too and gets the following error: >>> Compiling source in /var/tmp/portage/net-fs/samba-client-3.3.7/work/samba-3.3.7/source ... In file included from /usr/include/sys/time.h:31, from client/mtab.c:34: /usr/include/sys/select.h:109: error: conflicting types for ‘select’ /usr/include/sys/select.h:109: note: previous declaration of ‘select’ was here /usr/include/sys/select.h:121: error: conflicting types for ‘pselect’ /usr/include/sys/select.h:121: note: previous declaration of ‘pselect’ was here thanks