Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339675 - sys-fs/lvm2-2.02.73-r1[selinux]: Package 'libselinux', required by 'devmapper', not found
Summary: sys-fs/lvm2-2.02.73-r1[selinux]: Package 'libselinux', required by 'devmapper...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 07:44 UTC by blub bla
Modified: 2010-10-07 16:36 UTC (History)
2 users (show)

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


Attachments
emerge .... and fail.... (attachment,31.85 KB, text/plain)
2010-10-04 07:47 UTC, blub bla
Details
lvm-build.log (lvm-build.log,302.55 KB, text/plain)
2010-10-04 18:14 UTC, blub bla
Details
cryptsetup-config.log (cryptsetup-config.log,57.42 KB, text/plain)
2010-10-06 07:08 UTC, blub bla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description blub bla 2010-10-04 07:44:48 UTC
trying to move to selinux and cryptsetup failes to emerge

Reproducible: Always

Steps to Reproduce:
1. emerge -uvNDp world or emerge cryptsetup
2. compiling a bit
3. fail



Expected Results:  
i am expecting something like "successfully compiled cryptsetup"

 emerge --info
Portage 2.1.8.3 (selinux/v2refpolicy/amd64/hardened, gcc-4.3.4, glibc-2.11.2-r0, 2.6.35.7 x86_64)
=================================================================
System uname: Linux-2.6.35.7-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Mon, 04 Oct 2010 06:50:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 skype-eula"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
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/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages loadpolicy news parallel-fetch protect-owned sandbox selinux sesandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
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="/var/lib/layman/cryptelium"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="64bit aac aalib ace acl ads amd64 amrnb amrwb apache2 apm audit avahi berkdb boost bzip2 cairo cdda cdinstall cdr cdrom clamav cli cpudetection cracklib crypt curl cxx dar64 dbus devfs-compat divx dri embedded encode eselect examples extras ffmpeg fortran fpx frei0r ftp gd gdbm gif git glib glibc-compat20 glut gnutls gphoto2 gpm gs hardened hash hbci hddtemp hdri iconv icq ieee1394 innodb ipv6 jbig lame lcms ldap libsamplerate libwww lm_sensors lxc mad md5sum mdadm mdnsresponder-compat mikmod mmx mng modules mpeg mplayer mudflap multilib musepack mysql ncurses netboot network nfs nfsv4 nls nptl nsplugin oav ofx ogg openexr openft openmp oscar pam pcap pcre pdf perl pic pmu png pppd python q32 qemu rar rdp readline realmedia reflection rewrite rtc samba secure-delete selinux server session sftp slang smp snmp sound speex sse sse2 sse3 ssl ssse3 subversion svgz syslog tcpd tga theora threads threadsafe tiff truetype udev unicode upnp usb v4l webkit winbind xml xmlrpc xorg xv xvmc yahoo yv12 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 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" 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" RUBY_TARGETS="ruby18" USERLAND="GNU" 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, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

i hope i didnt miss anything for this bug report
Comment 1 blub bla 2010-10-04 07:47:05 UTC
Created attachment 249516 [details]
emerge .... and fail....

http://pastebin.com/aBQM3SpX
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2010-10-04 10:14:21 UTC
> libdevmapper.c:31: error: static declaration of ‘dm_task_set_cookie’ follows
> non-static declaration
> /usr/include/libdevmapper.h:176: error: previous declaration of
> ‘dm_task_set_cookie’ was here
> libdevmapper.c:32: error: static declaration of ‘dm_udev_wait’ follows
> non-static declaration
> /usr/include/libdevmapper.h:1198: error: previous declaration of ‘dm_udev_wait’
> was here

What version of lvm2 is installed? Post the output of,

# emerge portage-utils
# qfile -v libdevmapper.h
# emerge -pv lvm2

Does upgrading lvm2 help? Or remerging lvm2? Does qfile report libdevmapper.h to belong to lvm2, and only to lvm2?
Comment 3 blub bla 2010-10-04 11:22:21 UTC
> What version of lvm2 is installed? Post the output of,
> 
> # emerge portage-utils
> # qfile -v libdevmapper.h
> # emerge -pv lvm2
> 
> Does upgrading lvm2 help? Or remerging lvm2? Does qfile report libdevmapper.h
> to belong to lvm2, and only to lvm2?
> 

lvm2 is up to date
remerging did not help
looks like libdevmapper.h belongs only to lvm2

lvm2-2.02.73-r1

qfile -v libdevmapper.h says this:
sys-fs/lvm2-2.02.73-r1 (/usr/include/libdevmapper.h)

emerge -pv lvm2
[ebuild   R   ] sys-fs/lvm2-2.02.73-r1  USE="lvm1 readline (selinux) static (-clvm) (-cman)" 0 kB

Comment 4 blub bla 2010-10-04 11:26:32 UTC
  emerge app-portage/portage-utils
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-portage/portage-utils-0.3.1
>>> Downloading 'http://de-mirror.org/distro/gentoo/distfiles/portage-utils-0.3.1.tar.bz2'
--2010-10-04 13:09:29--  http://de-mirror.org/distro/gentoo/distfiles/portage-utils-0.3.1.tar.bz2
Auflösen des Hostnamen »de-mirror.org«.... 87.106.91.70
Verbindungsaufbau zu de-mirror.org|87.106.91.70|:80... verbunden.
HTTP Anforderung gesendet, warte auf Antwort... 200 OK
Länge: 89122 (87K) [application/x-tar]
In »»/usr/portage/distfiles/portage-utils-0.3.1.tar.bz2«« speichern.

100%[=============================================================================================================================>] 89.122       532K/s   in 0,2s

2010-10-04 13:09:29 (532 KB/s) - »»/usr/portage/distfiles/portage-utils-0.3.1.tar.bz2«« gespeichert [89122/89122]

 * portage-utils-0.3.1.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                                                                                  [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                            [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                           [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                          [ ok ]
 * CPV:  app-portage/portage-utils-0.3.1
 * REPO: gentoo
 * USE:  amd64 elibc_glibc kernel_linux multilib selinux userland_GNU
>>> Unpacking source...
>>> Unpacking portage-utils-0.3.1.tar.bz2 to /var/tmp/portage/app-portage/portage-utils-0.3.1/work
>>> Source unpacked in /var/tmp/portage/app-portage/portage-utils-0.3.1/work
>>> Compiling source in /var/tmp/portage/app-portage/portage-utils-0.3.1/work/portage-utils-0.3.1 ...
make -j9
sed -n '/^DECLARE_APPLET/s:.*(\(.*\)).*:#include "\1.c":p' applets.h > include_applets.h
x86_64-pc-linux-gnu-gcc -DEPREFIX=\"\" -DVERSION=\"0.3.1\" -DAPPLET_q -DAPPLET_qatom -DAPPLET_qcache -DAPPLET_qcheck -DAPPLET_qdepends -DAPPLET_qfile -DAPPLET_qgrep -DAPPLET_qlist -DAPPLET_qlop -DAPPLET_qmerge -DAPPLET_qpkg -DAPPLET_qsearch -DAPPLET_qsize -DAPPLET_qtbz2 -DAPPLET_quse -DAPPLET_qxpak -O2 -march=core2 -pipe -std=gnu99 -MM main.c > .depend
: q : qatom : qcache : qcheck : qdepends : qfile : qgrep : qlist : qlop : qmerge : qpkg : qsearch : qsize : qtbz2 : quse : qxpak :
x86_64-pc-linux-gnu-gcc -O2 -march=core2 -pipe -std=gnu99 -Wl,-O1 -Wl,--as-needed main.c -o q
>>> Source compiled.
>>> Test phase [not enabled]: app-portage/portage-utils-0.3.1

>>> Install portage-utils-0.3.1 into /var/tmp/portage/app-portage/portage-utils-0.3.1/image/ category app-portage
make -j9 install DESTDIR=/var/tmp/portage/app-portage/portage-utils-0.3.1/image/
mkdir -p /var/tmp/portage/app-portage/portage-utils-0.3.1/image//usr/bin/
cp q /var/tmp/portage/app-portage/portage-utils-0.3.1/image//usr/bin/
if [ ! -d CVS ] ; then \
                mkdir -p /var/tmp/portage/app-portage/portage-utils-0.3.1/image//usr/share/man/man1/ ; \
                for mpage in man/q.1 man/qatom.1 man/qcache.1 man/qcheck.1 man/qdepends.1 man/qfile.1 man/qgrep.1 man/qlist.1 man/qlop.1 man/qmerge.1 man/qpkg.1 man/qsearch.1 man/qsize.1 man/qtbz2.1 man/quse.1 man/qxpak.1 ; do \
                        [ -e $mpage ] \
                                && cp $mpage /var/tmp/portage/app-portage/portage-utils-0.3.1/image//usr/share/man/man1/ || : ;\
                done ; \
                mkdir -p /var/tmp/portage/app-portage/portage-utils-0.3.1/image//usr/share/doc/portage-utils-0.3.1 ; \
                for doc in TODO README qsync ; do \
                        cp $doc /var/tmp/portage/app-portage/portage-utils-0.3.1/image//usr/share/doc/portage-utils-0.3.1/ ; \
                done ; \
        fi
(cd /var/tmp/portage/app-portage/portage-utils-0.3.1/image//usr/bin/ ; \
                for applet in q qatom qcache qcheck qdepends qfile qgrep qlist qlop qmerge qpkg qsearch qsize qtbz2 quse qxpak; do \
                        [ ! -e "$applet" ] && ln -s q ${applet} ; \
                done \
        )
>>> Completed installing portage-utils-0.3.1 into /var/tmp/portage/app-portage/portage-utils-0.3.1/image/

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/bin/q
ecompressdir: bzip2 -9 /usr/share/man
ecompressdir: bzip2 -9 /usr/share/doc

>>> Installing (1 of 1) app-portage/portage-utils-0.3.1
!!! Unable to set SELinux security labels
 * /etc/portage/postsync.d/q-reinitialize has been installed for convenience
 * If you wish for it to be automatically run at the end of every --sync:
 *    # chmod +x /etc/portage/postsync.d/q-reinitialize
 * Normally this should only take a few seconds to run but file systems
 * such as ext3 can take a lot longer.  To disable, simply do:
 *    # chmod -x /etc/portage/postsync.d/q-reinitialize

>>> Recording app-portage/portage-utils in "world" favorites file...

 * Messages for package app-portage/portage-utils-0.3.1:

 * /etc/portage/postsync.d/q-reinitialize has been installed for convenience
 * If you wish for it to be automatically run at the end of every --sync:
 *    # chmod +x /etc/portage/postsync.d/q-reinitialize
 * Normally this should only take a few seconds to run but file systems
 * such as ext3 can take a lot longer.  To disable, simply do:
 *    # chmod -x /etc/portage/postsync.d/q-reinitialize
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2010-10-04 16:05:18 UTC
Comment #4 was unnecessary, but thanks.   Moving to maintainers.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2010-10-04 16:09:52 UTC
The problem seems to be that HAVE_DM_TASK_SET_COOKIE is never defined, but it should. 

lib/libdevmapper.c:

/* Compatibility for old device-mapper without udev support */
#ifndef HAVE_DM_TASK_SET_COOKIE
#define CRYPT_TEMP_UDEV_FLAGS   0
static int dm_task_set_cookie(struct dm_task *dmt, uint32_t *cookie, uint16_t flags) { return 0; }
static int dm_udev_wait(uint32_t cookie) { return 0; };

which is what this is all about too during ./configure of crypsetup:

checking for dm_task_set_cookie... no
configure: WARNING: The device-mapper library on your system has no udev support, udev support disabled.

So it looks like your sys-fs/lvm2 (libdevmapper is part of lvm2) is miscompiled.

Can you attach a build.log of sys-fs/lvm2 too?
Comment 7 blub bla 2010-10-04 18:14:16 UTC
Created attachment 249560 [details]
lvm-build.log

lvm-build.log
Comment 8 SpanKY gentoo-dev 2010-10-05 19:54:06 UTC
checking for dm_task_set_cookie... no

post the config.log for cryptsetup
Comment 9 blub bla 2010-10-05 20:09:14 UTC
(In reply to comment #8)
> checking for dm_task_set_cookie... no
> 
> post the config.log for cryptsetup
> 

i am sorry to ask, but
where do i find the config.log?
Comment 10 SpanKY gentoo-dev 2010-10-06 01:40:01 UTC
find /var/tmp/portage/sys-fs/cryptsetup* -name config.log
Comment 11 blub bla 2010-10-06 07:08:11 UTC
Created attachment 249705 [details]
cryptsetup-config.log

cryptsetup-config.log
Comment 12 SpanKY gentoo-dev 2010-10-06 15:20:14 UTC
configure:14913: checking for dm_task_set_cookie
configure:14913: x86_64-pc-linux-gnu-gcc -o conftest -O2 -march=core2 -pipe  -Wl,-O1 -Wl,--as-needed conftest.c   >&5
/var/tmp/portage/sys-fs/cryptsetup-1.1.2/temp/cc6V0k39.o: In function `main':
conftest.c:(.text+0x7): undefined reference to `dm_task_set_cookie'
collect2: ld returned 1 exit status
configure:14913: $? = 1

would help if it linked in the devmapper libs.  what does `pkg-config --libs devmapper` say ?
Comment 13 blub bla 2010-10-06 15:22:44 UTC
(In reply to comment #12)
> configure:14913: checking for dm_task_set_cookie
> configure:14913: x86_64-pc-linux-gnu-gcc -o conftest -O2 -march=core2 -pipe 
> -Wl,-O1 -Wl,--as-needed conftest.c   >&5
> /var/tmp/portage/sys-fs/cryptsetup-1.1.2/temp/cc6V0k39.o: In function `main':
> conftest.c:(.text+0x7): undefined reference to `dm_task_set_cookie'
> collect2: ld returned 1 exit status
> configure:14913: $? = 1
> 
> would help if it linked in the devmapper libs.  what does `pkg-config --libs
> devmapper` say ?
> 




# pkg-config --libs devmapper

-L/lib64 -ldevmapper

Comment 14 SpanKY gentoo-dev 2010-10-07 06:09:07 UTC
please dont uselessly quote

what does this show:
pkg-config --libs --static devmapper

what about removing as-needed from your LDFLAGS and ebuilding devmapper/udev/cryptsetup ?
Comment 15 blub bla 2010-10-07 08:12:29 UTC
(In reply to comment #14)
> what does this show:
> pkg-config --libs --static devmapper

pkg-config --libs --static devmapper
Package libselinux was not found in the pkg-config search path.
Perhaps you should add the directory containing `libselinux.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libselinux', required by 'devmapper', not found

> what about removing as-needed from your LDFLAGS and ebuilding
> devmapper/udev/cryptsetup ?
> 

devmapper and udev and lvm2 at once is blocking.... device-mapper is not even installed.
removing as-needed makes things worse.....
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2010-10-07 08:24:51 UTC
(In reply to comment #15)
> pkg-config --libs --static devmapper
> Package libselinux was not found in the pkg-config search path.
> Perhaps you should add the directory containing `libselinux.pc'
> to the PKG_CONFIG_PATH environment variable
> Package 'libselinux', required by 'devmapper', not found

There you go, broken lvm2 installation because of missing libselinux.
Either emerge lvm2 with USE="-selinux", or fix the libselinux installation.
It should contain libselinux.pc, libselinux.a, and libselinux.so files.
Comment 17 SpanKY gentoo-dev 2010-10-07 16:05:33 UTC
he has USE=selinux in his make.conf, and cryptsetup requires libselinux.  and his config.log shows that he has libselinux installed.  which means he is missing his libselinux.pc (libselinux install is broken or old or ...).

run `qcheck libselinux` and `qlist libselinux | grep '[.]pc'`
Comment 18 blub bla 2010-10-07 16:13:37 UTC
(In reply to comment #17)
> he has USE=selinux in his make.conf, and cryptsetup requires libselinux.  and
> his config.log shows that he has libselinux installed.  which means he is
> missing his libselinux.pc (libselinux install is broken or old or ...).
> 
> run `qcheck libselinux` and `qlist libselinux | grep '[.]pc'`
> 

sorry that i didnt reply faster, i just removed (2 hours ago)all selinux related software.
now that stuff compiles again :)
anyway,  SpanKY and Samuli Suominen, thank you for the time you spent on my issue