$PTOLEMY/doc/html/install
.Ptolemy is distributed in several forms:
http://ptolemy.eecs.berkeley.edu/ptolemyclassic
. The
list of contributed binaries varies, but usually includes Linux, AIX
and DEC Alpha.
$PTOLEMY
to locate the Ptolemy distribution. If you are rebuilding Ptolemy from sources without using any prebuilt Ptolemy binaries, then you can set $PTOLEMY
to any location. If you are using prebuilt binaries, then there are a few issues concerning exactly to what value $PTOLEMY
is set. The issues occur because certain facilities, such as shared libraries, the Gnu compiler and Tcl/Tk save certain pathnames at build time. If at run time, certain files cannot be found that were present at build time, then there will be various failures.The Ptolemy binaries that we distribute were built with
$PTOLEMY
equal to/users/ptolemy
. If you can create a symbolic link from /users/ptolemy
to your Ptolemy distribution, then you may find using the prebuilt binaries easier. If you cannot create a link and are using prebuilt binaries, then be aware of the following points:
PTOLEMY
environment variable to the location of the distribution. For example, if your Ptolemy distribution was in /usr/local/ptolemy
, then under C shell (/bin/csh
), you would type setenv PTOLEMY /usr/local/ptolemy
.
$PTOLEMY
equal to /users/ptolemy
, but your Ptolemy distribution is not at /users/ptolemy
, then you may need to set LD_LIBRARY_PATH
or SHLIB_PATH
so that the binaries can find the appropriate shared libraries at run time. The pigi
script will attempt to properly set LD_LIBRARY_PATH
if it is not already set, but the pigi
script is easily fooled. See $PTOLEMY/.cshrc
for sample C shell commands that set the appropriate variable. See also
"pigi fails to start up, giving shared library messages" on page A-17, and
"Shared Libraries" on page D-1.
/users/ptolemy
, then you will need to set some additional environment variables, see
"Gnu Installation" on page A-7 for more information.
/users/ptolemy
, then the tycho
command may fail for you. For a workaround, see
"tycho fails to start up, giving TCL_LIBRARY messages" on page A-18.
pt-0.7.src.tar.gz
and pt-0.7.sol2.5.tar.gz
: 135 Megabytes
pt-0.7.src.tar.gz
and pt-0.7.sol2.5.tar.gz
if you remake (optional): approximately 168 Megabytes
pt-0.7.src.tar.gz
, pt-0.7.other.src.tar.gz
and pt-0.7.gnu.tar.gz
: under Solaris 2.5.1: 400 Megabytes
Important Note:
Although we distribute binaries, you must also install the source tree in pt-0.7.src.tar.gz
. Installing this src directory is not optional. The src
directory contains the Ptolemy source code, but it also contains the icons and interpreted Tcl code used in the user interface. If you absolutely must discard the source code, you can remove all files under src
with extensions .cc
, .h
, or .c
. For more information, see
"Freeing up Disk Space" on page A-14.
A.4.3 The ptolemy user
The preferred way to install Ptolemy involves creating a fictitious user with the userid ptolemy
, together with a home directory for the ptolemy
user. Using the binaries is easier if the ptolemy
user's home directory is /users/ptolemy
. Once the ptolemy
user account has been created, log in or su
to user ptolemy
. If you do not wish to create a user called ptolemy
, see below for an alternative.A.4.4 Installation without creating a ptolemy user
The preferred installation technique, as indicated above, is to create a user called ptolemy
. The reason for this is that running Ptolemy requires an appropriate user configuration. At minimum, the user's path must be set up properly. The ptolemy
user is also configured to run an X window manager (twm
) with suitable X resources that are known to work well. In troubleshooting an installation, having the ptolemy
user properly configured can be very valuable. PTOLEMY
environment variable to point to the root directory of Ptolemy. The installation is the same as below, except that ~ptolemy
is replaced with $PTOLEMY
.A.4.5 Obtaining Ptolemy
Ptolemy is available via the Ptolemy Web site at http://ptolemy.eecs.berkeley.edu
. The Ptolemy releases can be found under the Releases
link. The Ptolemy release can also be found on the Ptolemy ftp site at http://ptolemy.eecs.berkeley.edu/
follow the instructions in the README
file, and be sure to download in binary mode. Untarring the distribution
Go to the directory where you either saved the downloaded *.tar.gz
files. These files have been compressed with the Gnu gzip
program, a compression program from the Free Software Foundation. In order to uncompress the files, you need the program gzcat.
The gzcat
program is available via anonymous FTP from http://ptolemy.eecs.berkeley.edu/ptolemyclassic/gnu/src/
. Now proceed as follows:
gzcat pt-0.7.doc.tar.gz | ( cd ~ptolemy/..; tar xf - )
ptolemy
user, and then creates all of the documentation files.
gzcat pt-0.7.src.tar.gz | ( cd ~ptolemy/..; tar xf - )
src
tar file and creates the source files. You must not skip this step. Ptolemy depends on these files being present. Note that you may get a few warning messages during this and the following step about the tar program not being able to create some directories because they already exist. This is expected (the same directory is mentioned in several of the tar files), so you need not worry.
gzcat pt-0.7.sun4.tar.gz | ( cd ~ptolemy/..; tar xf - )
(If you are running SunOS4.1.3 /bin/tar
, and you see messages about tar: read error: unexpected EOF
then see "EOF messages while using tar on Suns" on page A-23)gzcat pt-0.7.hppa.tar.gz | ( cd ~ptolemy/..; tar xf - )
If you are running the Solaris2.5.1 version:gzcat pt-0.7.sol2.5.tar.gz | ( cd ~ptolemy/..; tar xf - )
If you are running another platform for which a binary has been provided:gzcat pt-0.7.
platform.tar.gz | \
( cd ~ptolemy/..; tar xf - )
This uncompresses the binaries and creates the executable files. Note that is possible to install binaries for multiple platforms on the same file system because different directories are used for each set of binaries. Just execute whichever of the above commands apply.
gzcat pt-0.7.other.src.tar.gz| \
(cd ~ptolemy/..; tar xf - )
The other.src
tar file includes sources to a subset of Octtools
(including vem
), Tcl/Tk
and xv
. If you wish to rebuild Ptolemy completely from source, then you will need this tar file. Alternatively, you may be able to use the Octtools libraries from a binary tar file.pt-0.7.oct.src.tar.gz
instead of pt-0.7.other.src.tar.gz
. Note that this file has not been extensively tested. For more information, see
"Ptolemy and Tcl/Tk" on page A-13
*.tar.gz
files that your got from the Web site or the tape. Remember to delete these files to free up disk space.
xv
is used by some of the image processing demos. If you already have a version of xv
, or you don't plan on doing any image processing, you can also remove the xv
binary in $PTOLEMY/bin.$PTARCH/xv
.
In order for all utilities included with this distribution to work under OpenWindows 2, you must install the shared libraries for the Athena widgets (the freely redistributable widget set from the MIT X11 distribution), which are provided with this distribution under the
$PTOLEMY/athena.sun4
directory. To install them, become root and copy all files in that directory into /usr/openwin/lib
(or, if you have installed OpenWindows in a non-standard place, into $OPENWINHOME/lib
). If you do not wish to do this, you could leave them in place and have every Ptolemy user change their LD_LIBRARY_PATH
environment variable to search ~ptolemy/athena.sun4
before /usr/openwin/lib
. Consult the Unix manual entry for the ld
program to learn more about LD_LIBRARY_PATH
. After installation, the
$PTOLEMY
directory will contain several scripts for starting up X11R6 (Xrun), OpenWindows with olwm (Xrun.ow), or OpenWindows with twm (Xrun.ow.twm).If only have OpenWindows, and not X11R5 or X11R6 and you plan on rebuilding from source, you may need the libraries in
athena.sun4
. athena.sun4
is part of the pt-0.7.sun4.tar.gz
tar file.
It is also possible to build Ptolemy with other, non-Gnu C++ compilers, such as SunSoft's C++ compiler. We have built this release of Ptolemy with the following compilers:
sol2.5.cfront
hppa.cfront
irix5.cfront
).We do not distribute these non-Gnu C++ binaries. If you choose to use a non-Gnu C++ compiler, you must completely rebuild Ptolemy. The libraries in the tar files were produced by the Gnu C++ compiler and are not interoperable with code from other compilers. When you completely rebuild Ptolemy, you must be sure to first remove all previously compiled object files. Note that to compile Ptolemy with a non-Gnu C++ compiler, you will still need to use Gnu make.
Ptolemy 0.7 was built with gcc-2.7.2.2 and libg++-2.7.2. Note that Ptolemy uses the gcc and libg++ shared libraries, if you are using your own version of gcc and libg++, it must have been configured with --enable-shared. For further information, see "Can I use my own version of gcc and libg++?" on page A-28.
The Gnu compiler is dependent upon where it was built. The executable that we supply assumes that the compiler is installed in a directory called
/users/ptolemy
. If you do not wish to rebuild the compiler, then you must either install Ptolemy in this directory, or create a symbolic link from this directory to the actual directory in which Ptolemy is installed. If you cannot install such a link, then you will still be able to run Ptolemy, but you may not be able to dynamically link new stars or recompile Ptolemy./users/ptolemy
and even if you cannot create a link from /users/ptolemy
to the actual location of Ptolemy, you may still be able to use this compiler by setting Gnu environment variables before using the compiler. We provide a script in $PTOLEMY/bin/g++-setup
that sets these variables. If you will always be using the prebuilt Gnu compiler shipped with Ptolemy with these variables, you may want to edit your copies of $PTOLEMY/bin/pigiEnv.csh
and $PTOLEMY/bin/ptcl
and add the following line:source $PTOLEMY/bin/g++-setup
setenv GCC_EXEC_PREFIX \
$PTOLEMY/gnu/$PTARCH/lib/gcc-lib/$PTARCH/2.7.2/
setenv C_INCLUDE_PATH $PTOLEMY/gnu/$PTARCH/lib/gcc-lib/$PTARCH
setenv CPLUS_INCLUDE_PATH \
$PTOLEMY/gnu/$PTARCH/lib/g++-include:\
$PTOLEMY/gnu/$PTARCH/$PTARCH/include
setenv LIBRARY_PATH $PTOLEMY/gnu/$PTARCH/libPTOLEMY
is set to the name of the actual installation directory of Ptolemy, and PTARCH
is set to the type of workstation (such as sun4
, hppa
, etc.).
pt-0.7.gnu.
xxx.tar.gz
file (where xxx is an architecture supported by Ptolemy such as sun4
, hppa
, or sol2
) in your current directory.
gzcat pt-0.7.gnu.sun4.tar.gz| \
(cd ~ptolemy/..; tar xf - )
(If you are running SunOS4.1.3 /bin/tar
, and you see messages about tar: read error: unexpected EOF
then see "EOF messages while using tar on Suns" on page A-23)gzcat pt-0.7.gnu.hppa.tar.gz | \
(cd ~ptolemy/..; tar xf - )
gzcat pt-0.7.gnu.sol2.5.tar.gz | \
( cd ~ptolemy/..; tar xf - )
If you are running another platform for which we provide a tar file:gzcat pt-0.7.gnu.
platform.tar.gz | \
( cd ~ptolemy/..; tar xf - )
Note that these are single commands split over two lines for readability. Do not type a space after the backslash at the end of the first line, just press Return
.
gzcat pt-0.7.gnu.tar.gz | ( cd ~ptolemy/..; tar xf - )
*gnu*.tar.gz
files that your got from the Web site or the tape. You may delete these files to free up disk space.
ptolemy
user and installed the system there. One advantage of such an installation, is that the ptolemy
user already has a working .cshrc
and .login
file to make start-up easier. To test Ptolemy, assuming you have set up a
ptolemy
user:
login
as ptolemy
.login
script will attempt to start it. If your installation is different from ours, you may need to modify .login
to work at your site (in particular, you may need a different path variable).
cd demo
pigi
If you have not set up a
ptolemy
user, then set your PTOLEMY
environment variable to point to the installation directory. If your Ptolemy distribution is at /users/myptolemy
, under the C shell, you would type:setenv PTOLEMY /users/myptolemy
If you use a shell other than csh
, consult your documentation on how to set environment variables. The next steps are to change to the Ptolemy directory and to start up Ptolemy:cd $PTOLEMY
bin/pigi
Note that the ptolemy user provides a model of a user properly configured to run Ptolemy. All the dot files (.cshrc
, .login
etc. ) in the home directory are set up according to the tastes of the Ptolemy authors and according the standard use of windowing software in the Ptolemy development group. A.4.9 Rebuilding Ptolemy From Source
If you wish to rebuild Ptolemy from source (this step is recommended if you plan to do major development work, such as adding a new domain), it is simply a matter of editing the appropriate configuration file and typing make
. This is explained in a bit more detail below. Note that to rebuild completely from source, you need the pt-0.7.other.srcs.tar.gz
tar overlay, as well as the pt-0.7.src.tar.gz
tar overlay. If you are having problems rebuilding, you may want to look over
"Ptolemy will not recompile" on page A-27.
To do a build of all of Ptolemy using the Gnu compiler from the distribution, first make sure that either Ptolemy is installed in /users/ptolemy
, or that there is a symbolic link from /users/ptolemy
to the installation directory. Alternatively, you can try setting the four environment variables described in
"Gnu Installation" on page A-7.
$PTOLEMY
should point to the location of the installation so that the toplevel makefile is at $PTOLEMY/makefile
. $PTARCH
should be set to the name of the architecture you are running. $PTARCH
is used to select a makefile from $PTOLEMY/mk/config-$PTARCH.mk
. The script $PTOLEMY/bin/ptarch
will return the architecture of the machine on which it is run.$PTOLEMY/bin.$PTARCH
and $PTOLEMY/bin
are both in your path ($PTOLEMY/bin.$PTARCH
is where the compiler is installed. $PTOLEMY/bin
is where certain scripts used to build star lists are located).
setenv PTOLEMY /users/ptolemy
setenv PTARCH `$PTOLEMY/bin/ptarch`
set path = ($PTOLEMY/bin $PTOLEMY/bin.$PTARCH $path)
cd $PTOLEMY
(or cd /users/ptolemy
)
$PTOLEMY/makefile
can rebuild some or all of Ptolemy.
xv
, Octtools and Ptolemy, type make bootstrap
. This target requires the following files: pt-0.7.gnu.tar.gz
, pt-0.7.other.src.tar.gz
and pt-0.7.src.tar.gz
.
xv
, Octtools and Ptolemy, type make everything
. This target requires the following files: pt-0.7.other.src.tar.gz
and pt-0.7.src.tar.gz
.
make install_octtools install
.This target requires the following files: pt-0.7.other.src.tar.gz
and pt-0.7.src.tar.gz
. (If you are short on disk space, you may be able to download pt-0.7.octtools.tar.gz
instead of pt-0.7.other.src.tar.gz
).
make install
.This target requires the following files: pt-0.7.src.tar.gz
.
cd $PTOLEMY
(or cd /users/ptolemy
)
$PTOLEMY/.cshrc
to define PTOLEMY
correctly
source $PTOLEMY/.cshrc
make install
$PTOLEMY/mk
. The configuration files are all named config-$PTARCH.mk
where the $PTARCH
is something like sun4
for a Sun Sparc system running SunOS4.1.3 or hppa
for an HP Precision Architecture machine. They are included by other makefiles and define symbols specifying compiler flags, the directory where X include files are located, etc. If you wish to rebuild using a non-Gnu C++ compiler rather than
g++
, use config-sol2.5.cfront.mk
as a starting point to produce your configuration file. This has been tested with Sun CC version 4.0 with Solaris2.5.1. For other platforms, you may need to do some tweaking. See config-hppa.cfront.mk
for using HP CC version 4, and config-irix5.cfront.mk
for using SGI Irix CC. Note that the term "cfront" is historical, and that not all of these compilers are actually cfront based. We use the term cfront to refer to non-Gnu C++ compilers.To rebuild the system, first adjust the configuration parameters in the appropriate configuration file. For example, if you are using the Gnu tools on a Sun-4 running SunOS4.1.3, then you will need to adjust the
config-sun4.mk
file. Next, run
make
. The Ptolemy source files include extensions found only in Gnu make
, which is included in the Gnu subset of the Ptolemy distribution. (Make sure that the Gnu tools are installed correctly.) Sun make
will fail on certain makefiles that have Gnu make
extensions. See $PTOLEMY/src/gnu/README
for a discussion of Gnu make
compatibility.You will get some warnings from the compiler, but the following warnings can safely be ignored:
file_id
defined but not used.
SccsId
defined but not used
longjmp
or vfor
'cast discards const
.
To build Ptolemy, you must have your
PTOLEMY
and PTARCH
environment variables set. PTOLEMY
is set to the location of the Ptolemy tree, PTARCH
is set to the name of the machine architecture (the script $PTOLEMY/bin/ptarch
will return the architecture of the machine on which it is run). The directory $PTOLEMY/mk
contains master makefiles that are included by other makefiles (The makefile include
directive does this for us). $PTOLEMY/mk/config-$PTARCH.mk
refers to the makefile for the architecture $PTARCH
. For instance, $PTOLEMY/mk/config-sun4.mk
is the makefile that contains the sun4 specific details.When you change to the
$PTOLEMY
directory and type make
, $PTOLEMY/makefile
contains a rule that checks to see if the directory $PTOLEMY/obj.$PTARCH
exists. If this directory does not exist, then make runs the command csh -f MAKEARCH
, where MAKEARCH
is a C shell script at $PTOLEMY/MAKEARCH
. MAKEARCH
will create the necessary subdirectories under $PTOLEMY/obj.$PTARCH
for $PTARCH
if they do not exist. We split up the sources and the object files into separate directories in part to make it easier to support multiple architectures from one source tree. The directory
$PTOLEMY/obj.$PTARCH
contains the platform-dependent object files for a particular architecture. The platform-dependent binaries are installed into $PTOLEMY/bin.$PTARCH
, and the libraries go into $PTOLEMY/lib.$PTARCH
. Octtools, Tcl/Tk, and Gnu tools have their own set of architecture-dependent directories. The Ptolemy Programmer's Manual describes the directory tree structure in more detail.We are able to have separate object and source directories by using the
make
program's VPATH
facility. Briefly, VPATH
is a way of telling make
to look in another directory for a file if that file is not present in the current directory. For more information, see the Gnu make
documentation, in Gnu Info format files in $PTOLEMY/gnu/common/info/make-*
.
itcl2.2
, which is an object-oriented extension to tcl (Tool Command Language) and tk. itcl2.2
includes a modified version of tcl7.6
and tk4.2
. If you have itcl2.2
already installed, you may use your installed version. You will need to either edit$PTOLEMY/mk/config-default.mk
or create the proper links in $PTOLEMY/tcltk
.In theory, it is possible to build Ptolemy0.7 without
itcl2.2
. However, without itcl2.2
, Tycho, the syntax manager and the Gantt chart facilities will not work. There may be other features that fail to operate. We strongly encourage you to build with itcl2.2
. In previous releases, the layout of the
$PTOLEMY/tcltk
directory was such that Tcl and Tk were in separate directories so that upgrading Tcl and Tk could be done separately if necessary. In Ptolemy 0.7, we are using itcl2.2
, the Tcl and Tk are under the $PTOLEMY/tcltk/itcl*
directories. We have left separate $PTOLEMY/tcltk/tcl*
and $PTOLEMY/tcltk/tk*
directories so that we can easily support separate Tcl and Tk releases in the future.
$PTOLEMY/tcltk/itcl
contains the architecture-independent Itcl directories include
, lib
and man
. For instance, tcl.h
might be at ~ptolemy/tcltk/itcl/include/tcl.h
.
$PTOLEMY/tcltk/itcl.$PTARCH
contains the architecture-dependent Itcl directories bin
and lib
. For instance, on the sun4, libtcl.a
might be at ~ptolemy/tcltk/itcl.sun4/lib/libtcl.a
.
bison
may be necessary to compile the Gnu C compiler and the Ptolemy program ptlang
. If, when you are building the Gnu C compiler, bison
is called and you do not have it, try using the Unix touch
command on the offending .c file. The tar files we distribute include ptlang.c
, which is generated from ptlang.y
, so you should not need bison
to compile Ptolemy. You can get a fairly complete set of Gnu tools via anonymous ftp from ftp://ftp.uu.net/systems/gnu/solaris2.3/
. See also
http://www.sunfreeware.com
gcc
with SunSoft's cc
, be sure that you are not using /usr/ucb/cc
. Otherwise, you may see errors while compiling gcc/protoize.c
:
"/usr/include/sys/ucontext.h", line 25: syntax error before or at: stack_tThe solution is to place
/opt/SUNWspro/bin
in your path before /usr/ucb.
/usr/ccs/bin
in your path to pick up ar
, lex
and yacc
.
/bin
in your path before /usr/ucb
. See $PTOLEMY/src/gnu/README
for more information.
sol2.5.cfront
, $OPENWINHOME
must be defined to build xv
since xmkmf
relies on $OPENWINHOME
. In the C shell, one would type:
setenv OPENWINHOME /usr/openwin
$PTOLEMY/src/domains/sdf/demo/ppimage
(~1020 Kb). This file is used by some of the image processing demos.
$PTOLEMY/obj.$PTARCH
directory once you are done installing.
.cc
, .c
and .h
files in the $PTOLEMY/src
directory. Note that the $PTOLEMY/src
directory contains the icons and interpreted Tcl code used in the user interface, so removing the src
directory completely will prevent pigi from running.
ptolemy.eecs.berkeley.edu
. Note that Ptiny might be from an older release than the current release of the main Ptolemy distribution.
pit-manager.mit.edu
in /pub/usenet/news.answers
.
rle
such as is rletoppm
. The original URT is available via anonymous FTP from ftp.cs.utah.edu
in /pub/urt-*.
Note that the original URT does not include configuration files for many modern platforms, including Solaris2.5.1. We have made URT sources and binaries for Solaris2.5.1 available via anonymous ftp from ptolemy.eecs.berkeley.edu
in pub/misc/urt
prep.ai.mit.edu
. See the file /pub/gnu/GETTING.GNU.SOFTWARE
on that site. For further information, write to:
Ptolemy uses the following Gnu software:
ghostscript -
PostScript previewer. Note that oct2ps
can use ghostscript
to generate Encapsulated PostScript (EPS).
gdb
- needed for pigi -debug
gzip
- Used to compress and uncompress files.
Copyright © 1990-1997, University of California. All rights reserved.