Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291217 - sys-fs/lvm2-2.02.51-r2 fails to compile with USE=selinux
Summary: sys-fs/lvm2-2.02.51-r2 fails to compile with USE=selinux
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
Depends on:
Reported: 2009-10-30 19:17 UTC by Chris PeBenito (RETIRED)
Modified: 2011-02-19 09:06 UTC (History)
3 users (show)

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

config.log (config.log,89.57 KB, text/plain)
2009-11-09 15:26 UTC, Chris PeBenito (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Chris PeBenito (RETIRED) gentoo-dev 2009-10-30 19:17:00 UTC
Fails due to missing linkage with selinux libraries.  Should be fixed by adding -lselinux.

x86_64-pc-linux-gnu-gcc -march=nocona -O2 -maccumulate-outgoing-args -frename-registers -fforce-addr -pipe -march=nocona -O2 -maccumulate-outgoing-args -frename-registers -fforce-addr -pipe -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -O2 -march=nocona -O2 -maccumulate-outgoing-args -frename-registers -fforce-addr -pipe -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -O2 -Wl,-z,relro -Wl,-z,combreloc -Wl,-z,noexecstack -Wl,-z,noexecheap -Wl,-z,relro -Wl,-z,combreloc -Wl,-z,noexecstack -Wl,-z,noexecheap -Wl,--export-dynamic -L./libdm -L./lib -L./daemons/dmeventd -Wl,-z,relro -Wl,-z,combreloc -Wl,-z,noexecstack -Wl,-z,noexecheap -Wl,--export-dynamic -L../libdm -L../lib -L../daemons/dmeventd -static \
	      -L../libdm/ioctl \
		  -o dmsetup.static dmsetup.o \
		  -ldevmapper -lpthread
../libdm/ioctl/libdevmapper.a(libdm-common.o): In function `dm_set_selinux_context':
libdm-common.c:(.text+0x11c7): undefined reference to `is_selinux_enabled'
libdm-common.c:(.text+0x11da): undefined reference to `matchpathcon'
libdm-common.c:(.text+0x122d): undefined reference to `lsetfilecon'
libdm-common.c:(.text+0x123f): undefined reference to `freecon'
libdm-common.c:(.text+0x1342): undefined reference to `freecon'
collect2: ld returned 1 exit status
make[1]: *** [dmsetup.static] Error 1
make[1]: Leaving directory `/tmp/portage/sys-fs/lvm2-2.02.51-r2/work/LVM2.2.02.51/tools'
make: *** [tools.device-mapper] Error 2
Comment 1 Chris PeBenito (RETIRED) gentoo-dev 2009-10-30 19:36:28 UTC
I manually added in "-lselinux -lsepol" into the compile commands in tools/Makefile and it built successfully.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-11-04 07:25:10 UTC
Can you please post your config.log and emerge --info?

With --enable-selinux, LIBS should have had -lsepol -lselinux. Instead it only had -lpthread.
Comment 3 Robert Piasek (RETIRED) gentoo-dev 2009-11-06 12:48:25 UTC
Same problem here. 2.02.45-r2 is the last working one.
Comment 4 Alasdair Kergon 2009-11-06 13:05:42 UTC
(I think this broke upstream during some changes to the build scripts, but it should've been fixed by 2.02.54.)
Comment 5 Chris PeBenito (RETIRED) gentoo-dev 2009-11-09 15:25:02 UTC
Portage 2.2_rc48 (selinux/v2refpolicy/amd64, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r3 x86_64)
System uname: Linux-2.6.30-gentoo-r3-x86_64-Intel-R-_Core-TM-2_CPU_T5600_@_1.83GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 05 Nov 2009 02:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.9
dev-lang/python:     2.6.3
dev-python/pycrypto: 2.0.1-r8
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=nocona -O2 -maccumulate-outgoing-args -frename-registers -fforce-addr -pipe"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/cursors/xorg-x11/default"
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/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -maccumulate-outgoing-args -frename-registers -fforce-addr -pipe -finline-functions"
FEATURES="assume-digests ccache cvs distlocks fixpackages loadpolicy news nodoc parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms sign unmerge-logs unmerge-orphans userfetch"
INSTALL_MASK=" /usr/share/applications/mplayer-bin.desktop /usr/share/applications/seamonkey-bin.desktop /usr/share/pixmaps/seamonkey-bin.png /usr/bin/seamonkey-bin /opt/seamonkey/[A-Z]* /opt/seamonkey/[a-i]* /opt/seamonkey/[m-z]*"
LDFLAGS="-Wl,-z,relro -Wl,-z,combreloc -Wl,-z,noexecstack -Wl,-z,noexecheap"
LINGUAS="en en_US"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/usr/local/portage/layman/java-overlay /home/portage.local"
USE="X a52 acpi alsa amd64 audit avahi avi berkdb bitmap-fonts bluetooth bzip2 cdr cli consolekit cracklib crypt cups daap dbus dlloader dri dvd dvdr encode evo exif faad firefox foomaticdb gdbm gif gnome gnome-keyring gstreamer gtk gtk2 gtkhtml hal iconv ipod ipv6 jpeg lcms libnotify logrotate mad mmx mng modules mp3 mp4 mpeg mudflap nautilus ncurses networkmanager notify nptl nptlonly nvidia offensive ofx ogg opengl openmp pam pcre pdf pdflib png pppd python quicktime readline reflection rtc sdl selinux session smp spell spl sse sse2 ssl ssse3 startup-notification svg taglib tiff truetype udev unicode vorbis wmf xcomposite xorg xpm xv xvid zeroconf zlib" ALSA_CARDS="hda-intel" 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 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" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv" 
Comment 6 Chris PeBenito (RETIRED) gentoo-dev 2009-11-09 15:26:38 UTC
Created attachment 209748 [details]
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-11-09 21:44:17 UTC
Should be fixed now, please test.
Comment 8 Chris PeBenito (RETIRED) gentoo-dev 2009-11-11 01:48:55 UTC
works for me.  thanks
Comment 9 Ewald Tienkamp 2009-11-15 00:32:04 UTC
This new sys-fs/lvm2-2.02.51-r2 solves the problem for me as well. I do have to note, however, that -r2 is still marked unstable, and -r1 remains with this exact compile error. Changing package.keywords worked like a charm though. Thanks!
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-11-15 00:39:58 UTC
backported now to -r1.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-11-30 00:25:46 UTC
pebenito: please retest on 2.02.51-r3.
Comment 12 Chris PeBenito (RETIRED) gentoo-dev 2009-11-30 14:44:53 UTC
2.02.51-r3 looks good here.
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-11-30 21:05:15 UTC
Thanks, I fixed it in a different way to try and make another problem get easier too.
Comment 14 Kunalagon Umuhanik 2011-02-19 09:06:11 UTC
I am trying to compile version sys-fs/lvm2-2.02.84, but same problem.

I had to add -static flag to be able to succesfuly compile.