Version 13 of tcl_pkgPath

Updated 2007-08-24 11:26:03 by LV

This (platform-specific) variable holds a list of directories that are used by package installers to add to certain other directories to determine where the default package system of Tcl is looking for packages.

See Magic names, tclvars, Tcl syntax help for more on variables used by Tcl.


Is this variable obsolete? My 8.4.5 tclsh & wish interps on windows tell me:

 can't read "tcl_pkgPath": no such variable

The teki installer supplied with the winico distribution seems to expect this variable to exist.


The variable was removed from the Windows port of Tcl only, several releases ago. (Bad idea, if you ask me, but they didn't ask at the time).

See Tcl Bug 1072603.

The "teki installer" you have is apparently not up to date.


escargo 22 Aug 2005 - This variable is also missing from the Cygwin port. Any notion of what is being used to find packages instead?

Um, Cygwin is Windows, so we repeat ourselves, there's no tcl_pkgPath variable there.

Even on systems where a tcl_pkgPath variable exists, it is not used to "find packages". Rather, its only legitimate use is to direct package installers where (the default package system of) Tcl is looking for packages. If you're not writing a package installer script, just pretend the tcl_pkgPath variable does not exist.

escargo - Cygwin runs on Windows, but it is certainly not an identical environment to Windows.

I think after I ran into this I found more info at auto_path, which does work for finding packages on Cygwin.


Gyus, Cygwin is of course different environment than Windows and Windows is only a base platform for Cygwin. This is only such a thing that there is no Cygwin version of Tcl interpreter and the Windows version (with some slight changes like honoring Cygwin paths) is used instead. That's why the officially distributed tcl package on Cygwin behaves the same as on Windows (try, for example pwd and see the result).

Honestly, I don't know why. I succeeded to compile a native-Cygwin version of tclsh8.5. Maybe there were problems with other packages, like Tk.


LV 2007 Aug 24 So, if that is the case, perhaps library(n) should be updated to not indicate that this variable is used in the creation of the value of auto_path? And perhaps tclvars(n) should be updated to indicate the intent that it should only be used to locate Tcl's packages themselves? And maybe a warning in pkg_mkIndex(n) that the variable isn't intended to be used by non-package installers? Note that this variable is also mentioned in msgcat's man page.


Category Dev. Tools | GSoC2007 Tcl/Tk Application