Thanks, Maurice, for working on this when you expected to be free of Plplot
for a while. (Actually, I hoped to be free of PLplot myself for the last 6
weeks or so, but curiosity about what is happening keeps bringing me
Unfortunately, there are still some tcl/tk problems on my system for the
installed version of PLplot. I believe this is something that does not
necessarily need to be addressed right away, but let me make my comments now
while my recent experience is fresh in my mind.
I removed the installed version (prefix of /usr/local/plplot) and then
reinstalled to that same location using the latest CVS version of plplot.
On my system tcl/tk is not smart enough to pick up the prefix
(/usr/local/plplot in my case) from either auto_path or from the current
directory. (I mention the current directory only to tell you that trying to
execute the examples from the installed examples location does not work. In
any case, I want an installed system where I can copy the examples anywhere
and execute them with tcl/tk able to find everything it needs.)
To get around this limitation I set the environment variable PL_LIBRARY to
/usr/local/plplot/lib/plplot5.1.0. Then the tclsh recipe below works
fine with tcl examples copied to any directory. However, the wish recipe
for tkdemos.tcl pooped out with the following error message:
% lappend auto_path /usr/local/plplplot/lib/plplot5.1.0
% package require Pltk
% source tkdemos.tcl
invalid command name "plstdwin"
During the course of my testing I also found a different problem with the
installed version. (In this case I had copied the installed examples to
/tmp, but the same problem occurred if I used the installed examples in
./x01c -dev tk
TCL command "plclient_init" failed:
invalid command name "plclient_init"
TCL command "plclient_link_end" failed:
invalid command name "plclient_link_end"
Not that long ago the tk device worked fine for installed Plplot, but I
don't know what recent change is the culprit.
We have been fighting this "installed tcl/tk" problem for months. At my
instigation Vince hacked PLPLOT_EXTENDED_SEARCH into tclAPI.c to try and
beat the system to use a subdirectory tcl, but in retrospect I think this
was a mistake. Instead, I think we should just install all the tcl scripts
right in a single directory where tcl/tk normally expects to find them.
I checked on my Debian system for the location of pkgIndex.tcl files.
locate pkgIndex.tcl |grep '^/usr/lib'
So at first glance it seems there is a choice between making the install
location a subdirectory of /usr/lib or of /usr/lib/tcl8.3. However, a
further check indicates the latter directories are all part of tcl8.3 and
not "foreign" packages so I concur with Maurice's recent decision to install
our pkgIndex.tcl in $prefix/lib/plplot5.1.0. But I suggest we might want to
go further and create a new directory called $prefix/lib/pltcl5.1.0 and put
our pkgIndex.tcl and everything currently in $prefix/lib/plplot5.1.0/tcl in
there just to reduce the unaesthetic clutter in $prefix/lib/pltcl5.1.0 of
a mixture of tcl files and non-tcl subdirectories.
I don't care that strongly if we install our tcl/tk-related stuff in
$prefix/lib/tcl8.3/plplot5.1.0 or $prefix/lib/plplot5.1.0 or
$prefix/lib/pltcl5.1.0, but I think we should make the choice consistently
for all our tcl/tk related files and thus get rid of the tcl subdirectory in
the install location. If we also drop the tcl subdirectory that was hacked
into tclAPI.c, I suspect our current tcl/tk PLplot install troubles might be
reduced or eliminated.
Maurice is presently out of time and so am I so if somebody with time on his
hands (heh) wants to take over now and fix this tcl/tk PLplot install
problem for Linux with the install location of his choice, that would be
phone: 250-727-2902 FAX: 250-721-7715
Dr. Alan W. Irwin
Department of Physics and Astronomy,
University of Victoria, P.O. Box 3055,
Victoria, British Columbia, Canada, V8W 3P6
On Wed, 25 Sep 2002, Maurice LeBrun wrote:
> The changes I've just committed enable easy loading of all three kinds, from
> both the tmp/ dir and the install tree. I've given the prescription for the
> tmp/ dir only; in the install tree you must:
> - change the auto_path setting appropriately (or use a tclsh/wish
> under the same $prefix)
> - first cd to the appropriate examples/xxx dir.
> Under plplot/tmp/:
> lappend auto_path .
> package require Pltcl
> source tcldemos.tcl
> lappend auto_path .
> package require Pltk
> source tkdemos.tcl
> lappend auto_path .
> package require Plplotter
> source runAllDemos.tcl
> <control from gui>