Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184737 - gnome-power-manager-2.16.3 linking against libselinux without specific depend or USE flag for selinux in ebuild
Summary: gnome-power-manager-2.16.3 linking against libselinux without specific depend...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-09 15:39 UTC by Matthew Gregory Sr.
Modified: 2007-09-08 22:16 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Gregory Sr. 2007-07-09 15:39:35 UTC
I'm setting up a media server and cleaning out unnecessary packages (mythtv) so I was removing libselinux, libsemanage, checkpolicy, selinux-openvpn and openvpn.  I check of all other depends for selinux libs/utils came up nill.  Then I hit this error:

i686-pc-linux-gnu-gcc -march=athlon-mp -Os -pipe -fomit-frame-pointer -o gnome-power-preferences gpm-hal.o gpm-debug.o gpm-prefs.o gpm-prefs-core.o gpm-marshal.o gpm-dbus-system-monitor.o gpm-dbus-session-monitor.o gpm-common.o gpm-screensaver.o -pthread -pthread  /usr/lib/libgnomeui-2.so -L/usr/lib /usr/lib/libjpeg.so /usr/lib/libbonoboui-2.so /usr/lib/libgnome-keyring.so /usr/lib/libgnomecanvas-2.so /usr/lib/libgnome-2.so /usr/lib/libesd.so /usr/lib/libaudiofile.so /usr/lib/libasound.so /usr/lib/libart_lgpl_2.so /usr/lib/libbonobo-2.so /usr/lib/libgnomevfs-2.so /usr/lib/libgnutls.so /usr/lib/libtasn1.so /usr/lib/libgcrypt.so /usr/lib/libgpg-error.so -lresolv -lselinux -lutil /usr/lib/libbonobo-activation.so /usr/lib/libORBitCosNaming-2.so /usr/lib/libgconf-2.so /usr/lib/libpopt.so /usr/lib/libORBit-2.so /usr/lib/libglade-2.0.so /usr/lib/libexpat.so /usr/lib/libwnck-1.so /usr/lib/libstartup-notification-1.so /usr/lib/libSM.so /usr/lib/libICE.so /usr/lib/libXRes.so /usr/lib/libXext.so /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libpangocairo-1.0.so /usr/lib/libpangoft2-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libgmodule-2.0.so /usr/lib/libcairo.so /usr/lib/libfreetype.so /usr/lib/libfontconfig.so /usr/lib/libxml2.so /usr/lib/libdirectfb.so /usr/lib/libfusion.so /usr/lib/libdirect.so /usr/lib/libpng12.so -lz /usr/lib/libxcb-render-util.so /usr/lib/libxcb-render.so /usr/lib/libxcb.so /usr/lib/libXrender.so /usr/lib/libX11.so /usr/lib/libxcb-xlib.so /usr/lib/libXau.so /usr/lib/libXdmcp.so -ldl -lm /usr/lib/libhal.so /usr/lib/libdbus-glib-1.so -lnsl /usr/lib/libgobject-2.0.so /usr/lib/libdbus-1.so /usr/lib/libgthread-2.0.so -lpthread -lrt /usr/lib/libglib-2.0.so
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lselinux
collect2: ld returned 1 exit status

clearly, something in gnome-power-manager either needs or wants selinux libs.

Depend checking: 

skyleach ~ # equery depends gnome-power-manager
[ Searching for packages depending on gnome-power-manager... ]
gnome-base/gnome-2.16.2 (>=gnome-extra/gnome-power-manager-2.16.2)
skyleach ~ # emerge -uDpv --newuse gnome-power-manager

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] gnome-extra/gnome-power-manager-2.16.3 [2.16.2] USE="-debug -doc -libnotify" 0 kB

Total: 1 package (1 upgrade), Size of downloads: 0 kB

checking depends for gnome-power-manager:

skyleach ~ # equery depends gnome-power-manager
[ Searching for packages depending on gnome-power-manager... ]
gnome-base/gnome-2.16.2 (>=gnome-extra/gnome-power-manager-2.16.2)

So emerge/ebuild doesn't see that the libselinux/libsemanage is required by gnome-power-manager:

skyleach ~ # emerge -pv libsemanage libselinux

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] sys-libs/libselinux-1.34.0  0 kB
[ebuild  N    ] sys-libs/libsemanage-1.10.0  0 kB

Total: 2 packages (2 new), Size of downloads: 0 kB

Anyhow, just thought it should be noted.

Reproducible: Always

Steps to Reproduce:
1. make sure that libsemanage/libselinux are not installed/needed by anything else.
2. attempt to emerge gnome
3.

Actual Results:  
Linker error against libselinux and possibly libsemanage.

Expected Results:  
clean build/install
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-07-09 15:53:03 UTC
please attach your emerge --info

btw there is no way libselinux would be installed without you requiring it in the first place. So either you installed it manually or you are using hardened or selinux profile. In any case it is very dangerous to change this (selinux/hardened to desktop for example) on the fly even for experienced user.
Comment 2 Matthew Gregory Sr. 2007-07-09 16:05:12 UTC
in-re: I didn't have an selinux profile or enhanced audit control on this machine.  It was my desktop system and I was using selinux-openvpn for the vpn connection to my office.  Thus the only things installed previously [relative to depend/require]: (libsemanage)->(libselinux)->(selinux-openvpn)->(openvpn)

These were not brought in by USE flags but by direct install of selinux-openvpn.  I checked the depend tree before even installing the option and only as an experement.

emerge --info follows:

skyleach skyleach # emerge --info
Portage 2.1.2.9 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r3, 2.6.20-gentoo-r8-skyleach-dualmp1800 i686)
=================================================================
System uname: 2.6.20-gentoo-r8-skyleach-dualmp1800 i686 AMD Athlon(TM) MP 1800+
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 03 Jul 2007 07:30:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-mp -Os -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon-mp -Os -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks keeptemp keepwork metadata-transfer sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LINGUAS="en_US en_US.UTF8 en utf8"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X X509 a52 aac aalib acl acpi activefilter aiglx alsa amr apache2 arts audiofile avi bash-completion bcmath berkdb binfilter bitmap-fonts bl bluetooth bonobo branding bzip2 cairo calendar cddb cdparanoia cdr cdrom chipcard chroot cjk cle266 cli cmdsubmenu cpudetection cracklib crypt ctype cups curl curlwrappers dbus dga dhcp directfb divx divx4linux djvu dmx dri dtaus dts dv dvb dvbplayer dvd dvdnav dvdr dvdread dvdrw dvi dxr3 ecc eds elf enca encode erandom escreen esd ethereal exif extensions fastcgi fbcon festival ffmpeg fftw firefox flac flash fortran fping freetds ftp gd gdbm geldkarte ggi gif gimpprint ginac gmedia gmp gnokii gnome gnutls gphoto2 gpm graphviz gsl gstreamer gtk gtk2 gtkhtml guile hal hardenedphp hash hauppauge hbci howl iconv ieee1394 imagemagick imap imlib ipv6 isdnlog ithreads ivtv jack java jikes joystick jpeg jpeg2k jumpplayer junit kde kdeenablefinal kerberos krb4 ladcca largeterminal lcd ldap libcaca libg++ libwww lirc live livecd lm_sensors lmcs logitech-mouse lua lzo mad maildir mailwrapper mbox mcal md5sum memlimit mhash midi ming mmap mmx mmxext mng modplug motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp2 mp3 mpeg mpi mplayer mppe-mppc mssql mtrr mudflap musepack mysql mysqli nas ncurses nethack netjack network nls nntp nocd noepg nptl nptlonly nsplugin nvidia nvtv odk offensive ofx ogg oggvorbis openal openexr opengl openmp openssh openssl oss pam pcre pda pdf pdflib perl pg-hier pg-intdatetime php pic plotutils png pnm pnp portaudio posix postgres povray ppds pppd pulseaudio python qmail qt qt3 quicktime quotas quotes radio rar rdesktop readline real realmedia reflection rotor rrdtool rtc samba sasl scanner sdk sdl sensord session simplexml slp smartcard smp sms smux sndfile snmp soap sockets sound speex spell spl sqlite srt sse sse2 ssl subtitles svg svga t1lib tcpd tetex tga theora thread threads threadsafe tidy tiff tivo tk transcode truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd vdr vhosts videos vidix vim-with-x vorbis wavpack webdav win32codecs winbind wma wmf wmp x264 x86 xanim xcb xchatdccserver xchattext xine xinerama xml xml2 xmlreader xmlrpc xmlwriter xorg xosd xpm xprint xscreensaver xsl xv xvid xvmc yaepg yaz yellownet zeroconf zip zlib zoran" ALSA_CARDS="emu10k1" 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" ELIBC="glibc" INPUT_DEVICES="joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en_US.UTF8 en utf8" LIRC_DEVICES="hauppauge" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 Matthew Gregory Sr. 2007-07-09 16:09:46 UTC
OFF TOPIC: (btw) for the record I am an experienced user.  I've been patching/submitting ebuilds for more than 5 years.  I'm not just active enough to be a developer or regular contributor because I have 5 kids to take care of.  When things affect my work or the little time I get to work on gentoo at home, then I submit bugs.

I'm currently working on an ebuild for SNMP4Nagios and updating the out-of-date nagios-grapher ebuild.  So find out causes before we starting slinging insults please.

I'll remove this post before the end of the day :)
Comment 4 Matthew Gregory Sr. 2007-07-09 16:19:25 UTC
Note: merge of libselinux & libsemanage allowed me to build/install gnome-power-manager

Comment 5 Rémi Cardona (RETIRED) gentoo-dev 2007-07-09 17:00:04 UTC
I'd bet that NM doesn't want libselinux, but something NM depends on needs it. Try looking through /usr/lib/pkgconfig to see what depends on libselinux. You could also try using "revdep-rebuild --library".

Either way, I really doubt it's a NetworkManager issue. :) Let us know what you find, it's interesting nonetheless.
Comment 6 Matthew Gregory Sr. 2007-07-09 17:48:58 UTC
re Remi: I'm not so certain it isn't.  The linking call is specifically asking for selinux (-lselinux) instead of a missing shared object as you would expect from a link to a library requiring selinux outside of the gnome build.  If it's linking an outside library, then it would be the build of that library or it's associated package that would be throwing the linker error and should have shown up in the dependency tree outside of the g-p-m build.  Since the linker error is being thrown in this build directly, make must be getting a -l flag from the makefile or a subsidiary components makefile within the g-p-m tarball.

At least, that's my logic behind it.  The only proof is in the Makefile and I don't have time to go into it today or even this week.  :-/
Comment 7 Rémi Cardona (RETIRED) gentoo-dev 2007-07-09 18:25:22 UTC
That's why I suggested looking through pkgconfig which is used extensively by Gnome packages. It could also be due to libtool's .la files.

If an innocent looking selinux reference got put in either type of files, it can spread like wildfire. (ask Jakub about xcb or directfb/gtk)

Anyway, it's mostly going to be up to you to investigate, since a quick look at gpm's configure doesn't indicate any libselinux dependency. I'll leave this bug open for now. Feel free to add to it whenever you like.

Thanks :)
Comment 8 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-07-11 15:27:08 UTC
Just for the sake of it, could you try to run revdep-rebuild after unmerging selinux stuff ? (sorry if you already mentioned it, I'm just too lazy to reread all comments :))

if it doesn't work I see two possible tests here:

 - find all .la files you have on your system and remove them (backup them first with their original location just in case but they shouldn't be needed). Removed selinux stuff and see if g-p-m complains.

 - I see you have binutils-2.17. Could you do a little test with LDFLAGS="-Wl,--as-needed" in your make.conf ? This implies that you have to emerge -e world and then unmerge libselinux and see if g-p-m still complains.

final question: the mythtv dev would like to know why you need g-p-m at all on a mythtv box ?
Comment 9 Steve Arnold archtester gentoo-dev 2007-07-12 13:49:29 UTC
Same thing happened to me today on a brand new amd64 box being built with bin packages built on an existing box (they have identical make.conf and /etc/portage/*, etc).  There is nothing in pkgconfig/* on the new box, however, the first box does have libselinux (installed manually for testing an ebuild I made for setroubleshoot).  Nothing in USE or anywhere else, just like the original reporter, only it was evolution-data-server bombing looking for -lselinux.  Checking with revdep-rebuild reveals tons of links to selinux in other Gnome-related things (especially gnome-vfs).  Weird...

I also don't have any more time this morning due to work commitments, but I'll be back on it tonight (the new box is for my two boys who are not so patient).
Comment 10 Rémi Cardona (RETIRED) gentoo-dev 2007-07-12 22:23:26 UTC
Did revdep tell you if the .so files or the .la files were broken?
Comment 11 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-07-24 20:37:42 UTC
For the record, selinux is heavily invasive; it tends to get it's tendrils into everything.  You will need at least one full revdep-rebuild to get rid of it.  The one time I tried, I had to re-install.
Comment 12 Gilles Dartiguelongue (RETIRED) gentoo-dev 2007-09-08 22:16:35 UTC
please get back to us