After a global upgrade, lvm2 failed to emerge with "static" USE flag. Without "static", emerge process ends successfully, installing lvm2 as usual. Apparently, emerge fails to compile dmsetup.static. Reproducible: Always Steps to Reproduce: 1. USE="static" emerge -v =sys-fs/lvm2-2.02.84 2. LIBS="-lrt" USE="static" emerge -v =sys-fs/lvm2-2.02.84 do not resolve the issue. Actual Results: cc -O2 -pipe -march=native -msse -msse2 -msse3 -mmmx -m3dnow -fPIC -O2 -pipe -march=native -msse -msse2 -msse3 -mmmx -m3dnow -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -O2 -O2 -pipe -march=native -msse -msse2 -msse3 -mmmx -m3dnow -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -L./libdm -L./lib -L./daemons/dmeventd -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -L../libdm -L../lib -L../daemons/dmeventd -Wl,--no-export-dynamic -static -L../libdm/ioctl \ -o dmsetup.static dmsetup.o -ldevmapper -ludev -ludev /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../lib64/libudev.a(libudev-util.o): In function `usec_monotonic': (.text+0xc5d): undefined reference to `clock_gettime' collect2: ld devolvió el estado de salida 1 make[1]: *** [dmsetup.static] Error 1 make[1]: se sale del directorio `/var/tmp/portage/sys-fs/lvm2-2.02.84/work/LVM2.2.02.84/tools' make: *** [tools.device-mapper] Error 2 emake failed * ERROR: sys-fs/lvm2-2.02.84 failed (compile phase): * compile fail * * Call stack: * ebuild.sh, line 56: Called src_compile * environment, line 3775: Called die * The specific snippet of code: * emake || die "compile fail" Reading a little, I've found that -lrt compile option resolves this issue. Compiling with LIBS="-lrt" seems to compile fine, but emerge fails anyway with "emake failed". The log does not shows anything useful: cc -O2 -pipe -march=native -msse -msse2 -msse3 -mmmx -m3dnow -fPIC -O2 -pipe -march=native -msse -msse2 -msse3 -mmmx -m3dnow -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -O2 -O2 -pipe -march=native -msse -msse2 -msse3 -mmmx -m3dnow -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -O2 -Wl,-O1 -Wl,--as-needed -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -L./libdm -L./lib -L./daemons/dmeventd -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -L../libdm -L../lib -L../daemons/dmeventd -Wl,--no-export-dynamic -static -L../libdm/ioctl \ -o dmsetup.static dmsetup.o -ldevmapper -ludev -lrt -ludev make[1]: se sale del directorio `/var/tmp/portage/sys-fs/lvm2-2.02.84/work/LVM2.2.02.84/tools' emake failed * ERROR: sys-fs/lvm2-2.02.84 failed (compile phase): * compile fail * * Call stack: * ebuild.sh, line 56: Called src_compile * environment, line 3776: Called die * The specific snippet of code: * emake || die "compile fail" Expected Results: sys-fs/lvm2 should be compiled successfully with static binaries. Manually going to /var/tmp/portage/sys-fs/lvm2-2.02.84/work/LVM2.2.02.84/tools directory and running the entire compile command, dmsetup.static compiles without error (using -lrt). However, I do not know why emerge fails to complete the compiling process. My make.conf is: CXXFLAGS="${CFLAGS}" CHOST="x86_64-pc-linux-gnu" USE="mmx mmxext sse sse2 sse3 3dnow 3dnowext \ -ipv6 -hal -doc -cups -joystick -sqlite -dhcpcd -readline -gd -gnome -k$ bash-completion opengl dri branding alsa -pulseaudio unicode \ scim anthy -accessibility custom-optimization" VIDEO_CARDS="nouveau vesa nvidia" MAKEOPTS="-j3" GENTOO_MIRRORS="http://gentoo.osuosl.org/" INPUT_DEVICES="evdev synaptics" LINGUAS="es" ACCEPT_KEYWORDS="~amd64" source /var/lib/layman/make.conf ACCEPT_LICENSE="dlj-1.1 AdobeFlash-10.1 skype-eula" PKGDIR="/usr/portage/"
Portage 2.2.0_alpha26 (default/linux/amd64/10.0, gcc-4.5.2, glibc-2.13-r1, 2.6.38-rc7 x86_64) ================================================================= System uname: Linux-2.6.38-rc7-x86_64-AMD_Turion-tm-_64_X2-with-gentoo-2.0.1 Timestamp of tree: Sat, 05 Mar 2011 10:00:01 +0000 app-shells/bash: 4.1_p10 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.1-r1, 3.1.3-r1 dev-util/cmake: 2.8.4 sys-apps/baselayout: 2.0.1-r1 sys-apps/openrc: 0.7.0 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 sys-devel/gcc: 4.5.2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 virtual/os-headers: 2.6.36.1 (sys-kernel/linux-headers) Repositories: gentoo java-overlay mozilla sunrise xen x11 otamay Installed sets: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA dlj-1.1 AdobeFlash-10.1 skype-eula" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -msse -msse2 -msse3 -mmmx -m3dnow -fPIC" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=native -msse -msse2 -msse3 -mmmx -m3dnow -fPIC" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://gentoo.osuosl.org/" LANG="es_MX.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="es" MAKEOPTS="-j3" PKGDIR="/usr/portage/" 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/java-overlay /var/lib/layman/mozilla /var/lib/layman/sunrise /var/lib/layman/xen /var/lib/layman/x11 /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext acl alsa amd64 anthy bash-completion berkdb branding bzip2 cli cracklib crypt custom-optimization cxx dri fortran gdbm gpm iconv mmx mmxext modules mudflap multilib ncurses nls nptl nptlonly opengl openmp pam pcre perl pppd python scim session sse sse2 sse3 ssl sysfs tcpd unicode 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" 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="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau vesa nvidia" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
same here, works without the static use-flag Portage 2.1.9.45 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.13-r2, 2.6.37.1-1.2-desktop x86_64) ================================================================= System uname: Linux-2.6.37.1-1.2-desktop-x86_64-AMD_Phenom-tm-_II_X6_1100T_Processor-with-gentoo-2.0.2 Timestamp of tree: Sun, 03 Apr 2011 00:30:01 +0000 app-shells/bash: 4.2_p8 dev-lang/python: 2.6.6-r1, 2.7.1-r1, 3.1.3-r1 sys-apps/baselayout: 2.0.2 sys-apps/openrc: 0.8.0 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.68 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.21 sys-devel/gcc: 4.4.4-r2, 4.5.2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82 virtual/os-headers: 2.6.38 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j9" 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="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gdu gif gpm iconv ipv6 ithreads jpeg kde lcms ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session spell sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb v4l v4l2 vorbis x264 xcb xml xorg xulrunner xv xvid 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" 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="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I've noticed that sys-fs/udev-9999 was installed. Going back to the stable release (=sys-fs/udev-151-r4) resolved the issue, allowing lvm2 being built with static use flag.
The same problem here (+static, amd64), but with udev-167-r1.
Same here. confirm problem with static amd64 and udev-167-r1
Marking as dupe of bug #361429 since that also has a patch attached. *** This bug has been marked as a duplicate of bug 361429 ***
Just tested the patch and it worked! \o/ Needed to emerge lvm2 as part of the gnome-light meta, so thanks to the patch I have a usable system now. Thanks