Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231874 - dev-util/insight-6.8: does not start - Tk_Init failed: Can't find a usable tk.tcl
Summary: dev-util/insight-6.8: does not start - Tk_Init failed: Can't find a usable tk...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal with 3 votes (vote)
Assignee: Olivier Crete (RETIRED)
URL:
Whiteboard:
Keywords:
: 270631 273205 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-15 15:58 UTC by Tiger!P
Modified: 2011-12-18 05:17 UTC (History)
24 users (show)

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


Attachments
Ebuild which applies comment 2 patch (insight-6.8-r1.ebuild,1.91 KB, text/plain)
2009-06-12 15:35 UTC, mihai stanescu
Details
Ebuild for latest insight as described in comment 11 (insight-6.8_p1.ebuild,1.93 KB, text/plain)
2010-04-13 18:21 UTC, Peter Fox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiger!P 2008-07-15 15:58:27 UTC
when starting insight it fails with the following message:
Tk_Init failed: Can't find a usable tk.tcl in the following directories: 
    /usr/share/insight/tk8.4 /usr/lib/tk8.4 /lib/tk8.4 /usr/library /library /tk8.4.1/library /tk8.4.1/library

/usr/share/insight/tk8.4/tk.tcl: no event type or button # or keysym
no event type or button # or keysym
    while executing
"bind Listbox <MouseWheel> {
    %W yview scroll [expr {- (%D / 120) * 4}] units
}"
    (file "/usr/share/insight/tk8.4/listbox.tcl" line 182)
    invoked from within
"source /usr/share/insight/tk8.4/listbox.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [list source [file join $::tk_library $file.tcl]]"
    (procedure "SourceLibFile" line 2)
    invoked from within
"SourceLibFile listbox"
    (in namespace eval "::tk" script line 4)
    invoked from within
"namespace eval ::tk {
        SourceLibFile button
        SourceLibFile entry
        SourceLibFile listbox
        SourceLibFile menu
        SourceLibFile panedwindow
        SourceLibFile ..."
    invoked from within
"if {$::tk_library ne ""} {
    if {[string equal $tcl_platform(platform) "macintosh"]} {
        proc ::tk::SourceLibFile {file} {
            if {[catch {
                namesp..."
    (file "/usr/share/insight/tk8.4/tk.tcl" line 393)
    invoked from within
"source /usr/share/insight/tk8.4/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $file]"
/usr/lib/tk8.4/tk.tcl: can't import command "mc": already exists
can't import command "mc": already exists
    while executing
"namespace import ::msgcat::mc"
    (in namespace eval "::tk::msgcat" script line 21)
    invoked from within
"namespace eval msgcat {
        namespace export mc mcmax
        if {[interp issafe] || [catch {package require msgcat}]} {
            # The msgcat package..."
    (in namespace eval "::tk" script line 3)
    invoked from within
"namespace eval ::tk {
    # Set up the msgcat commands
    namespace eval msgcat {
        namespace export mc mcmax
        if {[interp issafe] || [catch {p..."
    (file "/usr/lib/tk8.4/tk.tcl" line 20)
    invoked from within
"source /usr/lib/tk8.4/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $file]"


This probably means that tk wasn't installed properly.



Reproducible: Always

Steps to Reproduce:
1. emerge =dev-util/insight-6.8
2. start insight


Actual Results:  
It displays the message above.

Expected Results:  
It should have started insight

I have dev-lang/tk-8.4.18 installed

emerge --info
Portage 2.2_rc1 (default/linux/amd64/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.23-gentoo x86_64)
=================================================================
System uname: Linux-2.6.23-gentoo-x86_64-AMD_Athlon-tm-_64_Processor_3200+-with-glibc2.2.5
Timestamp of tree: Sun, 13 Jul 2008 12:45:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirror.switch.ch/mirror/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_GB nl"
PKGDIR="/usr/portage/packages"
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="/mnt/data1/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /home/stefan/test/ebuilds"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa amd64 apache2 arts audiofile bash-completion berkdb bluetooth branding bzip2 cairo cdr cjk cli cracklib crypt cups dbus dga dri dvd dvdr dvdread eds emboss emul-linux-x86 encode esd evo exif ffmpeg firefox flac fortran ftp gd gdbm gif gnome gnutls gphoto2 gstreamer gtk hal iconv ipv6 isdnlog jabber jpeg jpeg2k kde kerberos libnotify lm_sensors mad maildir midi mikmod mime mmx mng mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin ogg openal opengl openmp osc oss pam pcre pdf perl php png posix ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl seamonkey session spell spl sse sse2 ssl startup-notification svg tcpd theora tiff truetype unicode usb utempter vhosts vorbis wmf xml xorg xpm xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB nl" USERLAND="GNU" VIDEO_CARDS="nvidia nv dummy vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-15 16:09:27 UTC

*** This bug has been marked as a duplicate of bug 225999 ***
Comment 2 Steve Arnold gentoo-dev 2008-12-30 01:39:29 UTC
Using the same patch as described upstream and in bug #225999 (which works in the case of sourcenav) doesn't appear to work for Insight, and the only difference appears to be that sourcenav uses Tk-8.3 and Insight uses Tk-8.4.  Note that this bug is not really a true duplicate, since patching the system Tk has no effect on Insight.

So even with the equivalent of this patch applied to Insight's internal Tk:

http://bugs.gentoo.org/attachment.cgi?id=161242

it still fails to start with the infamous error below.  I'll play around with it a little more, but I'm open to ideas...

$ /usr/bin/insight
Tk_Init failed: Can't find a usable tk.tcl in the following directories: 
    /usr/share/insight/tk8.4 /usr/lib/tk8.4 /lib/tk8.4 /usr/library /library /tk                                                                                                                                    
8.4.1/library /tk8.4.1/library

/usr/share/insight/tk8.4/tk.tcl: no event type or button # or keysym
no event type or button # or keysym
    while executing
"bind Listbox <MouseWheel> {
    %W yview scroll [expr {- (%D / 120) * 4}] units
}"
    (file "/usr/share/insight/tk8.4/listbox.tcl" line 182)
    invoked from within
"source /usr/share/insight/tk8.4/listbox.tcl"
    (in namespace eval "::" script line 1)
    invoked from within
"namespace eval :: [list source [file join $::tk_library $file.tcl]]"
    (procedure "SourceLibFile" line 2)
    invoked from within
"SourceLibFile listbox"
    (in namespace eval "::tk" script line 4)
    invoked from within
"namespace eval ::tk {
        SourceLibFile button
        SourceLibFile entry
        SourceLibFile listbox
        SourceLibFile menu
        SourceLibFile panedwindow
        SourceLibFile ..."
    invoked from within
"if {$::tk_library ne ""} {
    if {[string equal $tcl_platform(platform) "macintosh"]} {
        proc ::tk::SourceLibFile {file} {
            if {[catch {
                namesp..."
    (file "/usr/share/insight/tk8.4/tk.tcl" line 393)
    invoked from within
"source /usr/share/insight/tk8.4/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $file]"
/usr/lib/tk8.4/tk.tcl: can't import command "mc": already exists
can't import command "mc": already exists
    while executing
"namespace import ::msgcat::mc"
    (in namespace eval "::tk::msgcat" script line 21)
    invoked from within
"namespace eval msgcat {
        namespace export mc mcmax
        if {[interp issafe] || [catch {package require msgcat}]} {
            # The msgcat package..."
    (in namespace eval "::tk" script line 3)
    invoked from within
"namespace eval ::tk {
    # Set up the msgcat commands
    namespace eval msgcat {
        namespace export mc mcmax
        if {[interp issafe] || [catch {p..."
    (file "/usr/lib/tk8.4/tk.tcl" line 20)
    invoked from within
"source /usr/lib/tk8.4/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $file]"


This probably means that tk wasn't installed properly.
Comment 3 Marc Vinyals 2009-03-29 18:25:50 UTC
This bug also happens in my ~amd64 box with insight 6.7.1-r1 / 6.8 and tcl+tk 8.4.19 / 8.5.6. However it isn't triggered in my x86 box with insight 6.7.1-r1 / 6.8 and tck+tk 8.4.18 / 8.5.6. It looks like a deeper problem.
Comment 4 Sebastian Luther (few) 2009-04-17 18:22:14 UTC
With the patch mentioned in comment #2 applied =dev-util/insight-6.7.1-r1 and =dev-util/insight-6.8 do no longer fail to start on amd64. 

#3: Your versions of tk and tcl do not matter, because insight has its own versions bundled. 
Comment 5 Sebastian Luther (few) 2009-05-20 21:14:49 UTC
*** Bug 270631 has been marked as a duplicate of this bug. ***
Comment 6 Magnus Granberg gentoo-dev 2009-05-22 23:54:07 UTC
Patch from comment #2 works on amd64
Comment 7 Sebastian Luther (few) 2009-06-09 08:06:49 UTC
*** Bug 273205 has been marked as a duplicate of this bug. ***
Comment 8 mihai stanescu 2009-06-12 15:35:07 UTC
Created attachment 194428 [details]
Ebuild which applies comment 2 patch
Comment 9 Luke-Jr 2009-07-16 19:02:06 UTC
Patch worked for me as well.
Comment 10 Federico Ferri (RETIRED) gentoo-dev 2009-08-20 23:04:07 UTC
http://sourceware.org/insight/

News
July 19, 2009:

    Updated Insight 6.8-1 available 
    Insight 6.8 has been available for some time, and the current release tarball has issues with newer versions of X11. As a result, I am making available a patched Inisght 6.8-1 release which should fix all outstanding issues with X11. 
Comment 11 Stuart Longland (RETIRED) gentoo-dev 2010-01-20 22:46:54 UTC
I can confirm this bug via the ebuild on Gentoo/MIPS, as well as when compiling by hand -- I struck this.

Since Insight 6.8-1 was released to fix exactly this issue, I think it better we just bump it to insight-6.8_p1.  Ebuild changes are small (mainly ditch src_unpack and set MY_PV based on PV to substitute "_p" with "-"); I shall attach an updated ebuild shortly, and can commit it too pending the dev-tools herd's/tester's blessing (current maintainers).
Comment 12 Peter Fox 2010-04-13 18:21:22 UTC
Created attachment 227635 [details]
Ebuild for latest insight as described in comment 11

This is my attempt at an ebuild for the latest insight which fixes the can't find a usable tk.tcl.
Comment 13 emerald 2010-05-04 18:29:18 UTC
the patch in comment 12 makes it work for me again.
Comment 14 Matthias Fulz 2010-05-25 16:59:09 UTC
(In reply to comment #12)
> Created an attachment (id=227635) [details]
> Ebuild for latest insight as described in comment 11
> 
> This is my attempt at an ebuild for the latest insight which fixes the can't
> find a usable tk.tcl.
> 

Ebuild is working fine for me - THX.
Comment 15 Kobboi 2010-07-21 08:35:46 UTC
Hitting this as well. Can some dev add the new ebuild to the tree?
Comment 16 Scott Riddell 2010-08-09 17:14:11 UTC
(In reply to comment #15)
> Hitting this as well. Can some dev add the new ebuild to the tree?
> 

When I tried -r1 and _p1 ebuild got a bad checksum error.
I tried editing out the <MouseWheel> references as described in 
http://forums.gentoo.org/viewtopic-t-829965-start-0.html but I don't know how to emerge my edited version without it being overwritten by the original.  
Seems this fundamental tool should be a priority...
Comment 17 Joerg Faschingbauer 2010-09-07 19:07:34 UTC
I too can confirm that insight 6.8-1 fixes the problem.
Comment 18 Olivier Crete (RETIRED) gentoo-dev 2010-09-07 20:49:06 UTC
Lets mark it as fixed then
Comment 19 Joerg Faschingbauer 2010-09-07 21:24:20 UTC
(In reply to comment #18)
> Lets mark it as fixed then
> 

Sync still gives me the 6.8 ebuild, not Peter Fox's from comment #12. Sorry, I should have mentioned that. The request for a 6.8-1 ebuild is fairly old now, and what I wanted to say is that Peter's works far better than the 6.8 one.

Can somebody please commit that ebuild?
Comment 20 Peter Asplund 2010-10-03 00:40:07 UTC
I guess this isn't fixed since the ebuild for 8.6.1 still isn't in portage.
Comment 21 Richard Schwarz 2010-11-22 12:29:42 UTC
This bug isn't fixed adequately. Portage still doesn't feature Insight version 6.8.1, so every amd64 user will run into this. Please replace version 6.8 with version 6.8.1 in Portage.
Comment 22 Mark 2011-03-15 09:33:59 UTC
(In reply to comment #21)
> This bug isn't fixed adequately. Portage still doesn't feature Insight version
> 6.8.1, so every amd64 user will run into this. Please replace version 6.8 with
> version 6.8.1 in Portage.

this is still valid: the 6.8 version does not work, but 6.8_p1 from the attached ebuild does. Please add it to portage.
Comment 23 fuzion 2011-12-18 05:17:57 UTC
This still isn't fixed. Portage still has insight 6.8.

There's a bug to bump insight to version 6.8.1. Any idea what the ETA is for that? Another year or two?
https://bugs.gentoo.org/342321?id=342321