Ptolemy Windows XP Installation

Quick nt4 Installation Instructions

  1. Download and install Cygwin
    Install the gnu compiler
  2. Download Ptolemy using CVS
    cd c:/foo
    cvs -d login
    # No password needed, hit enter
    cvs -d co ptclassic
    mv ptclassic ptolemy
    cd ptolemy
    export PTOLEMY=`pwd`
    export PTARCH=`bin/ptarch`
    export PT_USE_X11_PXGRAPH=yes
    export PATH=${PTOLEMY}/bin:${PTOLEMY}/bin.xp:${PATH}
    Note that PTOLEMY should be set to /cygdrive/c/yourDirectory, not c:/yourDirectory. This will avoid problems in configure.
  3. Download gcc-2.95.3 from
    user:   ptdevel
    password: ptrules
    cd $PTOLEMY/..
    tar -xzf /tmp/pt0.7.2devel.gnu.tar.gz
    cd $PTOLEMY
    make install_gnu
  4. You may need to create a link for gcc:
    cd /usr/bin
    ln -s gcc.exe cc.exe
    and the rerun make:
    cd $PTOLEMY
    rm -rf obj.xp/gnu
    make install_gnu
  5. Problem:
    ptolemy/src/gnu/src/gcc/gcc/prefix.c:69: windows.h: No such file or directory
    I had to edit ptolemy/src/gnu/src/gcc-2.95.3/gcc/prefix.c and insert "w32api/":
    #ifdef _WIN32
  6. I had to edit ptolemy/obj.xp/gnu/gcc/gcc/Makefile and add "-I/usr/include/w32api"
    prefix.o: prefix.c $(CONFIG_H) system.h Makefile prefix.h
    	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I/usr/include/w32api \
    	-DPREFIX=\"$(prefix)\" \
    	  -c `echo $(srcdir)/prefix.c | sed 's,^\./,,'`
    and then run
    cd $PTOLEMY
    make install_gnu
  7. Download the "other.src" tar file, which includes Tcl/Tk.
    Note that we need to untar it in a separate directory and then copy the Tcl/Tk installation over.
  8. anonomous class type problem:
       -c -g -O2 -fno-implicit-templates -I.
       -nostdinc++  -fpic
       -o pic/filebuf.o
    cc1plus: warning: -fpic ignored for target (all code is position independent)
    In file included from /usr/include/sys/signal.h:107,
                     from /usr/include/signal.h:5,
                     from /usr/include/time.h:150,
                     from /usr/include/sys/stat.h:9,
                     from /cygdrive/c/cxh/src/ptolemy/src/gnu/src/gcc/libio/
    /usr/include/cygwin/signal.h:67: anonymous class type not used to declare any objects
    /usr/include/cygwin/signal.h:71: anonymous class type not used to declare any objects
    /usr/include/cygwin/signal.h:80: anonymous class type not used to declare any objects
    make[5]: *** [filebuf.o] Error 1
    make[5]: Leaving directory `/cygdrive/c/cxh/src/ptolemy/obj.xp/gnu/gcc/i686-pc-c
    make[4]: *** [all-target-libio] Error 2
    make[4]: Leaving directory `/cygdrive/c/cxh/src/ptolemy/obj.xp/gnu/gcc'
    Solution: edit ptolemy/obj.xp/gnu/gcc/i686-pc-cygwin32/libio/Makefile and add -fpermissive
    CXXINCLUDES = -I. -I$(srcdir) -I$(srcdir)/../winsup/include $(NOSTDINC) -fpermissive
    	test x"$(enable_shared)" != xyes || \
    	  $( -fpermissive $(PICFLAG) $< -o pic/$@
    	$( $<
    See also
  9. cd $PTOLEMY/..
    mkdir tmp
    cd tmp
    tar -xf /tmp/pt0.7.2devel.other.src.tar.gz 
    cd ptolemy/src/tcltk
    mv tcl8.0.5pt $PTOLEMY/src/tcltk/tcl/8.0.5
    mv tk8.0.5pt $PTOLEMY/src/tcltk/tk8.0.5
  10. Download and install X11 development libraries and headers by running the Cygwin setup program.
  11. Do some setup, creating $PTOLEMY/obj.xp and creating makefiles from make.template
    cd $PTOLEMY
    make makefiles
    cd octtools
    make makefiles
  12. Run the builds
    make ntbuild
    This rule build tcltk, octtools and Ptolemy Classic
See also The Ptolemy Window NT Installation page
Copyright © 2005 The Regents of the University of California. All rights reserved.
Last updated: $Date: 2005/08/25 01:47:43 $ comments to: cxh at eecs