Gentoo Archives: gentoo-user

From: Andreas Niederl <rico32@×××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] libselinux.so.1 dependency problems
Date: Mon, 07 Jul 2008 23:49:46
Message-Id: 4872AB96.8000408@gmx.net
In Reply to: [gentoo-user] libselinux.so.1 dependency problems by "Vladimir G. Ivanovic"
1 Hi,
2
3 Vladimir G. Ivanovic wrote:
4 [...]
5 > It turns out that many, many executables require libselinux.so.1,
6 > despite what the documentation of "--depclean" in "man emerge" says (or
7 > what I think it says -- is this a bug or operator error?)
8
9 Sadly sys-apps/coreutils is one of them.
10 Recent versions - including stable - do an autodetection for libselinux
11 and link against it even when emerged with USE="-selinux"[1].
12
13 This should be no problem for systems which never saw libselinux (i.e.
14 installed from 2008.0) but unmerging this library on older systems can
15 be quite problematic.
16
17
18 > I cobbled together a system that limps along thanks to the 2008.0 beta
19 > LiveCD (which does not depend on libselinux.so.1), but I am unable to
20 > emerge a large number of packages that seem to silently depend on
21 > libselinux.so.1: the ebuilds fail when ld cannot find -lselinux.
22 [...]
23 > What gives? Where does the "-lselinux" come from? How can I get rid of
24 > this maddening dependency?
25
26 I think that libtool is the main offender here.
27 At least on my system somehow '-lselinux' made its way into a bunch of
28 .la files and provoked these errors.
29
30 So I searched for the packages with broken libtool archive files and
31 manually emerged them (with --oneshot).
32 I figured out the correct order by using the trial-and-error method but
33 you could do something like the get_build_order() function in the
34 revdep-rebuild script.
35
36 The command I've used for searching is as follows (requires
37 app-portage/portage-utils):
38 grep -l -r --include='*.la' selinux /usr/lib | qfile --nocolor -f - | \
39 cut -d' ' -f 1 | sort | uniq
40
41 Another way might be to look at the line before the error message and
42 rebuild the package containing the library right before the '-lselinux'
43 flag.
44
45
46 hth,
47 Andi
48
49 [1] http://bugs.gentoo.org/show_bug.cgi?id=230073
50 --
51 gentoo-user@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-user] libselinux.so.1 dependency problems "Vladimir G. Ivanovic" <vgivanovic@×××××××.net>