From: MHD on
I'm fairly new to tcl/tk and found that I had to upgrade to 8.5 on my
FreeBSD7 machine to take advantage of some new widgets.

So I installed the package
pkg_add -r tk85

and ended up with tk 8.5.5.

No problem, except the interpreter seems to think 8.5 and 8.5.5
require different commands, and neither seems to work. Take this
simple program:

#! /usr/local/bin/tclsh8.5
package require Tk
grid [ttk::button .b -text "Hello World"]

Which triggers the error message:

attempt to provide package Tk 8.5 failed: package Tk 8.5.5 provided
instead
("package ifneeded Tk 8.5" script)
invoked from within
"package require Tk "
(file "./test.tcl" line 3)

Changing line 2 to "package require Tk 8.5" gets the same result.

OK, let's change line 2 of the file to

package require Tk 8.5.5

Well then, I get

can't find package Tk 8.5.5
while executing
"package require Tk 8.5.5 "
(file "./test.tcl" line 3)

So I don't get it. The interpreter can't find 8.5.5, unless I tell it
I want vanilla 8.5, where all of a sudden 8.5.5 is all it can find!
From: Gerald W. Lester on
It looks to me as if you have a partial install of 8.5.5 and a partial
install of 8.5.

Don't have a FreeBSD7 machine that I can try to replicate your problem on.

MHD wrote:
> I'm fairly new to tcl/tk and found that I had to upgrade to 8.5 on my
> FreeBSD7 machine to take advantage of some new widgets.
>
> So I installed the package
> pkg_add -r tk85
>
> and ended up with tk 8.5.5.
>
> No problem, except the interpreter seems to think 8.5 and 8.5.5
> require different commands, and neither seems to work. Take this
> simple program:
>
> #! /usr/local/bin/tclsh8.5
> package require Tk
> grid [ttk::button .b -text "Hello World"]
>
> Which triggers the error message:
>
> attempt to provide package Tk 8.5 failed: package Tk 8.5.5 provided
> instead
> ("package ifneeded Tk 8.5" script)
> invoked from within
> "package require Tk "
> (file "./test.tcl" line 3)
>
> Changing line 2 to "package require Tk 8.5" gets the same result.
>
> OK, let's change line 2 of the file to
>
> package require Tk 8.5.5
>
> Well then, I get
>
> can't find package Tk 8.5.5
> while executing
> "package require Tk 8.5.5 "
> (file "./test.tcl" line 3)
>
> So I don't get it. The interpreter can't find 8.5.5, unless I tell it
> I want vanilla 8.5, where all of a sudden 8.5.5 is all it can find!


--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
From: Neil Madden on
MHD wrote:
> I'm fairly new to tcl/tk and found that I had to upgrade to 8.5 on my
> FreeBSD7 machine to take advantage of some new widgets.
>
> So I installed the package
> pkg_add -r tk85
>
> and ended up with tk 8.5.5.
>
> No problem, except the interpreter seems to think 8.5 and 8.5.5
> require different commands, and neither seems to work. Take this
> simple program:
>
> #! /usr/local/bin/tclsh8.5
> package require Tk
> grid [ttk::button .b -text "Hello World"]
>
> Which triggers the error message:
>
> attempt to provide package Tk 8.5 failed: package Tk 8.5.5 provided
> instead
> ("package ifneeded Tk 8.5" script)
> invoked from within
> "package require Tk "
> (file "./test.tcl" line 3)
>
> Changing line 2 to "package require Tk 8.5" gets the same result.
>
> OK, let's change line 2 of the file to
>
> package require Tk 8.5.5
>
> Well then, I get
>
> can't find package Tk 8.5.5
> while executing
> "package require Tk 8.5.5 "
> (file "./test.tcl" line 3)
>
> So I don't get it. The interpreter can't find 8.5.5, unless I tell it
> I want vanilla 8.5, where all of a sudden 8.5.5 is all it can find!

Looks like a bug in the FreeBSD Tk packaging. That error is produced
when a package claims to provide version 8.5 (exactly) in it's
pkgIndex.tcl script, but then the actual package has a "package provide
Tk 8.5.5". You need to locate the pkgIndex.tcl for Tk and change the
version number in it to match what is actually provided (i.e. 8.5.5).

-- Neil
From: Bezoar on
On Dec 6, 4:00 am, Neil Madden <n...(a)cs.nott.ac.uk> wrote:
> MHD wrote:
> > I'm fairly new to tcl/tk and found that I had to upgrade to 8.5 on my
> > FreeBSD7 machine to take advantage of some new widgets.
>
> > So I installed the package
> > pkg_add -r tk85
>
> > and ended up with tk 8.5.5.
>
> > No problem, except the interpreter seems to think 8.5 and 8.5.5
> > require different commands, and neither seems to work. Take this
> > simple program:
>
> > #! /usr/local/bin/tclsh8.5
> > package require Tk
> > grid [ttk::button .b -text "Hello World"]
>
> > Which triggers the error message:
>
> > attempt to provide package Tk 8.5 failed: package Tk 8.5.5 provided
> > instead
> > ("package ifneeded Tk 8.5" script)
> > invoked from within
> > "package require Tk "
> > (file "./test.tcl" line 3)
>
> > Changing line 2 to "package require Tk 8.5" gets the same result.
>
> > OK, let's change line 2 of the file to
>
> > package require Tk 8.5.5
>
> > Well then, I get
>
> > can't find package Tk 8.5.5
> > while executing
> > "package require Tk 8.5.5 "
> > (file "./test.tcl" line 3)
>
> > So I don't get it. The interpreter can't find 8.5.5, unless I tell it
> > I want vanilla 8.5, where all of a sudden 8.5.5 is all it can find!
>
> Looks like a bug in the FreeBSD Tk packaging. That error is produced
> when a package claims to provide version 8.5 (exactly) in it's
> pkgIndex.tcl script, but then the actual package has a "package provide
> Tk 8.5.5". You need to locate the pkgIndex.tcl for Tk and change the
> version number in it to match what is actually provided (i.e. 8.5.5).
>
> -- Neil

Did you do a pkg_add -r tcl8.5 ? to upgrade your tclsh to 8.5.5? Most
package managers are smart enough to detect the dependency but if you
could upgrade tk without specifying the 3rd number it may have not
upgraded the tcl part of tcl/tk to 8.5.5.

Carl
From: duzuike on
On Dec 6, 8:33 am, MHD <martin.h.d...(a)gmail.com> wrote:
> I'm fairly new to tcl/tk and found that I had to upgrade to 8.5 on my
> FreeBSD7 machine to take advantage of some new widgets.
>
> So I installed the package
> pkg_add -r tk85
>
> and ended up with tk 8.5.5.
>
> No problem, except the interpreter seems to think 8.5 and 8.5.5
> require different commands, and neither seems to work.  Take this
> simple program:
>
> #! /usr/local/bin/tclsh8.5
> package require Tk
> grid [ttk::button .b -text "Hello World"]
>
> Which triggers the error message:
>
> attempt to provide package Tk 8.5 failed: package Tk 8.5.5 provided
> instead
>     ("package ifneeded Tk 8.5" script)
>     invoked from within
> "package require Tk "
>     (file "./test.tcl" line 3)
>
> Changing line 2 to "package require Tk 8.5" gets the same result.
>
> OK, let's change line 2 of the file to
>
> package require Tk 8.5.5
>
> Well then, I get
>
> can't find package Tk 8.5.5
>     while executing
> "package require Tk 8.5.5 "
>     (file "./test.tcl" line 3)
>
> So I don't get it.  The interpreter can't find 8.5.5, unless I tell it
> I want vanilla 8.5, where all of a sudden 8.5.5 is all it can find!

I use tcl8.5 and sqlite3 on FreeBSD 6 machine, have the same problem.
I think it is caused by the poor freebsd tcl port.