[vtkusers] vtkLogo.tcl: can't find packages Tk, vtkinteraction

George Brower browerg at verizon.net
Thu Jun 25 17:20:06 EDT 2009


I've done some more work since the message that started this thread and 
a follow up: "vtkLogo.tcl: can't find packages Tk, vtkinteraction 
[followup]", including tests with four shells, but vtkLogo is still not 
working. (I have gotten some of the other demos in the same file to work.)

The results of my tests follow; what am I missing / doing wrong / ... ?

Recapping:
    vtkLogo.tcl wants:
        package require vtk
        package require vtkinteraction
        package require vtktesting
    At least one of which wants:
        package require Tk

First, I added "puts $auto_path to the top of vtkLogo and used a bash
shell to run "tcl vtkLogo.tcl" from the subdirectory of my home that 
holds vtkLogo.tcl. vtkLogo.tcl reported this auto_path (The first two 
entries are from the TCLLIBPATH that I created, possibly incorrectly, 
but the rest, including references to tcl8.3, are automatic.:
    /usr/lib/tcl8.3/vtk/vtkinteraction:/usr/lib/python2.5/site-packages/OpenGL/Tk 
    /usr/share/tcltk/tcl8.3 /usr/lib /usr/local/lib/tcltk /usr/local/share/tcltk 
    /usr/lib/tcltk /usr/share/tcltk /usr/lib/tclX8.3

After looking in directories off the auto_path, vtkLogo.tcl reported:

    Can't find a usable tk.tcl in the following directories: 
        /usr/share/tcltk/tk8.4 /usr/lib/tk8.4 /lib/tk8.4 /usr/library /library 
        /tk8.4/library /tk8.4/library
    
    /usr/share/tcltk/tk8.4/tk.tcl: 
        version conflict for package "Tk": have 8.3, need 8.4
        version conflict for package "Tk": have 8.3, need 8.4

        while executing
    "package require -exact Tk  8.4"
        (file "/usr/share/tcltk/tk8.4/tk.tcl" line 16)
        invoked from within
    "source /usr/share/tcltk/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: can't find package vtkinteraction
        while executing
    "package require vtkinteraction"
        (file "vtkLogo.tcl" line 4)
    Tcl_Release couldn't find reference for 0x8176c70
    Aborted


I tried the "package require" and "puts $auto_path" statements in four
shells (tcl, tclsh, wish, and tkcon), in the order I discovered them:

tcl found Tk8.3: ~/desktop/tcl/data_vtk/Tcl$ tcl
                 tcl>package require Tk
                 8.3
                 tcl>package require vtk
                 5.0
                 tcl>package require vtkinteraction
                 5.0
                 tcl>package require vtktesting
                 5.0
    and reported auto_path:
        tcl>puts $auto_path
        /usr/lib/tcl8.3/vtk/vtkinteraction:/usr/lib/python2.5/site-packages/OpenGL/Tk 
        /usr/share/tcltk/tcl8.3 /usr/lib /usr/local/lib/tcltk /usr/local/share/tcltk 
        /usr/lib/tcltk /usr/share/tcltk /usr/lib/tclX8.3 /usr/share/tcltk/tcllib1.10 
        /usr/share/tcltk/tklib0.4 /usr/share/tcltk/tk8.3

tclsh, wish, and tkcon found Tk8.4, the other packages tcl found, and
somewhat different auto_path:
        % puts $auto_path
        /usr/lib/tcl8.3/vtk/vtkinteraction:/usr/lib/python2.5/site-packages/OpenGL/Tk 
        /usr/share/tcltk/tcl8.4 /usr/lib /usr/local/lib/tcltk /usr/local/share/tcltk
        /usr/lib/tcltk /usr/share/tcltk /usr/share/tcltk/tcllib1.10 
        /usr/share/tcltk/tklib0.4 /usr/share/ tcltk/tk8.4

(tkcon reported that it was using Tcl8.4.19 and Tk8.4.19.)

Since the auto_path algorithm works on a directory tree, I merged
$ sudo find -type d -name tcl* with $ sudo find -type d -name tk* and
$ sudo find -type d -name vtk* (after deleting include and document 
directories, etc.):
        ./usr/lib/python3.0/tkinter
        ./usr/lib/python-support/python-vtk/python2.5/vtk
        ./usr/lib/tcl8.3
        ./usr/lib/tcl8.3/vtk
        ./usr/lib/tcl8.3/vtk/vtkinteraction
        ./usr/lib/tcl8.4
        ./usr/lib/tcl8.4/vtk
        ./usr/lib/tcl8.4/vtk/vtkinteraction
        ./usr/lib/tclX8.3
        ./usr/lib/tclX8.3/help/tcl
        ./usr/lib/tclX8.3/help/tcl/tclshell
        ./usr/lib/tk8.4
        ./usr/lib/tkX8.3
        ./usr/lib/tkX8.3/help/tk
        ./usr/lib/vtk-5.0
        ./usr/lib/vtk-5.0/tcl
        ./usr/lib/vtk-5.0/tcl/vtk
        ./usr/lib/vtk-5.0/tcl/vtkbase
        ./usr/lib/vtk-5.0/tcl/vtkcommon
        ./usr/lib/vtk-5.0/tcl/vtkfiltering
        ./usr/lib/vtk-5.0/tcl/vtkgraphics
        ./usr/lib/vtk-5.0/tcl/vtkhybrid
        ./usr/lib/vtk-5.0/tcl/vtkimaging
        ./usr/lib/vtk-5.0/tcl/vtkinteraction
        ./usr/lib/vtk-5.0/tcl/vtkio
        ./usr/lib/vtk-5.0/tcl/vtkparallel
        ./usr/lib/vtk-5.0/tcl/vtkrendering
        ./usr/lib/vtk-5.0/tcl/vtktesting
        ./usr/lib/vtk-5.0/tcl/vtkvolumerendering
        ./usr/lib/vtk-5.0/tcl/vtkwidgets
        ./usr/share/python-support/python-vtk/vtk
        ./usr/share/python-support/python-vtk/vtk/tk
        ./usr/share/tcltk/tk8.3
        ./usr/share/tcltk/tk8.4
        ./usr/share/tcltk/tk8.5
        ./usr/share/tcltk/tklib0.4
        ./usr/share/tcltk/tklib0.4/tkpiechart
        ./usr/share/vtk
        ./usr/share/vtk/Build/vtkLocal
        ./usr/share/vtk/Build/vtkMy
        ./usr/share/vtk/Build/vtkMy/Wrapping/Tcl/vtkmy
        ./usr/share/vtk/Build/vtkMy/Wrapping/Tcl/vtkmycommon
        ./usr/share/vtk/Build/vtkMy/Wrapping/Tcl/vtkmyimaging
        ./usr/share/vtk/Build/vtkMy/Wrapping/Tcl/vtkmyunsorted
        ./usr/share/vtk/GUI/Win32/vtkBorland
        ./usr/share/vtk/GUI/Win32/vtkMFC
        ./usr/share/vtk/GUI/Win32/vtkMFC/vtkDLG
        ./usr/share/vtk/GUI/Win32/vtkMFC/vtkMDI
        ./usr/share/vtk/GUI/Win32/vtkMFC/vtkSDI
        ./var/lib/python-support/python2.4/vtkPipeline
        ./var/lib/python-support/python2.5/vtk
        ./var/lib/python-support/python2.5/vtkPipeline
        ./var/lib/python-support/python2.5/vtk/tk
        ./var/lib/scrollkeeper/tk 

My newbie eyes think all versions and packages are equally available from that 
tree, given what I understand (or don't) about the way auto_path works.

The only tcl environment variables that seem like they might be vaguely
useful are:
    GTK_RC_FILES=/etc/gtk/gtkrc:/home/browerg/.gtkrc-1.2-gnome2
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:
         /usr/games
    XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/

Any help / suggestions / ... would be greatly appreciated.

Best,

George

------------------------------------------------------------------------
George D. Brower
Eastern Pennsylvania, U.S.A.

"Any sufficiently advanced technology is indistinguishable from magic."
Arthur C Clarke (1917-2008)    3d law of prediction (1973)




More information about the vtkusers mailing list