Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133533 - Tkinter not properly built with USE=tcltk emerge python - misleading error message
Summary: Tkinter not properly built with USE=tcltk emerge python - misleading error me...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 135349 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-16 13:20 UTC by mikael lammentausta
Modified: 2006-08-08 04:45 UTC (History)
6 users (show)

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


Attachments
3326-python-2.4.2.log (3326-python-2.4.2.log,335.54 KB, text/plain)
2006-06-16 12:42 UTC, David Grant
Details
3328-python-2.4.2.log (3328-python-2.4.2.log,20.80 KB, text/plain)
2006-06-16 12:42 UTC, David Grant
Details
Skencil will not emerge, gives wrong instructions to fix problem (skencilbug.txt,13.27 KB, text/plain)
2006-07-10 18:22 UTC, Bob Paddock
Details
Tkinter.py not installed when have USE="X tcltk" set. (4253-python-2.4.3-r1.log,18.84 KB, application/octet-stream)
2006-07-13 17:42 UTC, Bob Paddock
Details
Requested compile phase log (4252-python-2.4.3-r1.log,338.84 KB, application/octet-stream)
2006-07-13 18:21 UTC, Bob Paddock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mikael lammentausta 2006-05-16 13:20:53 UTC
I have this problem: I try to emerge inkscape with plugins, but it needs dia, and dia needs skencil. But:

>>> emerge (1 of 4) media-gfx/skencil-0.6.17 to /
>>> md5 files   ;-) skencil-0.6.17.ebuild
>>> md5 files   ;-) skencil-0.6.16.ebuild
>>> md5 files   ;-) files/digest-skencil-0.6.16
>>> md5 files   ;-) files/digest-skencil-0.6.17
>>> md5 src_uri ;-) skencil-0.6.17.tar.gz
 * You need to recompile python with Tkinter support.
 * That means: USE='tcltk' emerge python


!!! ERROR: media-gfx/skencil-0.6.17 failed.
!!! Function python_tkinter_exists, Line 99, Exitcode 0
!!! missing tkinter support with installed python
!!! If you need support, post the topmost build error, NOT this status message.

root@platon ~ # equery uses python
[ Searching for packages matching python... ]
[ Colour Code : set unset ]
[ Legend        : Left column  (U) - USE flags from make.conf                     ]
[                  : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for dev-lang/python-2.3.5-r2 ]
 U I
 - - X         : Adds support for X11
 + + berkdb    : Adds support for sys-libs/db (Berkeley DB for MySQL)
 - - bootstrap : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used during original system bootstrapping
 - - build     : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping.
 - - doc       : Adds extra documentation (API, Javadoc, etc)
 + + gdbm      : Adds support for sys-libs/gdbm (GNU database libraries)
 - - ipv6      : Adds support for IP version 6
 + + ncurses   : Adds ncurses support (console display library)
 - - nocxx     : Disable support for C++ (DON'T USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)
 + + readline  : Enables support for libreadline, a GNU line-editing library that almost everyone wants
 + + ssl       : Adds support for Secure Socket Layer connections
 + + tcltk     : Support for Tcl and/or Tk GUI toolkits
 - - ucs2      : Enable byte size 2 unicode
[ Found these USE variables for dev-lang/python-2.4.2 ]
 U I
 - - X         : Adds support for X11
 + + berkdb    : Adds support for sys-libs/db (Berkeley DB for MySQL)
 - - bootstrap : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used during original system bootstrapping
 - - build     : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping.
 - - doc       : Adds extra documentation (API, Javadoc, etc)
 + + gdbm      : Adds support for sys-libs/gdbm (GNU database libraries)
 - - ipv6      : Adds support for IP version 6
 + + ncurses   : Adds ncurses support (console display library)
 - - nocxx     : Disable support for C++ (DON'T USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)
 + + readline  : Enables support for libreadline, a GNU line-editing library that almost everyone wants
 + + ssl       : Adds support for Secure Socket Layer connections
 + + tcltk     : Support for Tcl and/or Tk GUI toolkits
 - - ucs2      : Enable byte size 2 unicode
Comment 1 mikael lammentausta 2006-05-16 13:21:13 UTC
root@platon ~ # emerge --info
Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.3.4.20041102-r1, 2.6.16-gentoo-r6 i686)
=================================================================
System uname: 2.6.16-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.6.14
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
dev-python/pycrypto: 2.0-r1
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/var/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo"
LANG="fi_FI@euro"
LC_ALL="fi_FI@euro"
LINGUAS="fi en"
MAKEOPTS="-j2"
PKGDIR="/var/pkg/dev"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/gentoo-de /usr/local/portage/mikael"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aalib acpi alsa apache2 arts asm audiofile avi bash-completion berkdb bitmap-fonts bonobo bzip2 bzlib cdr cli crypt css cups curl directfb divx4linux dri dts dvb dvd dvdr emboss encode exif expat fam fbcon ffmpeg firefox flac font-server foomaticdb fortran gd gdbm gif glut gmp gpm gstreamer gtk gtk2 gtkhtml hal idn imagemagick imlib imlib2 isdnlog jack jikes jpeg kde kdeenablefinal kdexdeltas lcms libcaca libg++ libwww lirc mad matroska mikmod mmx mng motif mp3 mpeg mysql nas ncurses nls nptl ntfs ogg opengl pam pcre pdflib perl png pppd python qt readline recode reflection reiserfs ruby scanner sdl session slang slp spell spl sqlite sse sse2 ssl tcltk tcpd theora tiff truetype truetype-fonts type1-fonts udev usb v4l v4l2 vidix vorbis win32codecs wmf xine xinerama xml xml2 xmms xorg xscreensaver xv xvid xvmc zlib video_cards_radeon linguas_fi linguas_en userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPT
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-05-16 13:36:21 UTC
That may well be, but you are checking wrong python version... You need to compile your *current* python w/ USE=tcltk, i.e. python-2.4.2, not 2.3.5-r2 ;)
Comment 3 mikael lammentausta 2006-05-16 13:51:27 UTC
It also is built with tcltk:

root@platon ~ # emerge =python-2.4.2 =python-2.3.5-r2 -vp

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] dev-lang/python-2.4.2  -X +berkdb -bootstrap -build -doc +gdbm -ipv6 +ncurses -nocxx +readline +ssl +tcltk -ucs2 7 kB
[ebuild   R   ] dev-lang/python-2.3.5-r2  -X +berkdb -bootstrap -build -doc +gdbm -ipv6 +ncurses -nocxx +readline +ssl +tcltk -ucs2 8 kB

Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-05-16 14:00:18 UTC
Don't mark bugs as a blocker unless your whole system is completely unusable.
Comment 5 Alexander Skwar 2006-05-25 01:03:42 UTC
This seems to be a general problem. I'm trying to get games-board/pysol-4.82-r1 installed and fail:

 * You need to recompile python with Tkinter support.
 * That means: USE='tcltk' emerge python

But:

alexander@blatt ~ $ emerge -vpt python

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

Calculating dependencies... done!
[ebuild   R   ] dev-lang/python-2.4.3-r1  USE="-X berkdb -bootstrap -build -doc gdbm -ipv6 ncurses -nocxx readline ssl tcltk -ucs2" 0 kB

Total size of downloads: 0 kB

As you can see, python is build with tcltk support.

Could the subject please be adjusted? Suggestion:

Tkinter not properly built with USE=tcltk emerge python - misleading error message


alexander@blatt ~ $ python -c "import Tkinter"
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named Tkinter
alexander@blatt ~ $ emerge -vpt dev-lang/t{cl,k}

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

Calculating dependencies... done!
[ebuild   R   ] dev-lang/tk-8.4.12  USE="-threads" 0 kB
[ebuild   R   ] dev-lang/tcl-8.4.12  USE="-threads" 0 kB

Total size of downloads: 0 kB


Ah!

bug #69897 comment #17 had the important bit: python needs to be built with the USE flags tcltk *AND* X ! I did have -X.


Could the misleading error message

 * You need to recompile python with Tkinter support.
 * That means: USE='tcltk' emerge python

please be changed to

 * You need to recompile python with Tkinter support.
 * That means: USE='X tcltk' emerge python



alexander@blatt ~ $ emerge --info
Portage 2.1_rc2-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.4-r3, 2.6.16-suspend2-r6.043.security-models i686)
=================================================================
System uname: 2.6.16-suspend2-r6.043.security-models i686 Intel(R) Celeron(R) M processor         1.50GHz
Gentoo Base System version 1.12.0
ccache version 2.4 [enabled]
dev-lang/python:     2.3.4-r1, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r1
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer"
DISTDIR="/Gentoo/Portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="autoconfig buildpkg ccache collision-protect confcache distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="        http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/   http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/       ftp://ftp.tu-clausthal.de/pub/linux/gentoo/     http://distro.ibiblio.org/pub/linux/distributions/gentoo/  ftp://distro.ibiblio.org/pub/linux/distributions/gentoo    http://distfiles.gentoo.org/ "
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
PKGDIR="/Gentoo/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'"
PORTAGE_TMPDIR="/Gentoo/Portage/build"
PORTDIR="/Gentoo/Portage/tree"
PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc /usr/portage/local/layman/vmware /usr/portage/local/layman/nx /usr/portage/local/layman/gentoo-de"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 GAPING_SECURITY_HOLE X acpi alsa amd apache2 apm arts artswrappersuid async avi bash-completion bdf berkdb bitmap-fonts bluetooth bootsplash cairo caps cardbus ccache cdda cddb cdio cdparanoia cdr cdrom cle266 cli crypt css curlwrappers dbus devmap dillo divx4linux dlloader dri dvd dvdread emoticon esd exif fam fbcon fbdev firefox fping freetype gdbm gif gnokii gnome gstreamer gtk gtk2 hal hpn icc id3 idn imap imlib imlib2 insecure-drivers insecure-savers isdnlog javascript jikes jpeg kde kdeenablefinal libedit libwww linuxthreads-tls logrotate lynxkeymap mad madwifi maildir matroska mbox mmx mmxext mozilla moznoirc mozsvg mp3 mpeg mpeg2 mpeg4 mplayer multicall ncurses netboot network new-login nfs nis nls no-old-linux no-suexec noantlr nobcel nobeanutils nobsf nobsh nocd nocommonslogging nocommonsnet nodrm nogg nogulm nojsch nojython nolog4j nomac nooro nopri norhino noxalan noxerces nozaptel nptl nsplugin offensive ogg opengl openssh pam_console pam_timestamp passfile password patented pccts pcmcia pcre perl perlsuid pic player png pnp pppd qt quicktime rar readline real recode reflection reiserfs sdl sendfile sensord session sftp sms spell spf spl sse sse2 ssl startup-notification stream subp subtitles suid symlink sysfs syslog tiff transcode truetype truetype-fonts trusted type1-fonts udev underscores unichrome unicode unsafe usb utf8 uudeview vim vim-pager vlm vorbis wifi win32codecs wma123 x11vnc xinetd xml xmms xorg xpm xprint xscreensaver xv xvid xvmc zlib elibc_glibc input_devices_evdev input_devices_keyboard input_devices_mouse input_devices_-synaptics kernel_linux linguas_de userland_GNU video_cards_fbdev video_cards_vesa video_cards_vga video_cards_via"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS

alexander@blatt ~ $


Comment 6 Hanno Böck gentoo-dev 2006-06-02 19:01:51 UTC
python team, this is in your eclass, but it looks the best fix ist just changing the error message as suggested in comment #5.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-06-03 00:23:26 UTC
*** Bug 135349 has been marked as a duplicate of this bug. ***
Comment 8 David Grant 2006-06-15 22:35:13 UTC
I'm seeing this too. My python is compiled with X and tcltk use flags and I only have one python version.
Comment 9 David Grant 2006-06-15 22:35:58 UTC
And I am seeing it with more than just skencil, as Alexander noted.
Comment 10 Marien Zwart (RETIRED) gentoo-dev 2006-06-16 06:58:54 UTC
I've fixed the recompile message as suggested in comment #5. 

Comment #8: Can you check if the python you rebuilt with both the X and tcltk USE flag enabled is the same python the /usr/bin/python symlink points to and that python -c "import Tkinter" still gives you an ImportError? If that is the case I think we'll need a build log for python to figure out why it's not building Tkinter even though those USE flags are set (you can generate that with PORT_LOGDIR=/path/to/some/directory emerge python).
Comment 11 David Grant 2006-06-16 12:41:06 UTC
david@goliath ~ $ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 Jun 15 22:32 /usr/bin/python -> python2.4

david@goliath ~ $ python -c "import Tkinter"
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 38, in ?
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter

I'll attach my logs
Comment 12 David Grant 2006-06-16 12:42:02 UTC
Created attachment 89331 [details]
3326-python-2.4.2.log

3326-python-2.4.2.log
Comment 13 David Grant 2006-06-16 12:42:45 UTC
Created attachment 89332 [details]
3328-python-2.4.2.log

3328-python-2.4.2.log

I also have a 3327-python-2.4.2.log but it was empty
Comment 14 mikael lammentausta 2006-06-17 03:33:43 UTC
changed the title of the bug
Comment 15 David Grant 2006-06-17 13:08:45 UTC
Sorry I wish I could help debug this more...but I'll be away for two weeks.
Comment 16 Marien Zwart (RETIRED) gentoo-dev 2006-06-20 13:18:55 UTC
The log file says: "INFO: Can't locate Tcl/Tk libs and/or headers"

So python's setup.py is not picking up the tcl and/or tk headers and/or libraries. What version of tcl and tk do you have installed? Can you pastebin the output of "equery f tcl" and "equery f tk" ("emerge gentoolkit" to get equery)?
Comment 17 Bob Paddock 2006-07-10 18:22:33 UTC
Created attachment 91418 [details]
Skencil will not emerge, gives wrong instructions to fix problem

emerge -v skencil
Calculating dependencies... done!
>>> Emerging (1 of 1) media-gfx/skencil-0.6.17 to /
>>> checking ebuild checksums ;-)
>>> checking auxfile checksums ;-)
>>> checking miscfile checksums ;-)
>>> checking skencil-0.6.17.tar.gz ;-)
 * You need to recompile python with Tkinter support.
 * That means: USE='X tcltk' emerge python


!!! ERROR: media-gfx/skencil-0.6.17 failed.
Call stack:
  ebuild.sh, line 1555:   Called dyn_setup
  ebuild.sh, line 668:   Called pkg_setup
  skencil-0.6.17.ebuild, line 22:   Called python_tkinter_exists
  python.eclass, line 103:   Called die

!!! missing tkinter support with installed python
!!! If you need support, post the topmost build error, and the call stack if relevant.
Comment 18 David Grant 2006-07-10 18:39:44 UTC
I just ran equery f tk and it didn't list any files which was weird even though tk was installed. Now I emerged and it lists files.
Comment 20 Marien Zwart (RETIRED) gentoo-dev 2006-07-11 08:52:03 UTC
(In reply to comment #17)
> Created an attachment (id=91418) [edit]
> Skencil will not emerge, gives wrong instructions to fix problem
> 
>  * You need to recompile python with Tkinter support.
>  * That means: USE='X tcltk' emerge python

How are those "wrong"? They should fix the problem (although USE on the commandline is not really a good idea, I should change that to recommend package.use, I think). Did following those instructions not fix the problem for you? If that is the case can you please follow the steps in my comment #10 here?

comment #18/#19: If tcl and tk were installed according to portage but the actual files were missing that would explain why python failed to build the extension. If you rebuild python with the right USE flags now that tcl and tk are really there does that fix the problem?
Comment 21 Albert Hopkins (RETIRED) gentoo-dev 2006-07-11 19:13:34 UTC
(In reply to comment #20)
> (In reply to comment #17)
> > Created an attachment (id=91418) [edit]
> > Skencil will not emerge, gives wrong instructions to fix problem
> > 
> >  * You need to recompile python with Tkinter support.
> >  * That means: USE='X tcltk' emerge python
> 

I have tcl and tk installed.  Have files for each packages.  Have checked the tclsh and wish executables (they both work).  Have both "X" and "tcltk" use flags set for python, but still no TKinter...
Comment 22 Bob Paddock 2006-07-12 18:48:50 UTC
> > Skencil will not emerge, gives wrong instructions to fix problem
> > 
> >  * You need to recompile python with Tkinter support.
> >  * That means: USE='X tcltk' emerge python
> 
> How are those "wrong"? They should fix the problem 

They are wrong because they don't fix the problem.
I already have X and tcltk in my USE flags anyway.

Just tried doing the above again, followed by
emerge skencil and skencil still does not run.

ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 Jul 10 20:51 /usr/bin/python -> python2.4

python -c "import Tkinter"
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named Tkinter

You can see my USE flags and the equry reprots for tcl/tk in comment #17's
attachment.

Skencil was working on my system two weeks ago.  What has changed
in the last two weeks?
Comment 23 Marien Zwart (RETIRED) gentoo-dev 2006-07-13 11:05:06 UTC
Can everyone who is hitting this and has not already done so please provide the information I asked for in comment #10:

- is the python you rebuilt with X and tcltk what /usr/bin/python points to
- does python -c "import Tkinter" give an ImportError
- PORT_LOGDIR=/path/to/some/directory emerge python and attach the build log.

If you have the problem and provided the information requested above and I have not responded please say so (I might have missed it because multiple people complain and some have the problem solved already and others don't).
Comment 24 Bob Paddock 2006-07-13 17:42:12 UTC
Created attachment 91665 [details]
Tkinter.py not installed when have USE="X tcltk" set.


> - is the python you rebuilt with X and tcltk what /usr/bin/python points to

Yes.
lrwxrwxrwx 1 root root 9 Jul 12 21:35 /usr/bin/python -> python2.4

> - does python -c "import Tkinter" give an ImportError

Yes.
 python -c "import Tkinter"
Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named Tkinter

> - PORT_LOGDIR=/path/to/some/directory emerge python and attach the build log.

It is attached.

Python-2.4.3 # USE="X tcltk" PORT_LOGDIR=~/ emerge python

Doesn't look to me like python-2.4.3-r1 'configure' does any
tests for 'tcltk' therefore lib-tk/Tkinter.py et.al. are
never installed regardless of how you have USE="X tcltk" set.
Looks like it tests for unicode-tcl.

This is in the build output:

Compiling /usr/lib/python2.4/plat-linux2/TYPES.py ...
Listing /usr/lib/python2.4/lib-tk ...
Can't list /usr/lib/python2.4/lib-tk
Listing /usr/lib/python2.4/lib-dynload ...

ls /usr/lib/python2.4/lib-tk
ls: /usr/lib/python2.4/lib-tk: No such file or directory

Only reference I find to Tkinter.py on my system is
/usr/lib/openoffice/program/python-core-2.3.4/lib/lib-tk/Tkinter.py
Comment 25 Marien Zwart (RETIRED) gentoo-dev 2006-07-13 18:08:20 UTC
(In reply to comment #24)
> It is attached.
> 
> Python-2.4.3 # USE="X tcltk" PORT_LOGDIR=~/ emerge python
> 
> Doesn't look to me like python-2.4.3-r1 'configure' does any
> tests for 'tcltk' therefore lib-tk/Tkinter.py et.al. are
> never installed regardless of how you have USE="X tcltk" set.
> Looks like it tests for unicode-tcl.

The attached log contains only the "postinst" phase. Did the other phases (the actual compile) run? If they did not, perhaps you have some unusual portage settings causing it to pick up a stale python from /var/tmp/portage, and wiping the contents of that dir and/or changing your portage settings might help? If they did, can you attach the logfile they ended up in?
Comment 26 Bob Paddock 2006-07-13 18:21:58 UTC
Created attachment 91666 [details]
Requested compile phase log

> The attached log contains only the "postinst" phase. Did the other phases (the
> actual compile) run?

Yes.  That log is attached to this message.

Take a look at my comment #17 attachment to see if there is anything unusual;
there should not be.
Comment 27 Marien Zwart (RETIRED) gentoo-dev 2006-07-14 08:17:03 UTC
As far as I can tell that compile was with either X or tcltk missing from USE (src_configure echos it will not build the _tkinter module). The message from the eclass is probably too unclear: if you set USE on the commandline you need to specify it *every* time you merge python. I have just updated the message to recommend /etc/portage/package.use instead which does not have this problem.

Did you have tcltk and X in USE for the compile run that generated that log? If you did not, add them and repeat. If you did I'm missing something in the ebuild logic and a run with --debug added to the emerge options (this will be *very* verbose) might help me figure it out.
Comment 28 Bob Paddock 2006-07-15 03:36:23 UTC
(In reply to comment #27)
> As far as I can tell that compile was with either X or tcltk missing from USE
> (src_configure echos it will not build the _tkinter module). 

I have X and tcltk both in my USE, in /etc/make.conf.

> I have just updated the message to recommend /etc/portage/package.use 
>instead which does not have this problem.

I just added them to /etc/portage/package.use and still have the same 
bad results.  Did 'emerge python' after adding them, followed by
'emerge skencil':

/etc/portage/package.use:
cross-avr/gcc -boundschecking -fortran -gtk -gcj -mudflap -objc -objc-gc
dev-lang/python X tcltk
media-video/mplayer xmms win32codecs
net-fs/samba oav readline cups pam

I deleted /usr/tmp/portage and /var/ccache then did:

emerge python
emerge skencil

Still the same bad results:

* You need to recompile python with Tkinter support.
 * That means: 'dev-lang/python X tcltk'
 * in /etc/portage/package.use

!!! ERROR: media-gfx/skencil-0.6.17 failed.
Call stack:
  ebuild.sh, line 1555:   Called dyn_setup
  ebuild.sh, line 668:   Called pkg_setup
  skencil-0.6.17.ebuild, line 22:   Called python_tkinter_exists
  python.eclass, line 104:   Called die

> Did you have tcltk and X in USE for the compile run that generated that log? 

Yes.

> If you did I'm missing something in the
> ebuild logic and a run with --debug added to the emerge options (this will be
> *very* verbose) might help me figure it out.

Ok.  I'll get that done tonight, off to work now...
Remember that 'skencil' was working on my system, something has changed
in the last two-three weeks that is causing /usr/lib/python2.4/lib-tk to not
be installed, and deleted it in the first place.

Comment 29 Tom Myers 2006-08-07 14:01:34 UTC
See dev-lang/python/ChangeLog (bug 17808)
The following fixed it for me:
USE="tcl tk" emerge python
Seems the tcltk needs to be split into separate USE variables.
Comment 30 Alastair Tse (RETIRED) gentoo-dev 2006-08-08 04:45:27 UTC
ok, i didn't realise there was this bug, but the error was fixed yesterday in the eclasses.

thanks!