DejaGnu: proc "tclPkgUnknown ..." does not exist

From FVue
Jump to: navigation, search

Problem

When I try to include a tcl package, e.g. `textutil::string':

package require textutil::string

DejaGnu gives an error:

ERROR: (DejaGnu) proc "tclPkgUnknown textutil::string {}" does not exist.

Cause

DejaGnu overwrites `unknown()', the function that is called to attempt autoloading.

Workaround

Re-install the `unknown' procedure by re-sourcing `init.tcl':

source [file join [info library] init.tcl]

A good location for this would be the `tool' init file (lib/<tool>.exp).

See also

Tcl Built-In Commands - library manual page
Manual page offering the command to source `init.tcl'
Tcl Reference Manual: unknown
Re: (DejaGnu) tcl autoloader broken by runtest?
Rob Savoye answering problem, Jan 2002.

Comments

blog comments powered by Disqus