Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 225999

Summary: tcl/tk-8.4* broken if built with x11-proto/xproto-7.0.13
Product: Gentoo Linux Reporter: Jean-Francis Roy <jeanfrancis>
Component: Current packagesAssignee: TCL/TK Project <tcltk>
Status: RESOLVED FIXED    
Severity: normal CC: 7words.sg, aballier, caster, coldwind, cuciferus, devinsteffler, fkrogh, fmccor, gentoo-tigerp, jperezq, l337angelus, marek, maxbritov, mescalinum, openhs, Patrick.Fourniols, patrick, pebenito, polynomial-c, r_meier, Samuele.Kaplun, selckin, serp, sf_knue, sky315sky, the-dead82, transacid, wade, zmc, zorry
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://sourceforge.net/tracker/index.php?func=detail&aid=2010422&group_id=12997&atid=112997
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 268174    
Bug Blocks: 259833    
Attachments: tk-8.4.18-tkBind.patch
tk-8.4-lastevent.patch
Reworked ebuild for dev-lang/tk-8.4.18-r2
.patch

Description Jean-Francis Roy 2008-06-11 23:55:42 UTC
tcl/tk fails to execute if compiled while using x11-proto/xproto-7.0.13.

Reproducible: Always

Steps to Reproduce:
1. upgrade to x11-proto/xproto-7.0.13
2. compile tcl and tk
3. start any application using them

Actual Results:  
$ wish                                                                             
Application initialization failed: Can't find a usable tk.tcl in the following directories:             
    /usr/lib64/tcl8.5/tk8.5 /usr/lib64/tk8.5 /lib/tk8.5 /usr/library                                   

/usr/lib64/tk8.5/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     
    }"                                                     
    invoked from within                                     
"if {[tk windowingsystem] eq "aqua"} {                     
    bind Listbox <MouseWheel> {                             
        %W yview scroll [expr {- (%D)}] units               
    }                                                       
    bind Listbox <Option-Mou..."                           
    (file "/usr/lib64/tk8.5/listbox.tcl" line 182)
    invoked from within
"source /usr/lib64/tk8.5/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 ""} {
    proc ::tk::SourceLibFile {file} {
        namespace eval :: [list source [file join $::tk_library $file.tcl]]
    }
   ..."
    (file "/usr/lib64/tk8.5/tk.tcl" line 404)
    invoked from within
"source /usr/lib64/tk8.5/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $file]"


This probably means that tk wasn't installed properly.


Expected Results:  
Tcl/TK applications to work correctly.

# paludis -I
paludis 0.26.2   
Paludis build information:
    Compiler:             
        CXX:                   x86_64-pc-linux-gnu-g++ 4.3.1
        CXXFLAGS:              -march=core2 -O2 -pipe       
        LDFLAGS:                                           
        DATE:                  2008-06-11T12:38:31-0400     

    Libraries:
        C++ Library:           GNU libstdc++ 20080606

    Reduced Privs:
        reduced_uid:           101
        reduced_uid->name:     paludisbuild
        reduced_uid->dir:      /var/tmp/paludis
        reduced_gid:           1000           
        reduced_gid->name:     paludisbuild   

    Paths:
        DATADIR:               /usr/share
        LIBDIR:                /usr/lib64
        LIBEXECDIR:            /usr/libexec
        SYSCONFDIR:            /etc       
        PYTHONINSTALLDIR:      /usr/lib64/python2.5/site-packages
        RUBYINSTALLDIR:                                         

Repository virtuals:
    format:                    virtuals

Repository installed-virtuals:
    format:                    installed_virtuals
    root:                      /                 

Repository gentoo:
    format:                    ebuild
    location:                  /usr/portage
    append_repository_name_to_write_cache: true
    binary_destination:        false           
    binary_keywords:                           
    binary_uri_prefix:                         
    builddir:                  /var/tmp/paludis
    cache:                     /usr/portage/metadata/cache
    distdir:                   /usr/portage/distfiles     
    eapi_when_unknown:         0                         
    eapi_when_unspecified:     0                         
    eclassdirs:                /usr/portage/eclass       
    ignore_deprecated_profiles: false                     
    layout:                    traditional               
    names_cache:               /var/cache/paludis/names   
    newsdir:                   /usr/portage/metadata/news
    profile_eapi:              0                         
    profiles:                  /usr/portage/profiles/default/linux/amd64/2008.0/desktop
    securitydir:               /usr/portage/metadata/glsa                             
    setsdir:                   /usr/portage/sets                                       
    sync:                      rsync://rsync.europe.gentoo.org/gentoo-portage         
    sync_options:                                                                     
    use_manifest:              use                                                     
    write_cache:               /var/empty                                             

    Package information:
        app-admin/eselect-compiler: (none)
        app-shells/bash:       3.2_p39   
        dev-java/java-config:  1.3.7 2.1.6
        dev-lang/python:       2.4.4-r13 2.5.2-r4
        dev-python/pycrypto:   2.0.1-r6         
        dev-util/ccache:       (none)           
        dev-util/confcache:    (none)           
        sys-apps/baselayout:   2.0.0             
        sys-apps/openrc:       0.2.5             
        sys-apps/sandbox:      1.2.18.1-r2       
        sys-devel/autoconf:    2.13 2.62         
        sys-devel/automake:    1.10.1-r1 1.5 1.7.9-r1 1.9.6-r2
        sys-devel/binutils:    2.18-r1                       
        sys-devel/gcc-config:  1.4.0-r4                       
        sys-devel/libtool:     2.2.4                         
        virtual/os-headers:    2.6.25-r4 (for sys-kernel/linux-headers::installed)

Repository installed:
    format:                    vdb
    location:                  /var/db/pkg
    builddir:                  /var/tmp/paludis
    names_cache:               /var/cache/paludis/names
    provides_cache:            /var/cache/paludis/provides
    root:                      /
Comment 1 Patrick Fourniols 2008-06-12 22:54:11 UTC
idem for me, and before finding this bug report, i have tried tcl tk 8.5.1:
idem unless downgrading to xproto-7.0.12 and re emerging tcl tk...
Comment 2 M. Edward Borasky 2008-06-15 00:20:05 UTC
Got something very much like this with tcl/tk 8.4 when trying to access tk from R. I have no idea how I managed to find this bug, but I did. :) I thought it was an R bug, then a threads bug, then a gcc 4.3 bug. I guess I can upgrade to Tcl/Tk 8.5 now.
Comment 3 Boney McCracker 2008-06-18 02:50:41 UTC
Same here (with both tk 8.4.18 and tk 8.4.15-r1).
Error discovered while trying to run tk interfaces in python.
Comment 4 George Howlett 2008-06-21 20:01:53 UTC
The bug is in generic/tkBind.c in the flagArray.  xproto-7.0.13 adds
a new event GenericEvent.  Probably every version of Tk (8.*) is affected. Here's a patch.

--- tkBind.c    2006-07-21 02:26:54.000000000 -0400
+++ tkBind.c-new        2008-06-21 15:51:50.000000000 -0400
@@ -586,6 +586,9 @@
    /* ColormapNotify */                COLORMAP,
    /* ClientMessage */         0,
    /* MappingNotify */         0,
+#ifdef GenericEvent
+   /* GenericEvent */          0,
+#endif 
    /* VirtualEvent */          VIRTUAL,
    /* Activate */              ACTIVATE,           
    /* Deactivate */            ACTIVATE,
Comment 5 Zebediah C. McClure 2008-06-29 06:34:14 UTC
Behavior observed under ~x86, scope of breakage is wider than just AMD64 platform.
Comment 6 Jean-Francis Roy 2008-06-29 06:47:19 UTC
Hardware changed from AMD64 to All
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-04 13:21:22 UTC
*** Bug 230621 has been marked as a duplicate of this bug. ***
Comment 8 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-04 13:21:37 UTC
*** Bug 230727 has been marked as a duplicate of this bug. ***
Comment 9 Geert Vanhaute 2008-07-05 12:42:59 UTC
Created attachment 159623 [details, diff]
tk-8.4.18-tkBind.patch

The above mentionned patch
Comment 10 Fred Krogh 2008-07-05 18:09:37 UTC
*** Bug 230877 has been marked as a duplicate of this bug. ***
Comment 11 gtlinuxman 2008-07-10 13:56:01 UTC
The bug is tracked upstream: http://sourceforge.net/tracker/index.php?func=detail&aid=2010422&group_id=12997&atid=112997

During today discussion in the Tcler's chatroom Kevin Kenny proposed a more clean short-term solution than the patch from comment #4. This proposed solution is documented as a comment for upstream bug.

There's no upstream fix yet.

----
xmpp:tkabber@conference.jabber.ru/kostix
Comment 12 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-15 16:09:27 UTC
*** Bug 231874 has been marked as a duplicate of this bug. ***
Comment 13 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-21 16:23:09 UTC
*** Bug 232550 has been marked as a duplicate of this bug. ***
Comment 14 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2008-07-24 06:37:47 UTC
Created attachment 161242 [details]
tk-8.4-lastevent.patch

Hi,

the attached patch is slightly reworked (some line adjustment to apply cleanly to tk-8.4.x) taken directly from http://sourceforge.net/tracker/index.php?func=detail&aid=2010422&group_id=12997&atid=112997
It solved the issues with app-text/ding I had from this bug.

Cheers
Poly-C
Comment 15 Jim Ramsay (lack) (RETIRED) gentoo-dev 2008-07-24 14:43:33 UTC
(In reply to comment #14)
> the attached patch is slightly reworked (some line adjustment to apply cleanly
> to tk-8.4.x) taken directly from
> http://sourceforge.net/tracker/index.php?func=detail&aid=2010422&group_id=12997&atid=112997

Works for me: solves the problems I was seeing with gitk from 'USE=tk dev-util/git'

I vote this patch goes in to the tree.
Comment 16 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-28 17:19:50 UTC
*** Bug 233173 has been marked as a duplicate of this bug. ***
Comment 17 Marek Sapota 2008-08-28 17:11:55 UTC
*** Bug 234965 has been marked as a duplicate of this bug. ***
Comment 18 Boris Petersen 2008-09-05 12:20:07 UTC
patch works for me aswell
++ into tree
Comment 19 Carsten Lohrke (RETIRED) gentoo-dev 2008-09-09 10:42:10 UTC
*** Bug 237056 has been marked as a duplicate of this bug. ***
Comment 20 sargun dhillon 2008-09-23 08:05:31 UTC
Works for me. PLEASE put into tree. :-)
Comment 21 Tomas Cohen Arazi 2008-09-25 00:10:26 UTC
++
Comment 22 mondrillo 2008-09-26 19:17:01 UTC
Have this patch solved this issue, I've the same problem with chessDB. 

dev-lang/tk
      Latest version available: 8.4.18
      Latest version installed: 8.4.18
      Size of files: 3,285 kB
      Homepage:      http://dev.scriptics.com/software/tcltk/
      Description:   Tk Widget Set
      License:       BSD
Comment 23 Chiyeh Chen 2008-10-02 08:02:54 UTC
tk-8.4-lastevent.path have problem , out of array. 
But for insight , it didn't workable. tk-8.4.18
Comment 24 mondrillo 2008-10-10 13:11:33 UTC
Hello I put the ChessdB error :-(

$ chessdb
Application initialization failed: Can't find a usable tk.tcl in the following directories: 
    /usr/lib/snack2.2/tk8.4 /usr/lib64/tcl8.4/tk8.4 /usr/lib64/tk8.4 /usr/games/lib/tk8.4 /usr/lib/tk8.4 /usr/games/library /usr/library /usr/tk8.4.18/library /tk8.4.18/library

/usr/lib64/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
    }"
    invoked from within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
    bind Listbox <MouseWheel> {
        %W yview scroll [expr {- (%D)}] uni..."
    (file "/usr/lib64/tk8.4/listbox.tcl" line 181)
    invoked from within
"source /usr/lib64/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 {$tcl_platform(platform) eq "macintosh"} {
	proc ::tk::SourceLibFile {file} {
	    if {[catch {
		namespace eval :: ..."
    (file "/usr/lib64/tk8.4/tk.tcl" line 407)
    invoked from within
"source /usr/lib64/tk8.4/tk.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list source $file]"
/usr/lib/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
    }"
    invoked from within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
    bind Listbox <MouseWheel> {
        %W yview scroll [expr {- (%D)}] uni..."
    (file "/usr/lib/tk8.4/listbox.tcl" line 181)
    invoked from within
"source /usr/lib/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 {$tcl_platform(platform) eq "macintosh"} {
	proc ::tk::SourceLibFile {file} {
	    if {[catch {
		namespace eval :: ..."
    (file "/usr/lib/tk8.4/tk.tcl" line 407)
    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.

Error in startup script: invalid command name "sc_info"
    while executing
"sc_info version"
    (file "/usr/games/bin/chessdb" line 1)

Can I have running chessdb masking x11-proto/xproto-7.0.13?
Thank's and regards

Comment 25 cucu ionut 2008-10-10 15:26:08 UTC
it's how I solved it
Comment 26 Wormo (RETIRED) gentoo-dev 2008-10-22 22:31:32 UTC
*** Bug 243282 has been marked as a duplicate of this bug. ***
Comment 27 Jon Hurst 2008-10-25 19:07:54 UTC
(In reply to comment #18)
> patch works for me aswell
> ++ into tree
> 

Also works for me
Comment 28 Federico Ferri (RETIRED) gentoo-dev 2008-10-26 11:22:53 UTC
this is fixed in version 8.5.5.
also 8.4 got bumped to 8.4.19.

please test; reopen if doesn't work.
Comment 29 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2008-10-26 11:49:30 UTC
tk-8.4.19 still doesn't work without this patch...
Comment 30 Federico Ferri (RETIRED) gentoo-dev 2008-10-26 14:36:46 UTC
Reopening then
Comment 31 Federico Ferri (RETIRED) gentoo-dev 2008-10-27 20:33:04 UTC
added tk-8.4-lastevent.patch to tk-8.14.18-r1 and tk-8.4.19 ebuilds in CVS
please resync & test
thank you
Comment 32 Jean-Francis Roy 2008-10-27 21:25:23 UTC
Just synced and tested, everything works, hanks :)
Comment 33 Federico Ferri (RETIRED) gentoo-dev 2008-11-16 09:01:26 UTC
*** Bug 246774 has been marked as a duplicate of this bug. ***
Comment 34 fuzion 2008-11-24 12:16:38 UTC
I just did this:
emerge --sync
emerge tk (also did tcl)
emerge insight

I am getting the following error, is it related to this PR or should it be a new PR? What else do I need to do to get insight working again? I'll try emerge -u world.

The computer is an x86 (posted because error has 'macintosh' in it?).

Error I am seeing now is:

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.

Comment 35 fuzion 2008-11-25 03:09:18 UTC
emerge -u world did not fix it for me

I'm going to try using tk 8.5.5, since it has a hard mask (http://gentoo-portage.com/dev-lang/tk/ChangeLog) I'm going to do this:
echo "=dev-lang/tcl-8.5.5" >> /etc/portage/packages.unmask
echo "=dev-lang/tk-8.5.5" >> /etc/portage/package.unmask
emerge tk

This should replace tcl 8.4.19 and tk 8.4.19-r1 with 8.5.5. Hopefully that will fix it for me. I was under the impression that tk 8.4.19-r1 had this fixed.
Comment 36 fuzion 2008-11-25 03:29:30 UTC
After upgrading to tcl/tk 8.5.5 I had to run this command (twice):
revdep-rebuild

Insight still won't start. I'm going to try:
emerge insight
with hopes that it will detect the new tcl/tk version. Strangely enough in the error message it only seems to be looking for tk8.4 or tk8.4.1. Maybe it is insight that needs to be patched (i.e. does it come with its own copy of tcl/tk that it is using?)

I still get this error when I run 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 /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]"


This probably means that tk wasn't installed properly.
Comment 37 fuzion 2008-11-25 03:36:02 UTC
Reinstalling insight did not fix the problem.

Should this PR be re-opened? What else can I try?
Comment 38 Boney McCracker 2008-11-25 03:46:32 UTC
(In reply to comment #37)
Did you apply the patch?
Comment 39 fuzion 2008-11-25 03:56:26 UTC
I thought that the patch was in the 'mainstream' so it wouldn't need to be applied manually. Isn't that why the PR is closed?
Comment 40 fuzion 2008-11-25 03:57:13 UTC
Going to xproto 7.0.12 was the only thing that fixed it for me (of the things I tried). I had to do this:
- put this line in /usr/portage/profiles/package.mask:
>=x11-proto/xproto-7.0.13
- emerge xproto
- emerge tcl; emerge tk; emerge insight

I think this means that insight comes with its own tcl/tk. So would it be
feasible to apply the same patch to insight's tk that was applied to tk for
this PR?

Should I raise a new PR for this against insight? I'm worried someone will
strike it down as a duplicate of this PR.

I appologize for all of the posts to this PR tonight. Hopefully the details
will help someone else.
Comment 41 Boney McCracker 2008-11-25 04:12:16 UTC
(In reply to comment #39)
> I thought that the patch was in the 'mainstream' so it wouldn't need to be
> applied manually. Isn't that why the PR is closed?
Oh yeah.  Sorry.  Checking I see that I'm not longer using a local ebuild for this.
dev-lang/tk-8.4.18 and x11-proto/xproto-7.0.13 are working for me, but I don't use insight.
Comment 42 Boney McCracker 2008-11-25 04:15:13 UTC
Correction, I'm using dev-lang/tk-8.4.19-r1 and x11-proto/xproto-7.0.13
Comment 43 fishping 2008-12-14 00:26:22 UTC
(In reply to comment #0)
> tcl/tk fails to execute if compiled while using x11-proto/xproto-7.0.13.
> Reproducible: Always
> Steps to Reproduce:
> 1. upgrade to x11-proto/xproto-7.0.13
> 2. compile tcl and tk
> 3. start any application using them
> Actual Results:  
> $ wish                                                                          
> Application initialization failed: Can't find a usable tk.tcl in the following
> directories:             
>     /usr/lib64/tcl8.5/tk8.5 /usr/lib64/tk8.5 /lib/tk8.5 /usr/library            
> /usr/lib64/tk8.5/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     
>     }"                                                     
>     invoked from within                                     
> "if {[tk windowingsystem] eq "aqua"} {                     
>     bind Listbox <MouseWheel> {                             
>         %W yview scroll [expr {- (%D)}] units               
>     }                                                       
>     bind Listbox <Option-Mou..."                           
>     (file "/usr/lib64/tk8.5/listbox.tcl" line 182)
>     invoked from within
> "source /usr/lib64/tk8.5/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 ""} {
>     proc ::tk::SourceLibFile {file} {
>         namespace eval :: [list source [file join $::tk_library $file.tcl]]
>     }
>    ..."
>     (file "/usr/lib64/tk8.5/tk.tcl" line 404)
>     invoked from within
> "source /usr/lib64/tk8.5/tk.tcl"
>     ("uplevel" body line 1)
>     invoked from within
> "uplevel #0 [list source $file]"
> This probably means that tk wasn't installed properly.
> Expected Results:  
> Tcl/TK applications to work correctly.
> # paludis -I
> paludis 0.26.2   
> Paludis build information:
>     Compiler:             
>         CXX:                   x86_64-pc-linux-gnu-g++ 4.3.1
>         CXXFLAGS:              -march=core2 -O2 -pipe       
>         LDFLAGS:                                           
>         DATE:                  2008-06-11T12:38:31-0400     
>     Libraries:
>         C++ Library:           GNU libstdc++ 20080606
>     Reduced Privs:
>         reduced_uid:           101
>         reduced_uid->name:     paludisbuild
>         reduced_uid->dir:      /var/tmp/paludis
>         reduced_gid:           1000           
>         reduced_gid->name:     paludisbuild   
>     Paths:
>         DATADIR:               /usr/share
>         LIBDIR:                /usr/lib64
>         LIBEXECDIR:            /usr/libexec
>         SYSCONFDIR:            /etc       
>         PYTHONINSTALLDIR:      /usr/lib64/python2.5/site-packages
>         RUBYINSTALLDIR:                                         
> Repository virtuals:
>     format:                    virtuals
> Repository installed-virtuals:
>     format:                    installed_virtuals
>     root:                      /                 
> Repository gentoo:
>     format:                    ebuild
>     location:                  /usr/portage
>     append_repository_name_to_write_cache: true
>     binary_destination:        false           
>     binary_keywords:                           
>     binary_uri_prefix:                         
>     builddir:                  /var/tmp/paludis
>     cache:                     /usr/portage/metadata/cache
>     distdir:                   /usr/portage/distfiles     
>     eapi_when_unknown:         0                         
>     eapi_when_unspecified:     0                         
>     eclassdirs:                /usr/portage/eclass       
>     ignore_deprecated_profiles: false                     
>     layout:                    traditional               
>     names_cache:               /var/cache/paludis/names   
>     newsdir:                   /usr/portage/metadata/news
>     profile_eapi:              0                         
>     profiles:                 
> /usr/portage/profiles/default/linux/amd64/2008.0/desktop
>     securitydir:               /usr/portage/metadata/glsa                       
>     setsdir:                   /usr/portage/sets                                
>     sync:                      rsync://rsync.europe.gentoo.org/gentoo-portage   
>     sync_options:                                                               
>     use_manifest:              use                                              
>     write_cache:               /var/empty                                       
>     Package information:
>         app-admin/eselect-compiler: (none)
>         app-shells/bash:       3.2_p39   
>         dev-java/java-config:  1.3.7 2.1.6
>         dev-lang/python:       2.4.4-r13 2.5.2-r4
>         dev-python/pycrypto:   2.0.1-r6         
>         dev-util/ccache:       (none)           
>         dev-util/confcache:    (none)           
>         sys-apps/baselayout:   2.0.0             
>         sys-apps/openrc:       0.2.5             
>         sys-apps/sandbox:      1.2.18.1-r2       
>         sys-devel/autoconf:    2.13 2.62         
>         sys-devel/automake:    1.10.1-r1 1.5 1.7.9-r1 1.9.6-r2
>         sys-devel/binutils:    2.18-r1                       
>         sys-devel/gcc-config:  1.4.0-r4                       
>         sys-devel/libtool:     2.2.4                         
>         virtual/os-headers:    2.6.25-r4 (for
> sys-kernel/linux-headers::installed)
> Repository installed:
>     format:                    vdb
>     location:                  /var/db/pkg
>     builddir:                  /var/tmp/paludis
>     names_cache:               /var/cache/paludis/names
>     provides_cache:            /var/cache/paludis/provides
>     root:                      /

Comment 44 hsx 2008-12-16 13:32:32 UTC
s 
Comment 45 Serkan Kaba (RETIRED) gentoo-dev 2009-02-14 17:16:25 UTC
*** Bug 258988 has been marked as a duplicate of this bug. ***
Comment 46 Nikos Chantziaras 2009-02-14 17:22:21 UTC
Somehow I missed this bug before opening a new one.

Please reopen? The problem is still there.
Comment 47 Richard Li 2009-03-05 08:17:02 UTC
I still have this problem, too.

(I applied tk-8.4.18-tkBind.patch, which seems not to be in tree right now.)
Comment 48 Wade Fitzpatrick 2009-03-09 16:03:20 UTC
Created attachment 184467 [details]
Reworked ebuild for dev-lang/tk-8.4.18-r2

I hit this bug running python+Tkinter scripts from Scribus.

Added '=dev-lang/tk-8.4.18-r1 ~amd64' to package.keywords to get Lars' lastevent patch included. Scribus now happily displays Tkinter dialogs.

I am attaching a reworked ebuild that doesn't bump the DEPEND to
 >=x11-proto/xproto-7.0.13 but will still apply the patch if the later version of xproto is in use.

CAN SOMEONE PLEASE TEST AND BUMP dev-lang/tk-8.4.18-r2 TO STABLE??? THIS BUG HAS BEEN FIXED IN UNSTABLE FOR 7 MONTHS!!!
Comment 49 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-09 16:25:14 UTC
Why not just request stabilization of tk-8.4.19-r1 which has the fix already included?
Comment 50 Wade Fitzpatrick 2009-03-20 15:13:09 UTC
(In reply to comment #49)
> Why not just request stabilization of tk-8.4.19-r1 which has the fix already
> included?
> 

Well, whatever, but I encourage you to not make >=x11-proto/xproto-7.0.13 a dependency as these patches are only workarounds not proper fixes. The patch should only be applied if >=x11-proto/xproto-7.0.13 is already on the system.

The proper fixes weren't added to upstream until tk-8.5.4 (cvs rev 1.35.2.1)
http://tktoolkit.cvs.sourceforge.net/viewvc/tktoolkit/tk/generic/tkEvent.c?view=log&pathrev=core-8-5-4
Comment 51 Tom Gall (RETIRED) gentoo-dev 2009-05-01 14:17:17 UTC
I just ran into this last night. I don't see how this bug is either resolved/fixed at least for the random users of gentoo. 

In my case I ran into this on x86_64. (Tho curiously I didn't run into this on ppc64 which makes me wonder if maybe the amd64 team is just behind on bugs?!?)

 
Comment 52 Federico Ferri (RETIRED) gentoo-dev 2009-05-01 19:30:12 UTC
please, include with your reports the output of:

# emerge -pv dev-lang/tcl dev-lang/tk x11-proto/xproto

many ppl are reporting different cases, and it becomes difficult to track the progress of this pr
Comment 53 Patrick Lauer gentoo-dev 2009-05-01 20:17:44 UTC
Seems to still hit people. Reopening.
Comment 54 Róbert Čerňanský 2009-05-03 09:25:40 UTC
On amd64 system here:
 - with tk-8.4.18 - broken; same error
 - with tk-8.4.18-r1 - works fine

Tested with wish and tkabber.

[ebuild   R   ] dev-lang/tcl-8.4.18  USE="threads -debug" 0 kB
[ebuild   R   ] x11-proto/xproto-7.0.14  0 kB
[ebuild   R   ] dev-lang/tk-8.4.18-r1  USE="threads -debug" 0 kB

Please stabilize tk-8.4.18-r1.
Comment 55 Andrea 2009-05-04 18:23:09 UTC
my bugs http://bugs.gentoo.org/show_bug.cgi?id=267979 was  partially resolved using the tk-8.4.18-r1 packages.

i say to stabilize this package
Comment 56 Rodrigo Saboya 2009-05-04 19:41:10 UTC
Had this problem when trying to run idle. Emerging =dev-lang/tk-8.4.18-r1 fixed it for me.
Comment 57 Federico Ferri (RETIRED) gentoo-dev 2009-05-07 17:25:16 UTC
=dev-lang/tk-8.4.18-r1 is going stable soon. check bug #268174
Comment 58 Federico Ferri (RETIRED) gentoo-dev 2009-05-12 20:10:47 UTC
so it's finally fixed
Comment 59 Magnus Granberg gentoo-dev 2009-05-22 23:53:02 UTC
Patch from comment #2 works on amd64
Comment 60 fuzion 2009-05-29 20:25:00 UTC
Is this supposed to be fixed now?

I just finished a fresh install of Gentoo on a new computer. Insight is not working and it seems to be the same problem. Here is some output from this new Gentoo install (it is on a Pentium D machine). All of the other programs that I installed are working fine. I shouldn't have to reference this PR to get insight to work. Using 'emerge insight' should take care of everything for me.

dev ~ # emerge -p xproto

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

Calculating dependencies... done!
[ebuild   R   ] x11-proto/xproto-7.0.14 
dev ~ # emerge -p tk     

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

Calculating dependencies... done!
[ebuild   R   ] dev-lang/tk-8.5.7 
dev ~ # emerge -p insight

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

Calculating dependencies... done!
[ebuild   R   ] dev-util/insight-6.8 
dev ~ # 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 /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]"


This probably means that tk wasn't installed properly.

dev ~ # 
Comment 61 fuzion 2009-06-08 12:06:43 UTC
I don't have to rebuild tcl and tk to fix this problem.

Going to xproto 7.0.12 and rebuilding insight fixes it for me:
- put this line in /usr/portage/profiles/package.mask:
>=x11-proto/xproto-7.0.13
- emerge xproto
- emerge insight

Is this bug supposed to be fixed now so that the above is not required?
Comment 62 Federico Ferri (RETIRED) gentoo-dev 2009-06-08 13:30:47 UTC
your problem it's not about xproto and tcl, it's insight being broken. please report that in another bug and file it under insight.
in addition, insight ships his own (8.4) version of the tcl libraries, which makes it more and more broken.
Comment 63 hainaye 2009-09-21 09:58:14 UTC
Created attachment 204779 [details, diff]
.patch
Comment 64 cyb199010 2015-05-12 01:25:49 UTC
Comment on attachment 159623 [details, diff]
tk-8.4.18-tkBind.patch

>--- tk8.4.18-orig/generic/tkBind.c	2006-07-21 08:26:54.000000000 +0200
>+++ tk8.4.18/generic/tkBind.c	2008-07-05 12:17:10.000000000 +0200
>@@ -586,6 +586,9 @@
>    /* ColormapNotify */		COLORMAP,
>    /* ClientMessage */		0,
>    /* MappingNotify */		0,
>+#ifdef GenericEvent
>+   /* GenericEvent */          0,
>+#endif 
>    /* VirtualEvent */		VIRTUAL,
>    /* Activate */		ACTIVATE,	    
>    /* Deactivate */		ACTIVATE,