Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finding packages and TCLLIBPATH?

880 views
Skip to first unread message

Dave Kuhlman

unread,
May 6, 2004, 8:03:47 PM5/6/04
to
Where can I find documentation on how to tell Tcl where to find
libraries/packages?

I've built and installed graphviz-1.12 from source. It created
libtkspline.so and placed it in /usr/local/lib/graphviz. But when
I run the doted demo, I get the following error message:

Error in startup script: can't find package Tkspline
while executing
"package require Tkspline"
(file "./doted" line 5)

I believe that fixing this has something to do with TCLLIBPATH and
/usr/local/lib/graphviz/pkgIndex.tcl. Am I correct? But I don't
know what to do with them.

Should I be setting TCLLIBPATH:

export TCLLIBPATH=/usr/local/lib/graphviz:$TCLLIBPATH

That did not seem to help.

Here is the content of /usr/local/lib/graphviz/pkgIndex.tcl:

package ifneeded Gdtclft 1.12 "
load [file join $dir libgdtclft.so] Gdtclft"
package ifneeded Tcldot 1.12 "
load [file join $dir libtcldot.so] Tcldot"
package ifneeded Tclpathplan 1.12 "
load [file join $dir libtclplan.so] Tclpathplan"
package ifneeded Tkspline 1.12 "
package require Tk 8.3
load [file join $dir libtkspline.so] Tkspline"
# end

A number of Web searches did not bring up anything helpful.

I also looked through several Tcl tutorials, but could not find
anything that covered this.

Dave


--
Dave Kuhlman

Bryan Schofield

unread,
May 6, 2004, 10:22:24 PM5/6/04
to

progamatically you can alter the "auto_path"

lappend ::auto_path [file join / some dir that has packages]

the auto_load/auto_path man page:
http://www.tcl.tk/man/tcl8.4/TclCmd/library.htm#M24


-- bryan

SM Ryan

unread,
May 7, 2004, 5:04:42 AM5/7/04
to
Dave Kuhlman <dkuh...@rexx.com> wrote:
# Where can I find documentation on how to tell Tcl where to find
# libraries/packages?
#
# I've built and installed graphviz-1.12 from source. It created
# libtkspline.so and placed it in /usr/local/lib/graphviz. But when
# I run the doted demo, I get the following error message:
#
# Error in startup script: can't find package Tkspline
# while executing
# "package require Tkspline"
# (file "./doted" line 5)
#
# I believe that fixing this has something to do with TCLLIBPATH and
# /usr/local/lib/graphviz/pkgIndex.tcl. Am I correct? But I don't
# know what to do with them.
#
# Should I be setting TCLLIBPATH:
#
# export TCLLIBPATH=/usr/local/lib/graphviz:$TCLLIBPATH

TCLLIBPATH is a Tcl style list, not a PATH style list. You want

export TCLLIBPATH="/usr/local/lib/graphviz $TCLLIBPATH"

# tclsh
% set env(TCLLIBPATH)
~user/wyrmwif/lib ~user/wyrmwif/lib/Darwin ~user/lib
% exit
# echo $TCLLIBPATH
~user/wyrmwif/lib ~user/wyrmwif/lib/Darwin ~user/lib

--
SM Ryan http://www.rawbw.com/~wyrmwif/
JUSTICE!
Justice is dead.

Dave Kuhlman

unread,
May 7, 2004, 4:34:21 PM5/7/04
to
SM Ryan wrote:

> Dave Kuhlman <dkuh...@rexx.com> wrote:

[snip]


> #
> # Error in startup script: can't find package Tkspline
> # while executing
> # "package require Tkspline"
> # (file "./doted" line 5)
> #
> # I believe that fixing this has something to do with TCLLIBPATH

> # and


> # /usr/local/lib/graphviz/pkgIndex.tcl. Am I correct? But I don't
> # know what to do with them.
> #
> # Should I be setting TCLLIBPATH:
> #
> # export TCLLIBPATH=/usr/local/lib/graphviz:$TCLLIBPATH
>
> TCLLIBPATH is a Tcl style list, not a PATH style list. You want
>
> export TCLLIBPATH="/usr/local/lib/graphviz $TCLLIBPATH"

Thanks. That worked.

Dave

--
Dave Kuhlman
http://www.rexx.com/~dkuhlman

0 new messages