I’m trying to run gpsfeed+ to test an app I’m writing, and when running gpsfeed+.tcl, I get a
Error in startup script: can't find package udp
while executing
"package req udp"
(file "gpsfeed+.tcl" line 738)
There seem to be no instructions/help available for downloading and installing the udp package..
Does anyone have a straight-forward method for adding this package to tcl?
(I’m on osx 10.6.7, and have tcl8.5 installed in /opt/local/lib/tcl8.5/)
Thanks
EDIT: Solution (Thanks, Donal)
- I downloaded ActiveTcl, and installed it (Double-click).
- ActiveTcl installs
teacup, which should be updated:sudo teacup update-self -
sudo teacup install udpfound and installed the udp packageResolving udp … [package udp 1.0.9 macosx10.5-i386-x86_64 @ http://teapot.activestate.com]
Resolving Tcl 8.4 -is package … [package Tcl 8.5.9 _ … Installed outside repository, probing dependencies]
Retrieving package udp 1.0.9 macosx10.5-i386-x86_64 …@ http://teapot.activestate.com … Ok
Installing into /Library/Tcl/teapot
Installing package udp 1.0.9 macosx10.5-i386-x86_64 -
Now, either changing the path for the ActiveTcl tclsh version, or running it explicitly
/usr/local/bin/tclsh8.5 gpsfeed+.tclworks, and the udp library is found.
Now, all I need is someone to rewrite it to be legible! 😉
I use ActiveTcl on OSX. While I can’t remember if the
udppackage is part of the default download or if you have to useteacup updateto pull it in after installation, I know that ActiveState most certainly distribute the package for use with their distribution.If you’re building directly, the TclUDP Wiki page points to where to get the source code from as well as how to use it (if you need that). The directory where you install the package needs to be on the list of places in the
auto_pathglobal variable. Either pick the installation location from a place already listed on that path in your installation of Tcl, orlappendthe location where you put TclUDP at the start of the script. Thegpsfeed+code might have some code to allow you to specify package installation locations without editing its code, but I don’t know it so I can’t say for sure without quite a bit more research.