can't find package Itk 3.2

Posted by douglas_aparicio_bermudez on 2010-08-04 09:12

Greetings.

I have a script that uses the following libraries:

##
package require Tk
package require base64 ;# tcllib
package require http
package require Expect

lappend auto_path [pwd]
package require telnet
package require Iwidgets 4.0
##

Using ActiveTcl8.4.19.0 I have no problem with the libraries, everything behaves perfectly.

Build the executable (.exe) with TclApp (I have TclDevKit4.1.0) and run time .exe I get an error:

##
can't find package Itk 3.2
while executing
package require Itk3.2
.....
...
##

I tested upgrading to TclDevKit5.0.1 ActiveTcl8.5.6.0 and generates the executable without problems but when you run the .exe I get the same error.

Some help.
I appreciate the responses

Douglas Aparicio Bermudez
IT Professional

AttachmentSize
errorItk.png87.7 KB

andreas.kupries
ActiveState Staff
Wed, 2010-08-04 11:27

Given your description I am not able to fully determine the cause of your problem. Therefore I have a few questions for you whose answers will hopefully clear the fog. I hope you don't mind.

When you are building your executable, are you using the GUI or command line mode ?

What packages have you specified to be wrapped, either in your project file, or on the command line ?

Are you pulling the packages out of a teapot repository like teapot.activestate.com, or out of a local ActiveTcl installation, via its .tap files ?

See the 'Edit -> Preferences' menu for the global search paths to tap files and teapot repositiories.

douglas_aparici... | Wed, 2010-08-04 13:00

Regards

Continuing with the answers...

When you are building your executable, are you using the GUI or command line mode ?

-> I'm building my executable from the GUI TclApp

What packages have you specified to be wrapped, either in your project file, or on the command line ?

-> Using the GUI TclApp, Packages tab, "Scan files for required packages" recognizes the following packages to be added:

- base64
- Expect
- http
- Iwidgets 4.0
- telnet
- Tk

Are you pulling the packages out of a teapot repository like teapot.activestate.com, or out of a local ActiveTcl installation, via its .tap files ?

-> Not sure what you mean, simply generates the executables TclApp GUI, I think the second option is correct: "out of a local or ActiveTcl installation, via its. Tap files?"

See the 'Edit -> Preferences' menu for the global search paths to tap files and teapot repositiories.

-> In "Edit -> Preferences'" graphical interface TclApp in the tab "Repositories teapot shows:
C:/TclDevKit/tap_help_repository
c:\tcl\lib\teapot

And in the tab "Search Paths TAP shows:
c:/ tcl/lib/tcl8.4
c:/ tcl/lib
c:/tcl/lib/tcl8.5

Thanks
Douglas Aparicio Bermudez
IT Professional

andreas.kupries
ActiveState Staff
Wed, 2010-08-04 15:54

Ok.

The "Scan files for required packages" gives you the packages TclApp was able to directly find as required in your code. This does not cover the dependencies of these packages.

In the 'Packages' Tab are buttons to follow these dependencies.
In your case I do not believe that they will help you. Because:

While your ActiveTcl installation does have local teapot repository (c:\tcl\lib\teapot) I am guessing that never installed anything into it, be it 'teacup install', or 'teacup update'.

That would mean that only the data in .tap files is available. The .tap files are the older form of package definitions for TclApp, and this form does not contain dependency information. Packages in teapot repositories have a newer meta data format which contains dependency information, like that IWidgets requires ITk.

For ActiveTcl 8.5 the cause is that while you have packages in the teapot repository c:\tcl\lib\teapot, IWidgets is not provided through that.

Solutions:

(1) Add ITk manually to the list of packages TclApp should wrap to solve the issue at hand. Possibly ITcl as well, depending on the chosen basekit (some have ITcl pre-wrapped, some don't).

(2) Run 'teacup update' to fill your local repository in c:\tcl\lib\teapot with all packages we provide, then in TclApp load your project, then go to the Packages tab and use the toolbar button to follow package dependencies.