Main Content

Installing Tcl and Expect on Solaris 10 - a checklist

Archive - Originally posted on "The Horse's Mouth" - 2007-05-02 15:36:41 - Graham Ellis

Hot off the presses from the last couple of days - a check list (and a couple of "Gotcha" notes) concerning the installation of Tcl and Expect on a Solaris 10 system, compiling from scratch were possible.

You'll need a C Compiler

We used gcc (the Gnu C compiler) and we installed it from Sun standard packages - you can't compile the C compiler yourself, of course, in the first instance as you need a working compiler to do it ...

The following three packages are needed:

SUNWgccruntime
SUNWgcc
SUNWbinutilities

For the following operations:

a) add /usr/sfw/bin, /usr/local/bin and /usr/ccs/bin to your path, and export
b) set the CC environment variable to the value gcc and export it.

Installing Tcl

1. From a .tar.gz download ... ungzip and untar, cd to the directory created and the unix subdirectory therein.

2. Run ./configure which works out HOW the build should be done

3. Run make which does the build in the work directory

4. Run make test to check that the build worked

(at this point you need to become root, and get back to the same directory)

5. Run make install to install the Tcl program in place (you'll find it as /usr/local/bin/tclsh8.4

(at this point revert to ordinary user

Installing Expect

1. From a .tar.gz download ... unzip, unta, cd to the directory created.

2. Run ./configure --with-tcl=/xxx/yyy/tclzzz/unix - that path is tha path to the copy level of the Tcl build wherever you put that - the directory that contains the Tcl Configuration file.

3. Run make expect which does the build of expect in the work directory

(at this point you need to become root, and get back to the same directory)

4. Run make install to install the expect program in place (you'll find it as /usr/local/bin/expect

(at this point revert to ordinary user

Notes

1. If the make test reports network / socket errors and you're not properly network connected, that's not a problem.

2. Our sample build did NOT include the Tk GUI toolkit. Warnings generated during the build of Expect telling us it could not build expectk could be ignored.

3. If you get error messages from /usr/ccs/bin/as they you haven't installed the SUNWbinutilities properly, or your PATH is in the wrong order.

4. If you're using Tcl version 8.5a6 and you get fatal error messages about TCL_REG_BOSONLY build, you have a version of Expect that's not compatible directly with that Tcl, in which various elements were moved around include files. Best solution (as I write) is to step back 1 level with the Tcl.

5. My sample notes used Tcl 8.4.14 and Expect 5.42 on a "recent" Solaris 10 (built No. 0106).

6. Installs are all to default /usr/local/bin directory. Options at ./configure time allow you to change this.