Installation of Ptolemy-0.7.1p1 (RPM Package Release 3) ------------------------------------------------------- Created by: Wolfgang Reimer Last Change: 08/13/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.1 (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.7.1p1 in conjunction with original RedHat Linux 5.1 (RH5.1) 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.1.linux/ptolemy-source-0.7.1p1-3.i386.rpm would download and install the package ptolemy-source-0.7.1p1-3.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 + approx. 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.1). 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.7.1p1-3.i386.rpm 67,802 kb ptolemy-bin-0.7.1p1-3.i386.rpm 36,777 kb ------------------- altogether 104,579 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 110,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 (approx. 5kb) in '/'. * Install the Ptolemy packages: rpm -ivh ptolemy-source-0.7.1p1-3.i386.rpm \ ptolemy-bin-0.7.1p1-3.i386.rpm That's all. You won't need the above installed *.rpm files in the temporary directory any longer and you can delete them. * Now you should login as a normal user (the environment variables will automagically be set at login) and start Ptolemy: pigi or the tiny version: ptiny * Advanced 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.7.1p1-3.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.7.1p1-3.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.7.1p1-3.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.7.1p1-3.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.7.1p1-3.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.7.1p1-3.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.7.1p1-3.i386.rpm Description: See description tag in rpm package. 2.3 Source Files of Additional Programs Used by Ptolemy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 32,256 kb Package File Name: ptolemy-other_source-0.7.1p1-3.i386.rpm Description: See description tag in rpm package. 2.4 Source Files Created during Building of Ptolemy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 8,904 kb Package File Name: ptolemy-built_source-0.7.1p1-3.i386.rpm Description: See description tag in rpm package. 2.5 Developer's Binary Version (binaries + whole object tree) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disk Space Requirement: 63,761 kb Package File Name: ptolemy-devel_bin-0.7.1p1-3.i386.rpm Description: This contains all files of the binary package ptolemy-bin-0.7.1p1-3.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 ~~~~~~~~~~~~~~~~~~~~~~~~~~ The statically linked binaries have been dropped due to their huge space requirements. The new egcs compiler produces unreasonably large executables when building with static libraries. Debug Binaries ~~~~~~~~~~~~~~ The debug binaries are built with DLLs now for reasons of space requirements. The new egcs compiler produces unreasonably large executables when building with static libraries. The debug executables are more than ten (!) times bigger compared with the ones created by good old gcc-2.7.2.3. Disk Space Requirement: 280,025 kb Package File Name: ptolemy-debugbin-0.7.1p1-3.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: 483,481 kb Package File Name: ptolemy-devel_debugbin-0.7.1p1-3.i386.rpm Description: This contains all files of the binary package ptolemy-debugbin-0.7.1p1-3.i386.rpm + complete object tree. See also description tag in rpm package. Because the full DLL version and the debug version of the binaries (and object files) reside in different directories, 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 as follows: Set 'PTARCH=linux' if you want to use the DLL 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) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * You should update egcs: Ptolemy0.7.1p1 is compiled with egcs-1.0.3a which has a lot of bug fixes with regard to egcs-1.0.2 (the version shipped with RH5.1). In order to avoid problems with egcs I suggest to uninstall/replace the following compiler related packages: rpm -ev gcc-2.7.2.3 egcs-1.0.2 egcs-c++-1.0.2 \ egcs-g77-1.0.2 egcs-objc-1.0.2 \ libstdc++-2.8.0 libstdc++-devel-2.8.0 rpm -ivh egcs-1.0.3a-1.i386.rpm egcs-c++-1.0.3a-1i386.i386.rpm \ egcs-g77-1.0.3a-1.i386.rpm egcs-objc-1.0.3a-1.i386.rpm \ libstdc++-2.8.1.1-1.i386.rpm libstdc++-devel-2.8.1.1-1.i386.rpm You will find these packages in the subdirectory "contrib". * By default the variable PT_USE_X11_PXGRAPH is set to allow users without java to see the pxgraph output. You can also uninstall kaffe-0.10.0 and install jdk-sbb-1.1.6-2.1.2glibc.i386.rpm from the subdirectory "contrib" to use ptplot (the java version of pxgraph). Unsetting PT_USE_X11_PXGRAPH will enable ptplot then. * In order to get standalone binaries (created by the CG domains or by SDF-compile target) linked against the Matlab interface library, set the environment variable MATLABDIR to the Matlab 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 linked against the Matlab5.x interface library won't run with Matlab4.x. There is also a variable MATHEMATICADIR which can be used in a similar manner to link binaries against the Mathematica interface library. However, the Mathematica interface is not tested. * If you will install the packages ptolemy-source-0.7.1p1-3.i386.rpm ptolemy-other_source-0.7.1p1-3.i386.rpm ptolemy-built_source-0.7.1p1-3.i386.rpm ptolemy-devel_bin-0.7.1p1-3.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.7.1p1-3.i386.rpm ptolemy-other_source-0.7.1p1-3.i386.rpm ptolemy-built_source-0.7.1p1-3.i386.rpm ptolemy-devel_debugbin-0.7.1p1-3.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 file system with default block size (1kb). Installing on a file system with a larger block size will require significantly more disk space (e.g. the package ptolemy-source-0.7.1p1-3.i386.rpm will require 111,756 kb on an ext2 file system with 4kb block size. This is 65 % 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.7.1p1", or "ptolemy-source-0.7.1p1-3" are valid package names for the package with the file name "ptolemy-source-0.7.1p1-3.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.1 and these binaries won't run) then get the rpm source package ptolemy-0.7.1p1-3.src.rpm. Make sure that you have plenty of disk space (at least 690 Mb) in the build directory (by default /tmp) and enough space (about 350 Mb) 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. By default the packages ptolemy-bin-0.7.1p1-3.i386.rpm ptolemy-built_source-0.7.1p1-3.i386.rpm ptolemy-debugbin-0.7.1p1-3.i386.rpm ptolemy-devel_bin-0.7.1p1-3.i386.rpm ptolemy-devel_debugbin-0.7.1p1-3.i386.rpm ptolemy-other_source-0.7.1p1-3.i386.rpm ptolemy-source-0.7.1p1-3.i386.rpm ptolemy-usersman_html-0.7.1p1-3.i386.rpm ptolemy-usersman_ps-0.7.1p1-3.i386.rpm ptolemy-progman_html-0.7.1p1-3.i386.rpm ptolemy-progman_ps-0.7.1p1-3.i386.rpm ptolemy-kernelman_html-0.7.1p1-3.i386.rpm ptolemy-kernelman_ps-0.7.1p1-3.i386.rpm will be built. You can install, rebuild Ptolemy, and create these packages by just executing one rpm command: rpm --rebuild ptolemy-0.7.1p1-3.src.rpm Once successful you will find the newly created packages in the architecture dependent RPM package directory which is /usr/src/redhat/RPMS/i386 by default. If you are short in disk space then you can omit building the debug binaries. To do this you have to install the source package rpm -ivh ptolemy-0.7.1p1-3.src.rpm and to comment the respective parts in the "%built" section and the "%files" sections of the file 'ptolemy-0.7.1p1.spec' before you can rebuild and make the packages by doing: cd /usr/src/redhat/SPECS rpm -bb ptolemy-0.7.1p1.spec Omitting the debug binaries can save about 480 Mb in the build directory + 250 Mb in the RPM package directory. It took about 4 hours to build all packages on the build host (Dual PentiumPro 200MHz, 256 MB RAM, 2 ULTRA-SCSI hard disks with 4 Gb each, combined to a software RAID-0 system 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.7.1p1-3.src.rpm (use rpm2tgz or rpm2cpio or mc with rpm virtual file system support) - install pt0.7.1p1.src.tar.gz and pt0.7.1.other.src.tar.gz - change to Ptolemy home directory - install all patches - continue with step "Compile" The shorter way: - extract the patched sources from ptolemy-source-0.7.1p1-3.i386.rpm and ptolemy-other_source-0.7.1p1-3.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 Matlab and Mathematica 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 but xv 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 directly access the audio interface won't work because they assume a SUNOS style audio interface. However, the audio stars which use the ptplay script will work correctly. * PN-Domain 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.1 system with all official RH5.1 updates available at the time of building (07/27/98). Here are the package versions/releases of some critical packages: glibc-2.0.7-19 ld.so-1.9.5-6 binutils-2.9.1.0.4-2 egcs-1.0.3a-1 libstdc++-2.8.1.1-1 These Ptolemy binaries will not run with libg++/libstdc++-2.7.x or older. Appendix B: ChangeLog ===================== * Tue Jul 27 1998 Wolfgang Reimer - Version 0.7.1p1, package release 3 - Incorporated 2 post 0.7.1p1 patches from file ftp://ptolemy.eecs.berkeley.edu/pub/ptolemy/ptolemy0.7.1/html/BUGS: displayFile.c patch: reported by Bishnupriya Bhattacharya ptkParams.tcl patch: reported by Tom Lane. - Added two symbolic links to fix broken html links to kernel and programmers manual. - Added symbolic links for debug version of acs binaries - Changed release # from 3glibc to 3 because of array overflow in tclUnixInit.c:39 * Tue Jul 16 1998 Wolfgang Reimer - Version 0.7.1p1, package release 2 - Fixed dependency problem: Unset executable flag of some unused scripts. - Fixed bug in ptolemy-0.7.1p1-2glibc.sh: Removed an extra colon. - Added Prefix tag in each package section: New rpm needs this to build relocatable packages and set RPM_INSTALL_PREFIX. - Exported PT_USE_X11_PXGRAPH=yes to allow runs on systems which do not have JDK * Mon Jul 13 1998 Wolfgang Reimer - Version 0.7.1p1, package release 1 - config+pigiLoader patch: Make changes necessary to compile with egcs, debug version now with DLLs. Obsolete stuff for a.out format has been removed. Definition EXTRAOPTS for pigiLoader.cc ensures that stars to be loaded will be compiled with the same compiler options as pigiRpc. - "for scope" patch: Fixed obsolete code (C50IIR.pl and C50LMS.pl). - header fix patch: added/changed some include statements to fix some errors/warnings with egcs - optimizer bug patch: Changed some makefiles to work around an internal compiler error with egcs and fixed an obsolete echo message. - ptclInvokeInterp patch: Changed some makefiles to fix long standing bug (no interpreter found) with statically linked binaries. - table entry patch: Added "&" operator in table entries to get rid of egcs warnings * Tue 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). * Tue Jul 7 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 %linkbase 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