Bug#889810: [Pkg-tcltk-devel] Bug#889810: tk: 'wish' gives console error message; tclsh can't find package Tk

2018-02-07 Thread Sergei Golovan
tags 889810 + moreinfo
thanks

Hi Jasper,

On Wed, Feb 7, 2018 at 12:35 PM, Jasper Taylor  wrote:
> Package: tk
> Version: 8.6.0+9
> Severity: important
>
> Dear Maintainer,
>
> I found I could not run my Tk-based application. I was starting it with a 
> tclsh
> script which then executed "package require Tk" and this command was raising 
> an
> error: "Can't find package Tk".
>
> When running 'wish' from the command line a console error message appears as
> follows:
>
>>application-specific initialization failed: Can't find a usable tk.tcl in the
> following directories:
>>/usr/local/lib/tcl8.6/tk8.6 /usr/local/lib/tk8.6 /usr/lib/>tk8.6
> /usr/lib/tk8.6 /lib/tk8.6 /usr/library

Judging by a lot of /usr/local in the output I'd say that you have some locally
installed Tcl/Tk distribution and `wish' is actually
`/usr/local/bin/wish'. Can you check
this? Does /usr/bin/wish run properly when a full path is specified?

Cheers!
-- 
Sergei Golovan



Bug#889810: [Pkg-tcltk-devel] Bug#889810: tk: 'wish' gives console error message; tclsh can't find package Tk

2018-02-07 Thread Jasper Taylor

Hi Sergei,

On Wed, 7 Feb 2018 13:36:47 +0300 Sergei Golovan wrote:
> tags 889810 + moreinfo
> thanks
>
> Hi Jasper,
>
> On Wed, Feb 7, 2018 at 12:35 PM, Jasper Taylor wrote:
> > Package: tk
> > Version: 8.6.0+9
> > Severity: important
> >
> > Dear Maintainer,
> >
> > I found I could not run my Tk-based application. I was starting it 
with a tclsh
> > script which then executed "package require Tk" and this command 
was raising an

> > error: "Can't find package Tk".
> >
> > When running 'wish' from the command line a console error message 
appears as

> > follows:
> >
> >>application-specific initialization failed: Can't find a usable 
tk.tcl in the

> > following directories:
> >> /usr/local/lib/tcl8.6/tk8.6 /usr/local/lib/tk8.6 /usr/lib/>tk8.6
> > /usr/lib/tk8.6 /lib/tk8.6 /usr/library
>
> Judging by a lot of /usr/local in the output I'd say that you have 
some locally

> installed Tcl/Tk distribution and `wish' is actually
> `/usr/local/bin/wish'. Can you check
> this? Does /usr/bin/wish run properly when a full path is specified?

Thanks for looking at my problem. I don't have anything relevant under 
/usr/local -- the search paths are built into the package.


I also have access to a Debian system with tk 8.6.0+8 installed. On this 
system, I run tclsh and type


set auto_path

and get

/usr/share/tcltk/tcl8.6 /usr/share/tcltk /usr/lib /usr/local/lib/tcltk 
/usr/local/share/tcltk /usr/lib/tcltk/x86_64-linux-gnu /usr/lib/tcltk 
/usr/lib/tcltk/tcl8.6


and then running

package require Tk

returns 8.6.2 and opens a toplevel Tk window.

Now on my own system with tk 8.6.0+9I run tclsh and type

set auto_path

and get

/usr/local/lib/tcl8.6 /usr/local/lib /usr/lib

If I then type

set auto_path {/usr/share/tcltk/tcl8.6 /usr/share/tcltk /usr/lib 
/usr/local/lib/tcltk /usr/local/share/tcltk 
/usr/lib/tcltk/x86_64-linux-gnu /usr/lib/tcltk /usr/lib/tcltk/tcl8.6}


(so it is the same as it was in 8.6.0+8) then

package require Tk

it returns 8.6.6 and opens a toplevel window. I have added a line to my 
script to set the auto_path to the old value and my application now runs 
OK, although tk and wish should not need this.

Cheers
    Jasper

>
> Cheers!
> --
> Sergei Golovan
>
>