Re: What's going on ...? (compiling on Solaris 2,3)

From: Hilmar Lapp <hili_at_al-bundy.biologie.uni-freiburg.de>
Date: Wed, 15 Feb 1995 18:54:12 +0000

On -1 xxx -1, it was written:

> Hi stk'ers,
>
> It may be silly questions, but here they go....
>
> This is a problem with the two last versions of STk. Once compiled and
> installed, I can't run correctly a stk or stklos program.
>
> For example: hello program doesn't run when invoked like this...
>
> $ ./hello.stk
> ./hello.stk[2]" syntax error at line 2 : `;;' unexpected
>
> But it goes well when ran by : stk -f hello.stk !
>
> [... stuff deleted ...]
>
> ============================================================================
> __ __ ___ __ | Jose L. Marcos - Logiciels Systemes
> / / \ /___\ /___ | (CT.TI.MIS.LS)
> \____| | \__________/ | CNES - 18, av. Edouard Belin
> | 31055 Toulouse Cedex (FRANCE)
> Centre National |
> d'Etudes Spatiales | E-Mail: marcos_at_sc2000.cnes.fr
> (French Space Agency) | Phone : (33) 61-27-41-13

Jose,

I'm facing some similar symptoms on my Linux (1.1.18) machine:

al-bundy: ~ 17:20 11>/usr/local/lib/stk/2.1.5/demos/browse.stk
A: Command not found.
This: Command not found.
directory: Command not found.
double-clicking.: Command not found.
This: Command not found.
Author:: Too many arguments.
al-bundy: ~ 17:20 12>

If I call stk with this script as input ("stk -f ..."), everything will
work fine. The first lines look like they should do:

#!/usr/local/bin/stk -f
;;;;
;;;; A simple STk browser

In the meantime I've found out, that this is due to the shell I use: if
I use bash instead of tcsh, calling the script will work just fine:

bash$ /usr/local/lib/stk/2.1.5/demos/browse.stk
bash$

Don't ask me for the reason for this weird behaviour, it's kind of a
mystery to me.

However, while going through the Tk-demo program widget.stk I discovered
some other strange things: if I select "scrollable canvas" in the
"Canvas" menu, I will get an error:

bash$ cd $HOME
bash$ /usr/local/lib/stk/2.1.5/demos/widget.stk

*** Error:
bad screen distance ""
**** Tk error ("") ""

Seems like this happens during setup of the canvas-widget and its items;
when ready for dialog, the canvas appears partly incomplete and doesn't
do anything in response to mouse movement over the items. _All_ other
items of the demo work (should say: seem to work in my view).

However, if I make a slight modification, everything will work:

bash$ cd /usr/local/lib/stk/2.1.5/demos
bash$ widget.stk

I've appended the contents of /usr/local/bin/stk. Looks like it should
do, I think.

I would like to hear of anybody, who has faced these problems too.
Perhaps there's someone who could make some comments or even found out
the reason(s). In fact, it's not that important _now_ :-] (most things _do_
work, and most of the time STk turns out to be a great thing :-] ).

yours

        Hilmar

-----------------------------------------------------------------------------
Hilmar Lapp e-mail: hlapp_at_deep-thought.biologie.uni-freiburg.de
Institut f. Biologie II http://www.biologie.uni-freiburg.de/~hili/hili.html
Universitaet Freiburg phone : +49 761 203 2656
-----------------------------------------------------------------------------

bash$ cat /usr/local/bin/stk
#!/bin/sh
# STk launcher

# determine the kind of the machine which is running this script
machine=`uname -s`-`uname -r | cut -d. -f1,2`-`uname -m`

STK_LIBRARY=/usr/local/lib/stk/2.1.5
export STK_LIBRARY

#
# Launch Snow rather than STk if the variable DISPLAY is not set.
#
if [ "$DISPLAY" = "" ] ;then
  exec $STK_LIBRARY/$machine/snow-bin $*
else
  exec $STK_LIBRARY/$machine/stk-bin -name stk $*
fi



bash$
Received on Wed Feb 15 1995 - 18:48:21 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST