It is not possible to emerge dmraid with the static flag at installation when rooted with the install-cd. Reproducible: Always Steps to Reproduce: 1.boot with the newest install-cd 2.croot 3.USE="static" emerge dmraid fails Expected Results: i686-pc-linux-gnu-gcc -c -I. -I../include -I../lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE format/ddf/ddf1_dump.c -o format/ddf/ddf1_dump.o i686-pc-linux-gnu-gcc -MM -MF format/partition/dos.d -I. -I../include -I../lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE format/partition/dos.c; \ i686-pc-linux-gnu-gcc -c -I. -I../include -I../lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE format/partition/dos.c -o format/partition/dos.o rm -f ../lib/libdmraid.a ar r ../lib/libdmraid.a activate/activate.o activate/devmapper.o device/ata.o device/scan.o device/scsi.o display/display.o format/format.o locking/locking.o log/log.o metadata/log_ops.o metadata/metadata.o metadata/reconfig.o misc/file.o misc/init.o misc/lib_context.o misc/misc.o misc/workaround.o mm/dbg_malloc.o format/ataraid/asr.o format/ataraid/hpt37x.o format/ataraid/hpt45x.o format/ataraid/isw.o format/ataraid/jm.o format/ataraid/lsi.o format/ataraid/nv.o format/ataraid/pdc.o format/ataraid/sil.o format/ataraid/via.o format/ddf/ddf1.o format/ddf/ddf1_lib.o format/ddf/ddf1_crc.o format/ddf/ddf1_cvt.o format/ddf/ddf1_dump.o format/partition/dos.o ar: creating ../lib/libdmraid.a i686-pc-linux-gnu-ranlib ../lib/libdmraid.a ../lib/libdmraid.a ../lib/libdmraid.a make[1]: Leaving directory `/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/work/dmraid/1.0.0.rc14/lib' make -C man make[1]: Entering directory `/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/work/dmraid/1.0.0.rc14/man' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/work/dmraid/1.0.0.rc14/man' make -C tools make[1]: Entering directory `/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/work/dmraid/1.0.0.rc14/tools' i686-pc-linux-gnu-gcc -MM -MF dmraid.d -I -I. -I../include -I../lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE dmraid.c; \ i686-pc-linux-gnu-gcc -c -I -I. -I../include -I../lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE dmraid.c -o dmraid.o i686-pc-linux-gnu-gcc -MM -MF commands.d -I -I. -I../include -I../lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE commands.c; \ i686-pc-linux-gnu-gcc -c -I -I. -I../include -I../lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE commands.c -o commands.o i686-pc-linux-gnu-gcc -MM -MF toollib.d -I -I. -I../include -I../lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE toollib.c; \ i686-pc-linux-gnu-gcc -c -I -I. -I../include -I../lib -O2 -march=pentium3 -pipe -fomit-frame-pointer -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE -O2 -DDMRAID_NATIVE_LOG -DHAVE_GETOPTLONG -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -DDMRAID_TEST -O2 -D_LARGEFILE64_SOURCE toollib.c -o toollib.o i686-pc-linux-gnu-gcc -o dmraid dmraid.o commands.o toollib.o -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -static -L../lib \ -L/lib -ldmraid -ldevmapper /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../libdevmapper.a(libdm-common.o): In function `_check_udev_is_running': (.text+0x116f): undefined reference to `udev_new' /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../libdevmapper.a(libdm-common.o): In function `_check_udev_is_running': (.text+0x1181): undefined reference to `udev_queue_new' /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../libdevmapper.a(libdm-common.o): In function `_check_udev_is_running': (.text+0x1193): undefined reference to `udev_queue_get_udev_is_active' /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../libdevmapper.a(libdm-common.o): In function `_check_udev_is_running': (.text+0x11a1): undefined reference to `udev_queue_unref' /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../libdevmapper.a(libdm-common.o): In function `_check_udev_is_running': (.text+0x11a9): undefined reference to `udev_unref' /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../libdevmapper.a(libdm-common.o): In function `_check_udev_is_running': (.text+0x12c4): undefined reference to `udev_unref' collect2: ld returned 1 exit status make[1]: *** [dmraid] Error 1 make[1]: Leaving directory `/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/work/dmraid/1.0.0.rc14/tools' make: *** [tools] Error 2 * ERROR: sys-fs/dmraid-1.0.0_rc14 failed: * emake failed * * Call stack: * ebuild.sh, line 54: Called src_compile * environment, line 3437: Called die * The specific snippet of code: * emake -j1 || die "emake failed" * * If you need support, post the output of 'emerge --info =sys-fs/dmraid-1.0.0_rc14', * the complete build log and the output of 'emerge -pqv =sys-fs/dmraid-1.0.0_rc14'. * The complete build log is located at '/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/temp/environment'. * S: '/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/work/dmraid/1.0.0.rc14' >>> Failed to emerge sys-fs/dmraid-1.0.0_rc14, Log file: >>> '/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/temp/build.log' * Messages for package sys-fs/dmraid-1.0.0_rc14: * ERROR: sys-fs/dmraid-1.0.0_rc14 failed: * emake failed * * Call stack: * ebuild.sh, line 54: Called src_compile * environment, line 3437: Called die * The specific snippet of code: * emake -j1 || die "emake failed" * * If you need support, post the output of 'emerge --info =sys-fs/dmraid-1.0.0_rc14', * the complete build log and the output of 'emerge -pqv =sys-fs/dmraid-1.0.0_rc14'. * The complete build log is located at '/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/temp/environment'. * S: '/var/tmp/portage/sys-fs/dmraid-1.0.0_rc14/work/dmraid/1.0.0.rc14' livecd / #
Please try again with the latest revision of _rc16 , as _rc14 is quite old. It is possible though that _rc16 will also fail.. Upstream has changed the way dmraid builds statically in their CVS version, but there hasn't been any official release with the patches included yet (and the little bit of experimentation that I was able to do with the patches did not result in a healthy dmraid tool). I'll keep on top of it, but if _rc16 doesn't work then it could be some time before a static version of dmraid will be available. Note, though, that genkernel includes its own version of dmraid (which is maintained entirely independently of this one, and i believe gets compiled statically), and you could use that version for any initramfs/initrd/etc. you wish to build, in the meantime.
I looked into this a little further, and it will also fail with _rc16. The main issue is fairly simple; since the ./configure script doesn't use pkg-config it doesn't have a proper set of libs when compiled statically. It has been noted upstream that they should be using pkg-config to get this info, but they still haven't converted the configure script. I'm not going to do the conversion since ./configure in CVS HEAD is fairly different from the one in _rc16. However, I think I can make a workable update within the ebuild.
Created attachment 243251 [details, diff] Patch for dmraid-1.0.0_rc16-r1.ebuild This patch updates the ebuild with additional src_prepare() code which, when built with USE="static", will append the output of "pkg-config --libs --static devmapper" to the linking of the dmraid tools. Please test; it seems to compile and run fine for me.
Fixed version 1.0.0_rc16-r2 committed, should be on your local rsync mirror in a few hours.