Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361429 - sys-fs/lvm2 +static does not build with =udev-167
Summary: sys-fs/lvm2 +static does not build with =udev-167
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
: 357597 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-31 09:28 UTC by Rainer Müller
Modified: 2011-05-05 00:28 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
proposed patch (lvm2-2.02.84-udev-librt.patch,1.06 KB, patch)
2011-03-31 09:32 UTC, Rainer Müller
Details | Diff
ebuild diff using the new patch (lvm2-2.02.84.ebuild.diff,440 bytes, patch)
2011-03-31 09:32 UTC, Rainer Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Müller 2011-03-31 09:28:56 UTC
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
Comment 1 Rainer Müller 2011-03-31 09:32:25 UTC
Created attachment 267953 [details, diff]
proposed patch
Comment 2 Rainer Müller 2011-03-31 09:32:53 UTC
Created attachment 267955 [details, diff]
ebuild diff using the new patch
Comment 3 Steve Warren 2011-04-03 00:15:08 UTC
Had same problem here. The patch here fixed it. Thanks
Comment 4 Andrew Savchenko gentoo-dev 2011-04-07 22:59:44 UTC
Thanks, patch works.

But please note, this bug is a duplicate of bug 357597.
Comment 5 Rainer Müller 2011-04-08 12:36:40 UTC
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.
Comment 6 Arun Raghavan (RETIRED) gentoo-dev 2011-04-08 14:18:47 UTC
*** Bug 357597 has been marked as a duplicate of this bug. ***
Comment 7 Luis de Bethencourt 2011-04-08 15:43:46 UTC
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
Comment 8 Otamay 2011-04-08 16:41:21 UTC
Worked perfectly, thank you.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-04-09 23:49:43 UTC
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