As of udev-167 libudev is linked against librt, but the lvm2 build system hardcodes -ludev leading to undefined references. Reproducible: Always Steps to Reproduce: 1. emerge -1 =sys-fs/udev-167 2. echo "sys-fs/lvm2 static" >> /etc/portage/package.use 3. emerge -1 sys-fs/lvm2 Actual Results: cc -march=native -O2 -pipe -march=native -O2 -pipe -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-s trings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wform at-security -Wredundant-decls -O2 -march=native -O2 -pipe -fPIC -Wall -Wundef -Wshadow -Wcast-align -W write-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.4.4/../../../../lib64/libudev.a(libudev-util.o): In function `usec_monotonic':(.text+0x24d): undefined reference to `clock_gettime'collect2: ld returned 1 exit statusmake[1]: *** [dmsetup.static] Error 1 make[1]: Leaving directory `/var/tmp/portage/sys-fs/lvm2-2.02.84/work/LVM2.2.02.84/tools'make: *** [tools.device-mapper] Error 2 Portage 2.1.9.45 (default/linux/amd64/10.0/desktop/gnome, gcc-4.4.4, glibc-2.13-r2, 2.6.38.2 x86_64) ================================================================= System uname: Linux-2.6.38.2-x86_64-Intel-R-_Core-TM-_i5-2500_CPU_@_3.30GHz-with-gentoo-2.0.2 Timestamp of tree: Thu, 31 Mar 2011 04:15:01 +0000 app-shells/bash: 4.2_p8 dev-lang/python: 2.7.1-r1, 3.1.3-r1 dev-util/cmake: 2.8.4 sys-apps/baselayout: 2.0.2 sys-apps/openrc: 0.8.0 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.10.3, 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 Q3AEULA RTCW-ETEULA AdobeFlash-10.1" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" 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="-march=native -O2 -pipe" 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="ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://distfiles.gentoo.org/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" 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.de.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gdu gif gnome gnome-keyring gpm gstreamer gtk iconv ipv6 jpeg lcms ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus 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 tiff truetype udev unicode usb vaapi vim-syntax 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="keyboard mouse 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="intel" 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
Created attachment 267953 [details, diff] proposed patch
Created attachment 267955 [details, diff] ebuild diff using the new patch
Had same problem here. The patch here fixed it. Thanks
Thanks, patch works. But please note, this bug is a duplicate of bug 357597.
Sorry that I didn't find the previous bug report. As it was obvious for me that this problem is caused by the new udev I only checked for bugs mentioning it explicitely. Will do better next time. Am I supposed to attach my patch there or how should I proceed? Please note that my patch isn't perfect anyway as the patch should only be applied if >=udev-167 is installed. But I don't know how to do check that condition in this ebuild.
*** Bug 357597 has been marked as a duplicate of this bug. ***
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
Worked perfectly, thank you.
The patch is not suitable. I have committed a fix using pkg-config correctly to get the libraries to link against. agk: you'll probably want the patch for upstream. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-fs/lvm2/files/lvm2-2.02.84-udev-pkgconfig.patch?revision=1.1&view=markup