Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278207 - dev-python/jinja-1.2 fails to build, complaining of 'no module named thread'
Summary: dev-python/jinja-1.2 fails to build, complaining of 'no module named thread'
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-17 21:24 UTC by Glenn Willen
Modified: 2009-07-18 21:34 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 Glenn Willen 2009-07-17 21:24:09 UTC
When I try to emerge dev-python/jinja-1.2, the emerge fails with a traceback I will attach, ending in 'No module named thread'. I assume this is because it has an unstated dependency on python being build with USE=threads. I am refraining from trying to fix it, so that I have the repro handy -- I can try re-emerging python with USE=threads, to see if that fixes it.

Reproducible: Always

Steps to Reproduce:
1. Have this installed:
[ebuild   R   ] dev-lang/python-2.5.4-r3  USE="berkdb doc gdbm ipv6 ncurses readline ssl xml -build -examples -sqlite -threads -tk -ucs2 -wininst" 0 kB

2. Try to install this:
[ebuild  N    ] dev-python/jinja-1.2  USE="-test" 0 kB
Actual Results:  
>>> Compiling source in /var/tmp/portage/dev-python/jinja-1.2/work/Jinja-1.2 ...
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    import jinja
  File "/var/tmp/portage/dev-python/jinja-1.2/work/Jinja-1.2/jinja/__init__.py", line 60, in <module>
    from jinja.environment import Environment
  File "/var/tmp/portage/dev-python/jinja-1.2/work/Jinja-1.2/jinja/environment.py", line 13, in <module>
    from jinja.loaders import LoaderWrapper
  File "/var/tmp/portage/dev-python/jinja-1.2/work/Jinja-1.2/jinja/loaders.py", line 19, in <module>
    from threading import Lock
  File "/usr/lib/python2.5/threading.py", line 6, in <module>
    import thread
ImportError: No module named thread


Expected Results:  
Ebuild installs. OR emerge figures out appropriate dependencies and tells me how to adjust my USE flags. OR, emerge at least tells me "Your 'python' package is configured in a way known to be incompatible with this package", so that I don't have to spend hours figuring it out. (I was very lucky; the error when this happens is usually nowhere near as understandable as 'No module named thread'.)

I Googled around a little, so I am aware that, as of something like 2004, USE flag dependencies were impossible. I went ahead and put together a full bug report anyway, in case they have come into existence since then, and because 1) it's good to have on record, even as a CANTFIX, for the benefit of people searching for it. 2) I want to cast my vote in favor of USE flag dependencies as an important feature, if they don't exit.

3) (most important): Having packages fail to install with unhelpful errors is a bad user experience, and I would strongly encourage taking any steps to avoid it.

In this case, all I would need to be satisfied is some record somewhere that "dev-python/jinja is incompatible with dev-lang/python with USE=-thread", so that emerge comes up with "BLOCKING" and even a mildly helpful message, instead of trying to install the package and failing with no helpful error (since the error is under the control of the package and not of emerge.)

I do not know a lot about the internals of emerge, but I would be happy to write code to help make this happen.

Thanks!
Comment 1 Wormo (RETIRED) gentoo-dev 2009-07-18 06:32:59 UTC
Thanks for the offer of help, but the good news is that USE dependencies are now available :)

For the sake of completeness, please post the output from 'emerge --info' and then we'll assign this to the python team, who can add a dependency on python built with USE=threads if needed. 
Comment 2 Glenn Willen 2009-07-18 17:26:07 UTC
Glorious, thanks! Please let me know if I can go ahead and emerge python by hand with +threads or if I should wait until resolution in case more information is needed.

emerge --info:

Portage 2.1.6.13 (hardened/x86, gcc-3.4.6, glibc-2.5-r4, 2.4.32-gentoo-r4 i686)
=================================================================
System uname: Linux-2.4.32-gentoo-r4-i686-Pentium_III_-Coppermine-with-glibc2.3.2
Timestamp of tree: Sat, 18 Jul 2009 12:45:01 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.3.5, 2.4.4-r4, 2.5.4-r3
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.9.4-r6
sys-apps/sandbox:    1.6-r2
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.5, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.4.26-r1
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/X11/xkb /usr/share/X11/xkb /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://adelie.polymtl.ca/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
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"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="apache2 bash-completion berkdb bzlib caps cdb chroot crypt curl dbm doc gdbm hardened hardenedphp icq imap innodb ipv6 jpeg libg++ libwww maildir mbox mpeg msn mysql ncurses nls oscar pam perl php png python readline shaper softquota spell ssl tcpd threads vim-syntax x86 xml yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 	emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0mmaestro3 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" ELIBC="glibc" INPUT_DEVICES="mouse keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt intel 	mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage 	siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware 	voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-07-18 18:09:22 UTC
Fixed.
Comment 4 Glenn Willen 2009-07-18 21:34:49 UTC
Verified working now, thanks!