Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 326471 - dev-lang/tk has automagic dependency over libXss
Summary: dev-lang/tk has automagic dependency over libXss
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-01 15:03 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2010-10-17 09:47 UTC (History)
0 users

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 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-07-01 15:03:46 UTC
broken /usr/lib/libtk8.5.so (requires libXss.so.1)

Portage 2.1.8.3 (default/linux/x86/10.0, gcc-4.5.0-asneeded, glibc-2.11.2-r0, 2.6.34 i686)
=================================================================
System uname: Linux-2.6.34-i686-Quad-Core_AMD_Opteron-tm-_Processor_2350-with-gentoo-2.0.1
Timestamp of tree: Thu, 01 Jul 2010 12:00:01 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.9.6-r3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.5.0
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="i686-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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms split-log strict test test-fail-continue unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.wheel.sk/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j14"
PKGDIR="/var/spool/portage/packages"
PORTAGE_COMPRESS=""
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="/var/cache/portage/tree-tinderbox"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 java5 java6 modules mudflap ncurses nls nostatic nptl nptlonly openmp pam pcre perl pppd python qt3support readline reflection ruby session spl ssl sysfs tcpd unicode vhosts x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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 auth_digest" ELIBC="glibc" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18 jruby ruby19 ree18" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2010-07-24 17:13:36 UTC
Diego, could you please elaborate it more. I cannot see any dpendancy on libXss here:

$ scanelf -n /usr/lib/libtk8.5.so
 TYPE   NEEDED FILE 
ET_DYN libX11.so.6,libXft.so.2,libfontconfig.so.1,libpthread.so.0,libm.so.6,libc.so.6 /usr/lib/libtk8.5.so 
Comment 2 Kevin Pyle 2010-10-14 03:22:34 UTC
jlec: the key phrase here is "automagic dependency."  This is shorthand for when autotools adds a dependency automatically when it finds a library, and happily builds a working program without that library if the library is unavailable.  See <http://www.gentoo.org/proj/en/qa/automagic.xml> for a longer explanation.  The problem here is that, if you have libXss installed when you build tk, then tk will depend on libXss and Portage is not aware of it because the ebuild does not report that dependency.  If you do not have libXss installed when you build tk, then tk will build and run correctly and you can freely add/remove libXss on the system (provided you never rebuild tk while libXss is present).

The trivial (but obnoxious) fix would be to make the tk ebuild DEPEND and RDEPEND on libXss.  The proper fix would be to modify the tk ebuild so that it patches the upstream configure check to create a --enable-libXss/--disable-libXss flag, then have the ebuild use the new flag.  If libXss is considered not to be a useful feature in tk, then the ebuild can just pass --disable-libXss unconditionally.  If it is useful, a USE flag could be added that controls the flag and the DEPEND relation.
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2010-10-14 07:11:14 UTC
Mmh wonderfull! How could I make it to be a dev w/o knowing this?

Nevertheless I have libXss.so on my system, but my libtk.so doesn't need it. So why is it so on the tinderbox, Diego?
Comment 4 Justin Lecher (RETIRED) gentoo-dev 2010-10-14 07:13:45 UTC
LDFLAGS="-Wl,-O1"

Diego, please use as-needed and reopen if it still exists.
Comment 5 Kevin Pyle 2010-10-15 03:07:07 UTC
(In reply to comment #4)
> LDFLAGS="-Wl,-O1"
> Diego, please use as-needed and reopen if it still exists.

I use as-needed on my systems and ran into this problem independently, which is what led me to this bug report.  Also, Diego is using the "forced --as-needed" gcc profile of the tinderbox, so all his compilations come with --as-needed unless specifically disabled by the build system.

With regard to you having libXss and not needing it: are you sure that you have rebuilt tk between when you installed libXss and when you checked the libtk dependencies?
Comment 6 Justin Lecher (RETIRED) gentoo-dev 2010-10-15 12:40:16 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > LDFLAGS="-Wl,-O1"
> > Diego, please use as-needed and reopen if it still exists.
> 
> I use as-needed on my systems and ran into this problem independently, which is
> what led me to this bug report.  Also, Diego is using the "forced --as-needed"
> gcc profile of the tinderbox, so all his compilations come with --as-needed
> unless specifically disabled by the build system.
> 
> With regard to you having libXss and not needing it: are you sure that you have
> rebuilt tk between when you installed libXss and when you checked the libtk
> dependencies?
> 

Which USE are you using?
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2010-10-15 12:52:41 UTC
And please attach a build.log when filing bugs.
Comment 8 Kevin Pyle 2010-10-16 18:02:59 UTC
(In reply to comment #6)
> Which USE are you using?

# emerge -pvq tk                                                  
[ebuild   R   ] dev-lang/tk-8.5.7  USE="-debug -threads -truetype" 

It looks like this was fixed in 8.5.8-r1 one week after Diego filed this bug, when bicatali@g.o added the xscreensaver USE flag to 8.5.8-r1 without a revbump -- which, as a stable user, I have not yet encountered.  The fixed version was not available at the time Diego filed the bug, which is why he encountered it even in ~arch.  In this case, 8.5.7 is completely automagic; there is no way to tell it whether or not to use libXss, it just does so if it can.  In 8.5.8, upstream added a configure option to control the test.  Automagic dependencies so rarely get fixed upstream I did not expect a version bump would matter.

jlec: perhaps you are already running 8.5.8-r1 with USE=-xscreensaver?
Comment 9 Justin Lecher (RETIRED) gentoo-dev 2010-10-17 09:45:09 UTC
reopen to close correctly
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2010-10-17 09:47:00 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > Which USE are you using?
> 
> # emerge -pvq tk                                                  
> [ebuild   R   ] dev-lang/tk-8.5.7  USE="-debug -threads -truetype" 
> 
> It looks like this was fixed in 8.5.8-r1 one week after Diego filed this bug,
> when bicatali@g.o added the xscreensaver USE flag to 8.5.8-r1 without a revbump
> -- which, as a stable user, I have not yet encountered.  The fixed version was
> not available at the time Diego filed the bug, which is why he encountered it
> even in ~arch.  In this case, 8.5.7 is completely automagic; there is no way to
> tell it whether or not to use libXss, it just does so if it can.  In 8.5.8,
> upstream added a configure option to control the test.  Automagic dependencies
> so rarely get fixed upstream I did not expect a version bump would matter.
> 
> jlec: perhaps you are already running 8.5.8-r1 with USE=-xscreensaver?
> 

Thank you very much for digging this out. This is correct and fixed in 8.5.8-r1 with USE=-xscreensaver. I will not backport it to earlier versions.