Installation of Ptolemy-0.7p1 (RPM Package Release 3glibc) ---------------------------------------------------------- Created by: Wolfgang Reimer Last Change: 03/22/98 Contents ======== 0 General Remarks 1 Installing Ptolemy (Minimal configuration) 2 Installing Optional Packages 2.1 HTML Manuals 2.2 Postscript Manuals 2.3 Source Files of Additional Programs Used by Ptolemy 2.4 Source Files Created during Building of Ptolemy 2.5 Developer's Binary Version (binaries + whole object tree) 2.6 Alternative Binary Packages 3 Uninstalling a Ptolemy Package 4 Upgrading Ptolemy Packages 5 Complete Rebuilding of the Ptolemy Distribution 6 Building Ptolemy without RPM 7 Known Linux Specific Bugs 8 Troubleshooting Appendix A: Versions of Crucial System Packages used to build Ptolemy Appendix B: ChangeLog 0 General Remarks ======================= This Ptolemy contribution is a bunch of relocatable RPM packages for RedHat Linux 5.0 (ix86). Even unexperienced Linux users should be able to install and start Ptolemy. No manual setting of environment variables is necessary. Just plug 'n play. Important Notes: * All the following notes are valid only for installing Ptolemy version 0.7p1 in conjunction with original RedHat Linux 5.0 (RH5.0) for ix86. All given example commands are for bash! Useful Hints: * All ptolemy packages are relocatable! The default path for installation is /usr/local. If you do not have enough space in this location but enough in e. g. /opt then you would install _all_ packages using the --prefix option: rpm -ivh --prefix /opt * You can also specify a valid ftp URL instead of the file name. E.g. rpm -ivh ftp://ftp.tu-ilmenau.de/pub/unix/ptolemy/ptolemy0.7.linux/ptolemy-source-0.7p1-3glibc.i386.rpm would download and install the package ptolemy-source-0.7p1-3glibc.i386.rpm in one step. However this is recommended for stable ftp connections only and you will need enough free disk space (file size of the largest package to install + ca. 10 Mb) in the directory that RPM will use for temporary work space (by default /var/tmp). * Each ptolemy package contains a package description (see file README for how to display it). * The instructions below use the command 'rpm' to install or uninstall rpm packages. Alternatively, one should also be able to use the X11 tool "Package Management" from the control-panel to manage the packages. * This document deals only with Ptolemy installation (RH5.0). It doesn't provide any further information. Look at http://ptolemy.eecs.berkeley.edu/ for all kinds of Ptolemy related information. 1 Installing Ptolemy (Minimal configuration) ================================================== Required packages Required disk space ------------------------------------------------------- ptolemy-source-0.7p1-3glibc.i386.rpm 64,662 kb ptolemy-bin-0.7p1-3glibc.i386.rpm 21,990 kb ------------------- altogether 86,652 kb Instructions: * Make sure that you have superuser privileges during installation process. * Get the required packages and put them temporarily in a directory, e.g. '/tmp'. Do not forget to switch to binary mode when downloading the packages via ftp. Change into that directory, e.g. 'cd /tmp'. * Make sure that you have enough space in /usr/local: df -k /usr/local The number of kb shown below 'Available' should be more than 90,000. Remember that you can install Ptolemy into another location using the --prefix option for _all_ Ptolemy packages. You will also need space (some Mb) for the growing rpm database in /var/lib/rpm and a little bit space (ca. 5kb) in '/'. * Install the Ptolemy packages: rpm -ivh ptolemy-source-0.7p1-3glibc.i386.rpm \ ptolemy-bin-0.7p1-3glibc.i386.rpm That's all. You don't need the above installed *.rpm files any longer and you can delete them. * Now you can login as a normal user (the environment variables will automagically be set at login) and start Ptolemy: pigi or the tiny version: ptiny * Andvanced users should read the paragraph "Final hints" at the end of section 2 (Installing Optional Packages) 2 Installing Optional Packages ==================================== Instructions: All of the following packages can be installed using the following rpm command rpm -ivh where is the file name of the package in question. Each of them requires that the package ptolemy-source-0.7p1-3glibc.i386.rpm is installed. 2.1 HTML Manuals ~~~~~~~~~~~~~~~~~ The HTML manuals and other documentation can be viewed on-line as follows: - Type "y" in a VEM facet window to start a tycho shell. - Open menu "Help" -> "Ptolemy Home Page" in tycho shell window. - Click on the link to the desired manual. 2.1.1 User's Manual (HTML) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 4,391 kb Package File Name: ptolemy-usersman_html-0.7p1-3glibc.i386.rpm Description: See description tag in rpm package. 2.1.2 Programmer's Manual (HTML) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 1,522 kb Package File Name: ptolemy-progman_html-0.7p1-3glibc.i386.rpm Description: See description tag in rpm package. 2.1.3 Kernel Manual (HTML) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 1,014 kb Package File Name: ptolemy-kernelman_html-0.7p1-3glibc.i386.rpm Description: See description tag in rpm package. 2.2 Postscript Manuals ~~~~~~~~~~~~~~~~~~~~~~~ 2.2.1 User's Manual (postscript) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 12,721 kb Package File Name: ptolemy-usersman_ps-0.7p1-3glibc.i386.rpm Description: See description tag in rpm package. 2.2.1 Programmer's Manual (postscript) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 5,297 kb Package File Name: ptolemy-progman_ps-0.7p1-3glibc.i386.rpm Description: See description tag in rpm package. 2.2.1 Kernel Manual (postscript) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 4,414 kb Package File Name: ptolemy-kernelman_ps-0.7p1-3glibc.i386.rpm Description: See description tag in rpm package. 2.3 Source Files of Additional Programs Used by Ptolemy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 32,157 kb Package File Name: ptolemy-other_source-0.7p1-3glibc.i386.rpm Description: See description tag in rpm package. 2.4 Source Files Created during Building of Ptolemy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 8,567 kb Package File Name: ptolemy-built_source-0.7p1-3glibc.i386.rpm Description: See description tag in rpm package. 2.5 Developer's Binary Version (binaries + whole object tree) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 43,123 kb Package File Name: ptolemy-devel_bin-0.7p1-3glibc.i386.rpm Description: This contains all files of the binary package ptolemy-bin-0.7p1-3glibc.i386.rpm + complete object tree. See also description tag in rpm package. 2.6 Alternative Binary Packages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The binary packages mentioned above were built with DLLs. This minimizes the space requirements for memory space as well as for disk space. Statically linked binaries ~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 68,035 kb Package File Name: ptolemy-staticbin-0.7p1-3glibc.i386.rpm Description: Statically linked binaries have a better execution performance than dynamically linked binaries on machines with more than 16 Mb RAM. See also description tag in rpm package. Developer's Version of the Statically Linked Binaries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 88,466 kb Package File Name: ptolemy-devel_staticbin-0.7p1-3glibc.i386.rpm Description: This contains all files of the binary package ptolemy-staticbin-0.7p1-3glibc.i386.rpm + complete object tree. See also description tag in rpm package. Debug Binaries ~~~~~~~~~~~~~~ Disk Space Requirement: 165,572 kb Package File Name: ptolemy-debugbin-0.7p1-3glibc.i386.rpm Description: These binaries include debug information. This allows debugging but will also increase space requirements and lower execution speed. See also description tag in rpm package. Developer's Version of the Debug Binaries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 226,028 kb Package File Name: ptolemy-devel_debugbin-0.7p1-3glibc.i386.rpm Description: This contains all files of the binary package ptolemy-debugbin-0.7p1-3glibc.i386.rpm + complete object tree. See also description tag in rpm package. Because the full DLL version, the statically linked version and the debug version of the binaries (and object files) reside in different diectories they can be installed at the same time without overwriting each other. This allows to use the debug and non-debug version at the same time, which may be useful for developing. If you have installed more than one binary package then you can select the version you want to use. Set 'PTARCH=linux' if you want to use the DLL version. Set 'PTARCH=linux.static' if you want to use the static version. Set 'PTARCH=linux.debug' if you want to use the debug version. Then set 'PATH=$PTOLEMY/bin:$PTOLEMY/bin.$PTARCH:$PATH' to prepend the correct path and finally do 'export PTARCH PATH'. Final Hints (might be useful for developers and advanced users) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * In order to get linked standalone binaries (created by the CG domains or by SDF-compile target) to the Matlab4.x interface library, set the environment variable MATLABDIR to the Matlab4.x root directory or add a permanent definition of MATLABDIR in $PTOLEMY/src/config-linux.mk. Binaries linked against the Matlab4.x interface library will also work with Matlab5.x. However, binaries cannot be linked against the Matlab5.x interface library. There is also a variable MATHEMATICADIR which can be used in a similar manner to link binaries against the Mathematica2.x interface library. * If you will install the packages ptolemy-source-0.7p1-3glibc.i386.rpm ptolemy-other_source-0.7p1-3glibc.i386.rpm ptolemy-built_source-0.7p1-3glibc.i386.rpm ptolemy-devel_bin-0.7p1-3glibc.i386.rpm then you will have the same status (all the files) as if you have completely rebuilt the whole Ptolemy distribution with DLLs. * If you will install the packages ptolemy-source-0.7p1-3glibc.i386.rpm ptolemy-other_source-0.7p1-3glibc.i386.rpm ptolemy-built_source-0.7p1-3glibc.i386.rpm ptolemy-devel_staticbin-0.7p1-3glibc.i386.rpm then you will have the same status (all the files) as if you have completely rebuilt the whole Ptolemy distribution with statically linked Ptolemy libraries. * If you will install the packages ptolemy-source-0.7p1-3glibc.i386.rpm ptolemy-other_source-0.7p1-3glibc.i386.rpm ptolemy-built_source-0.7p1-3glibc.i386.rpm ptolemy-devel_debugbin-0.7p1-3glibc.i386.rpm then you will have the same status (all the files) as if you have completely rebuilt the whole Ptolemy distribution with debug information. * All values for disk space requirements assume that Ptolemy will be installed on an ext2 filesystem with default blocksize (1kb). Installing on a filesystem with a larger block size will require significantly more disk space (e.g. the package ptolemy-source-0.7p1-3glibc.i386.rpm will require 105,984 kb on an ext2 filesystem with 4kb blocksize. This is 64 % more!). 3 Uninstalling a Ptolemy Package ====================================== To uninstall a package simply do: rpm -ev where is the name of the installed package (not the filename of the package). E.g. "ptolemy-source", "ptolemy-source-0.7p1", or "ptolemy-source-0.7p1-3glibc" are valid package names for the package with the file name "ptolemy-source-0.7p1-3glibc.i386.rpm". Note: When uninstalling Ptolemy 0.7 packages of package release 1 you may get warnings about non-empty directories which cannot be removed. This is a packaging bug in release 1 which does not exists in newer releases and which can be safely ignored. 4 Upgrading Ptolemy Packages ================================== You can replace older packages by newer versions/releases doing: rpm -Uvh where is the file name of the package with the newer version/release. For consistency reasons you should always upgrade all Ptolemy packages. You can upgrade a Ptolemy package only if the new package will be installed to the same location (same --prefix option). If you want to change the location when updating then you cannot use the upgrade feature (-U) of rpm. In this case you have to uninstall the old packages and then to install the new packages into the new location. If there is a package of the old release/version which you do not want to upgrade (e.g. you want to use another binary package of the new version instead) it should be uninstalled before(!) adding packages from the new release. Note: When rpm is upgrading it installs the new package before(!) it uninstalls the old package. If you are short in disk space then uninstall the old package and after that install the new one instead of using the upgrade feature of rpm. 5 Complete Rebuilding of the Ptolemy Distribution ======================================================= If you want to rebuild the packages from scratch for some reason (e.g. you do not have original RH 5.0 and these binaries won't run) then get the rpm source package ptolemy-0.7p1-3glibc.src.rpm. Make sure that you have plenty of disk space (at least 200 Mb to build the source packages + packages for the DLL binary version) in the build directory (by default /tmp) and enough space (about 50 Mb for source packages + packages for the DLL binary version) to hold the packages being built in the RPM package directories (by default in /usr/src/redhat). Before you start building: If you have Matlab4.x and/or Mathematica2.x then you can set the environment variable MATLABDIR and/or MATHEMATICADIR to the respective root directories to get binaries with an interface to Matlab and Mathematica, respectively. If you have built Ptolemy with the interface to Matlab4.x this interface will also work with Matlab5.x. However Ptolemy will not build using the Matlab5.x and Mathematica3.x interface libraries. By default the packages ptolemy-bin-0.7p1-3glibc.i386.rpm ptolemy-built_source-0.7p1-3glibc.i386.rpm ptolemy-devel_bin-0.7p1-3glibc.i386.rpm ptolemy-other_source-0.7p1-3glibc.i386.rpm ptolemy-source-0.7p1-3glibc.i386.rpm ptolemy-usersman_html-0.7p1-3glibc.i386.rpm ptolemy-usersman_ps-0.7p1-3glibc.i386.rpm ptolemy-progman_html-0.7p1-3glibc.i386.rpm ptolemy-progman_ps-0.7p1-3glibc.i386.rpm ptolemy-kernelman_html-0.7p1-3glibc.i386.rpm ptolemy-kernelman_ps-0.7p1-3glibc.i386.rpm will be built. You can install, rebuild Ptolemy, and create these packages by just executing one rpm command: rpm --rebuild ptolemy-0.7p1-3glibc.src.rpm Once successful you will find the newly created packages in the architecture dependend RPM package directory which is /usr/src/redhat/RPMS/i386 by default. If you want to build also packages of other binary versions then you have to install the source package rpm -ivh ptolemy-0.7p1-3glibc.src.rpm and to uncomment the respective commented parts in the "%built" section and the "%files" sections of the file 'ptolemy-0.7p1.spec' before you can rebuild and make the packages by doing: cd /usr/src/redhat/SPECS rpm -bb ptolemy-0.7p1.spec However notice that you need at least 600 Mb in the build directory + 210 Mb in the RPM package directories to build all packages at the same time. It took about 4 1/2 hours to build all packages on the build host (PentiumPro 200MHz, 128 MB RAM, 3 FAST SCSI-2 hard disks with 2 GB each, combined to a RAID to increase bandwidth). 6 Building Ptolemy without RPM ==================================== This is only a brief overview for someone who still wants to compile Ptolemy on a non-RPM Linux system. This may or may not work for you: The long way: - extract original sources and patches from ptolemy-0.7p1-3glibc.src.rpm (use rpm2tgz or rpm2cpio or mc with rpm virtual file system support) - install pt0.7p1.src.tar.gz and pt0.7.other.src.tar.gz - change to Ptolemy home directory - install all 18 patches - continue with step "Compile" The shorter way: - extract the patched sources from ptolemy-source-0.7p1-3glibc.i386.rpm and ptolemy-other_source-0.7p1-3glibc.i386.rpm (use rpm2tgz or rpm2cpio or mc with rpm virtual file system support) Compile: - set environment variables PTOLEMY, PTARCH, and PATH - set environment variables MATLABDIR and/or MATHEMATICADIR to the root directory of Matlab4.x and Mathematica2.x respectively if you want interfaces to Matlab and/or Mathematica. Alternatively, you can permanently define MATLABDIR and/or MATHEMATICADIR in $PTOLEMY/mk/config-linux.mk. - rebuild everything with make obj.$PTARCH make install_tcltk make install_octtools make install - if successful Ptolemy is ready for use now 7 Known Linux Specific Bugs ================================= * The audio stars which program directly the audio interface won't work because they assume a SUNOS style interface. However, the audio stars which use the ptplay script will work correctly. * PN-Domain not supported yet. * Itcl/itk and java extension for tycho not supported yet. * Binaries built with shared libs (-fpic) run noticeable slower than the statically linked binaries. You can report any Linux specific Ptolemy bugs to Wolfgang Reimer . Other Ptolemy bugs can be reported to the Ptolemy hackers . Appendix A: Versions of Crucial System Packages used to build Ptolemy ===================================================================== Ptolemy was built on an original RH5.0 system with all official RH 5.0 updates available at the time of building (02/13/98). Here are the package versions/releases of some critical packages: glibc-2.0.6-9 libg++-2.7.2.8-6 ld.so-1.9.5-5 binutils-2.8.1.0.1-1 gcc-2.7.2.3-8 These Ptolemy binaries will not run with libg++-2.8 or later. Appendix B: ChangeLog ===================== * Wed Mar 18 1998 Wolfgang Reimer - Version 0.7p1, package release 3 - Changed bin/pxgraph from C shell to bourne shell script to fix a bug: Empty argument strings will be correctly passed to the pxgraph binary now - fixed %pre sections so that Ptolemy rpms can be installed together with RH Linux installation - Patch for matlab.mk and mathematica.mk: Allow predefinition of MATLABDIR and MATHEMATICADIR (either in config-$PTARCH.mk or in an envvar). - PosixThread.cc patch: Make changes necessary to use POSIX threads according standard 1003.1c - Patch for src/domains/cg/kernel/CGTarget.cc: Changed default scheduler from ACYLOOP to DEF (SDF-compile target won't work with ACYLOOP) * Tue Feb 17 1998 Wolfgang Reimer - Version 0.7p1, package release 2 - Patch for lib/pigiRpcDebug: Remove temporary script in /tmp when exiting and extend xterm history to 1000 lines - CompileMake.template + CompileTarget.cc patch from Christopher Hylands: Fixes some bugs in CompileSDF - Changed optimizer flags and added -D_REENTRANT to ARCHFLAGS (config-linux.mk) - Fix for RaisedCosine bug reported to ptolemy-hackers mailing list - Patch for index.html: Correct links to the HTML manuals - Added Programmer's and Kernel manual (HTML and ps) - Updated Users's manual (HTML and ps) - Work around to allow to use the Complex class of GNU libg++. - Bug fix for "X.h defines Complex to 0" bug: Allows to use class Complex in stars which include ptk.h and also allows to include ptk.h in any order. - Bug fix for dynamic linking code from Thomas Faehnle (RTLD_GLOBAL) does not work. New linker patch: Uses work around for permlink and fixes double invocation of constructors of dynamically loaded stars. - Added ptlang patch from Cristopher Hylands: Fixes RCS problem, enables multiple inheretance * Tue Dec 23 1997 Wolfgang Reimer - Version 0.7p1, package release 1 - Added glibc patch from Neal Becker - Bug fix for dynamic linking code from Thomas Faehnle: Permlink did not make external symbols available - Changed pt0.7.linux-debug+static-2.patch to pt0.7p1.linux-debug+static.patch: Moved pigiLoader.cc fixes to pt0.7p1.pigiLoader.cc.patch (see below). - Added pt0.7p1.pigiLoader.cc.patch: Moved pigiLoader.cc fixes from pt0.7.linux-debug+static-2.patch into this patch + fixed two incorrect include paths (cg/kernel and sdf/kernel). - Replaced Source0 by patch level 1 source archive. - Corrected typos in Source tags (berekeley -> berkeley). * Mon Jul 07 1997 Wolfgang Reimer - Release 2 - Added pt0.7.ptsetup.csh.patch patch to get rid of unnecessary warnings about $PTARCH setting and do better checking of valid $PTARCH settings. - Added pt0.7.mkarch.patch patch to fix a bug which will show up if $PTOLEMY is a symbolic link. - Added pt0.7.CG56-compileCode.patch patch from Brian Evans to get VHDL-CG56 cosimulation working with version 6.1 of the 56000 assembler. - Patch pt0.7.itkwish-script.patch replaced by pt0.7.itkwish-script-2.patch: Patch contains now changes relativ to new itkwish sh script (Source4) instead of patches against the old itkwish csh script. - Patch pt0.7.linux-debug+static.patch replaced by pt0.7.linux-debug+static-2.patch: Includes now patch for makefiles in $PTOLEMY/src/utils/ptplay to build ptplay also for linux.debug and linux.static. Includes now patch for pigiLoader.cc in $PTOLEMY/src/pigilib to add the compiler flags -g and -fpic for dynamically linked in stars. - Changed spec file so that one can build all different binary packages at the same time. - Fixed installation bugs in rpm packages: Directory /users will now be created if it not exists. All directories will be now uninstalled correctly. Preinstall script makes sure that all packages will be installed in the same location. Instead of pkg ptolemy-build_*obj we have now pkg ptolemy-devel_*bin which includes the binaries + objectfiles. This fixes a problem with hard links. * Tue Jun 24 1997 Wolfgang Reimer - Release 1 - Added pt0.7.itkwish-script.patch patch - Added pt0.7.linux-debug+static.patch patch