Installing Tcl/Tk 8.0, BLT 2.4 and Tix 4.1 Pre-built

There are a few prebuilt versions of these codes available on the 'net where the packages are appropriately configured to load with the "package require" command. One place to look is the  "Tcl Blast!" CD-ROM which has a number packages (but not Tix). [This is one reason that I try to program so that Tix is optional in all my codes.]

For the Silicon Graphics, I have built these packages (using Irix 6.5) and stuck the files into a single tar file that should make installation easy:
 

SGI Installation:


Building Tcl/Tk 8.0, BLT 2.4 and Tix 4.1

The Tcl/Tk package as well as the add-on packages BLT and Tix can be built from their source code distributions relatively quickly (less than an hour, excluding download times). The only requirement is a working C compiler.

1. Files to Download

Make a directory where you want to build Tcl/Tk. This can be anywhere. Download the source distributions below:

2. Build and Install Tcl/Tk

I am assuming that you already have the GNU gunzip program on your system. Note that you should use the same value for --prefix on all of the ./configure commands in this section so that the packages are installed in the same locations. For LINUX systems, I typically use --prefix=/usr so that the Tcl/Tk files overwrite the ones installed with the LINUX distribution, but with an SGI or other computer, I don't like to modify system directories so I tend to use --prefix=/usr/local. If you don't have root access, you can install in some other location, for example, --prefix=/usr/mytcltk.

In the examples below, I have downloaded the files in section 1. to /tmp/ and I am building the source in  /usr/tcltk and will install the files in /usr/local/nist98

2.1 Tcl

cd /usr/temp/tcltk
gunzip < /tmp/tcl8.0.3.tar.gz | tar xvf -
cd tcl8.0.3/unix
./configure --prefix=/usr/local/nist98
make
make install

2.2 Tk

cd /usr/temp/tcltk
gunzip < tk8.0p2.tar.gz | tar xvf -
cd tk8.0.3/unix
./configure --prefix=/usr/local/nist98
make
make install

2.3 Tix

cd /usr/temp/tcltk
ln -s tcl8.0.3/ tcl8.0
ln -s tk8.0.3/ tk8.0
gunzip < /tmp/Tix4.1.0.006.tar.gz  | tar xvf -
cd  Tix4.1.0/unix
./configure --prefix=/usr/local/nist98 --enable-shared
make
cd tk8.0/
./configure --prefix=/usr/local/nist98 --enable-shared
make
cd ..
make install
cd ../..


SGI notes: I needed 3 changes: add 2 casts to generic/tixHList.c and generic/tixOption.c and remove -32 from unix/tk8.0/Makefile
*** Tix4.1.0/generic/tixHList.c Mon Oct 19 15:40:29 1998
--- Tix4.1.0/generic/tixHList.c~        Thu Jun 26 22:10:45 1997
***************
*** 1349,1355 ****
        if (wPtr->elmToSee) {
            ckfree(wPtr->elmToSee);
        }
!       wPtr->elmToSee = (char *) strdup(argv[0]);
        return TCL_OK;
      } else {
        Tix_HLSeeElement(wPtr, chPtr, 1);
--- 1349,1355 ----
        if (wPtr->elmToSee) {
            ckfree(wPtr->elmToSee);
        }
!       wPtr->elmToSee = strdup(argv[0]);
        return TCL_OK;
      } else {
        Tix_HLSeeElement(wPtr, chPtr, 1);
*** Tix4.1.0/generic/tixOption.c        Mon Oct 19 15:39:08 1998
--- Tix4.1.0/generic/tixOption.c~       Fri Jan 17 22:57:31 1997
***************
*** 315,321 ****
            code = TCL_ERROR;
            goto done;
        } else {
!           newValue = value = (char *) strdup(interp->result);
        }
      }
  
--- 315,321 ----
            code = TCL_ERROR;
            goto done;
        } else {
!           newValue = value = strdup(interp->result);
        }
      }
*** Tix4.1.0/unix/tk8.0/Makefile        Mon Oct 19 15:43:16 1998
--- Tix4.1.0/unix/tk8.0/Makefile~       Mon Oct 19 15:32:01 1998
***************
*** 92,98 ****
  CC             = cc
  
  SHLIB_CFLAGS   = 
! SHLIB_LD       = ld -shared -rdata_shared -rpath /usr/local/lib
  SHLIB_SUFFIX   = .so
  SHLIB_VERSION  = 
  TIX_SHLIB_CFLAGS = 
--- 92,98 ----
  CC             = cc
  
  SHLIB_CFLAGS   = 
! SHLIB_LD       = ld -32 -shared -rdata_shared -rpath /usr/local/lib
  SHLIB_SUFFIX   = .so
  SHLIB_VERSION  = 
  TIX_SHLIB_CFLAGS =


2.4 BLT

cd /usr/temp/tcltk
gunzip < /tmp/BLT2.4g.tar.gz | tar xvf -
cd  blt2.4g/
./configure --prefix=/usr --enable-shared
make
cd src/shared/
make
cd ../..
make install
cd ..


SGI notes: I needed to change the ld command in shared/Makefile to remove -32
*** Makefile    Mon Oct 19 17:42:16 1998
--- Makefile~   Mon Oct 19 15:47:56 1998
***************
*** 16,22 ****
  DEF_BLTINIT   = -DBLT_LIBRARY=\"$(scriptdir)\"
  SHLIB_LD_FLAGS        =  
  SHLIB_LD_LIBS         =  
! SHLIB_LD      = ld -shared -rdata_shared -rpath /usr/local/lib
  
  prefix          = /usr/local/nist98
  exec_prefix     = /usr/local/nist98
--- 16,22 ----
  DEF_BLTINIT   = -DBLT_LIBRARY=\"$(scriptdir)\"
  SHLIB_LD_FLAGS        =  
  SHLIB_LD_LIBS         =  
! SHLIB_LD      = ld -32 -shared -rdata_shared -rpath /usr/local/lib
  
  prefix          = /usr/local/nist98
  exec_prefix     = /usr/local/nist98
Also, I replaced the pkgIndex.tcl file:
% cat  pkgIndex.tcl
# Tcl package index file, version 1.0
package ifneeded BLT 2.4 [list tclPkgSetup $dir BLT 2.4 {
    {../libBLT.so.2 load {blt::barchart blt::beep blt::bgexec \
            blt::bitmap blt::bltdebug blt::busy blt::cutbuffer \
            blt::drag&drop blt::graph blt::htext blt::spline \
            blt::stripchart blt::table blt::vector blt::watch \
            blt::winop}} {
        bltGraph.tcl source {Blt_ActiveLegend Blt_ClosestPoint Blt_Crosshairs \
                Blt_PrintKey Blt_ZoomStack \
                blt::ActiveLegend blt::ClosestPoint blt::Crosshairs \
                blt::PrintKey blt::ZoomStack}}}]



Neither the author nor the U.S. Government makes any warranty, expressed or implied, or assumes any liability or responsibility for the use of this information or the software described here. Brand names cited here are used for identification purposes and do not consitute an endorsement by NIST.

Comments, corrections or questions: [email protected]