Ptolemy NT Installation

The Ptolemy NT Installation is more tricky than it should be, we hope to fix this soon.

nt4 Installation Instructions

  1. Download Cygnus GNU-win32 from ftp://ftp.cygnus.com/pub/gnu-win32/latest. In that directory, download README.txt and cdk.exe(13.7Mb)
  2. Install Cygnus GNU-win32 by mousing on the cdk.exe icon. Be sure to update your path and the other variables mentioned in the Cygnus README.txt.
  3. Be sure to do mkdir /tmp
  4. Part of the GNU-win32 installation includes setting up /bin/sh.exe for use from make:
    mkdir /bin
    cp /Cygnus/B19/H-i386-cygwin32/bin/sh.exe /bin
    
    Since the Xgraph stars and various scripts use /bin/rm you should also do:
    cp /Cygnus/B19/H-i386-cygwin32/bin/rm.exe /bin
    
  5. Install 19.1 from: ftp://go.cygnus.com/pub/ftp.cygnus.com/gnu-win32/latest/b19.1-update/. The installation is fairly straightforward - exit all programs that use Cygwin32 and substitute in the new libcygwinb19.dll.
  6. Install egcs-1.0.2 from: http://www.xraylith.wisc.edu/~khan/software/gnu-win32/egcs.html This installation involves removing the include/g++ directory and untarring two tar files.
  7. Download Pre-compiled X11R6.3 Libraries/Clients For GNU Win32 B19 .
  8. Install X11R6.3:
    mkdir /usr
    cd /usr
    tar -zxf b19_X11R6_3.tar.gz
    mkdir /etc
    cp /usr/X11R6.3/etc/termcap /etc
    
    /etc/termcap is necessary for xterm, which can be used by pigi -debug.
  9. Install an X server. The Pre-compiled X11R6.3 Libraries/Clients For GNU Win32 B19 page has some pointers to freely available X servers. Locally we use Hummingbird's Exceed, which is a commercial X server package.
  10. Add c:\usr\X11R6.3\bin to your path by using the System control panel.
  11. Verify that the X installation is working by starting up an X server setting your DISPLAY:
    DISPLAY=localhost:0.0
    
    and then running /usr/X11R6.3/bin/xclock.
  12. To use the Java version of pxgraph, download JDK1.1. The JDK should be installed in c:/jdk1.1.n and you will need to update your path.
    For a prebuilt X11 pxgraph binary, see: ftp://ptolemy.eecs.berkeley.edu/pub/misc/pxgraph/index.html

Building Ptolemy

  1. If you have not yet done so, download the Ptolemy src tar file and ungzip and untar the files
    tar -ztvf pt0.7.1.src.tar.gz
    tar -ztvf pt0.7.1.other.src.tar.gz
    
  2. Building Itcl, Octtools and Ptolemy will require about 400Mb of space for the sources, build directories and installation directories. To save space, you can build and install Itcl and Octtools separately and then do
    rm -rf $PTOLEMY/obj.nt4/tcltk $PTOLEMY/obj.nt4/octtools
    
  3. Set up your environment by setting the variables below. In the Start menu, select Settings, then Control Panels, then System, then select the Environment tab
    PTARCH nt4
    PTOLEMY /users/ptolemy
    CC gcc
    
    Set your PATH to include
    $PTOLEMY/bin:$PTOLEMY/bin.nt4
    
  4. If you have Samba setup, then start up bash and cd to the tree with something like:
    mkdir /users/ptolemy
    mount //UnixHost/ptolemy /users/ptolemy
    cd $PTOLEMY
    

    Now you have three ways to get to the sources using Samba:

    1. Mount a Ptolemy tree located on Unix machine with the Run Start menu choice.
    2. cd to the UNC, such as cd //carson/ptdesign
    3. cd to the Cygwin mount point: cd /users/ptolemy
    Note that there are two ways to run Tycho, via the native Windows itkwish or via the Cygwin32 itkwish. The Windows itkwish does not understand Cygwin32 mount points, but the Cygwin32 version does.

    Note that you can set PTOLEMY to the raw UNC format //UnixHost/ptolemy, but if you do, you will have problems with configuring Itcl. Instead use the mount command as above.

  5. Building Itcl2.2:
  6. The Itcl2.2 sources included in the Ptolemy other.src file have a few modifications necessary for building under NT with Cygwin32. Download that tar file and untar it.
  7. In the System control panel, set the CC environment variable to gcc. If you don't then you will get errors while configuring.
  8. Run
     cd $PTOLEMY/src/tcltk/itcl2.2
     configure --enable-gcc --disable-load --host=i586-CYGWIN32-NT40
     make
     make install
     
    Below are the changes that were made for Itcl2.2:
  9. If tclEnv.c fails to compile with messages about environ, then edit tcl7.6/generic/tclPort.h. Change:
    #if defined(__WIN32__) || defined(_WIN32)
     
    to
    #if (defined(__WIN32__) || defined(_WIN32)) && !defined(__CYGWIN32__)
     
    The above change also needs to be made to tk4.2/generic/tkPort.h and tk4.2/generic/default.h
  10. tclUnixTime.c fails to compile with messages about timezone.
    My fix was to edit tcl7.6/unix/Makefile and change -DHAVE_TIMEZONE_VAR to -DHAVE_GETTIMEOFDAY. The real fix was to modify configure.in so that we run the timezone code instead of just compiling it.
  11. Messages at link time about multiple definitions of -lc
    Fixed by editing tcl7.6/unix/Makefile and commenting out -lc
  12. unix/tclUnixFCmd.c: mkinfo() does not exist.
        if (/*mkfifo(dst, srcStatBuf.st_mode)*/ -1 < 0) {
     
  13. unix/tclUnixNotfy.c: fix to MaskEmpty The problem was that typing R to run a Universe never brought up the Run Control panel. Jan Nijtmans posted a patch to comp.lang.tcl on 12/18/1996.

Up to the Ptolemy under NT page - Back to Ptolemy NT Installation
Copyright © 1997-1998, The Regents of the University of California. All rights reserved.
Last updated: 05/28/98, comments to: cxh@eecs.berkeley.edu