Instructions for Installing CM-5 C* Version 7.2 Introduction This is the installation guide for CM-5 C* Version 7.2 . Read it completely before attempting the installation. Planning the Installation General Perform the installation as superuser. When answering any question during the installation, you can accept the default (which is indicated in square brackets) by simply pressing the RETURN key in response to the question. Choosing a Tape Drive The installation may be performed from either a local or a remote tape drive. You should decide on which type you will use. In general, a local tape drive is preferred. Next, find the name of the non-rewinding tape device that you will be using for the installation. On a Sun, the cartridge tape is often /dev/nrst8. If you are not sure of the device name for your tape drive, check with your system administrator. Last, if you have decided to use a remote tape drive, make sure that you have root access to the remote system by executing the following command on the system where C* is to be installed: # rsh remote_host_name date If you receive a "Permission denied" message, you need to add the name of your machine to the /.rhosts file on the remote machine. Installation Components The entire installation uses about 9 Mb of disk space. All of the files for the C* compiler can reside in their own tree rooted at a single top-level directory. We recommend that this top-level directory be /usr/cstar-7.2/, but any other directory may be chosen. If installed in its own top-level directory, this C* release can co-exist with other C* releases. It is possible to install this C* compiler directly into the /usr directory tree along with other CMOST software. However, because the C* and CMOST software are released independently, installing the C* compiler in a separate directory tree such as /usr/cstar-7.2/ simplifies managing different CMOST and C* releases. Reading the Tape The C* installation may be done from either a local or remote tape drive. In either case, the first step is to extract the top-level compiler components. To do this, first become superuser and change to the top-level directory into which you will install C*. Mount the tape as you normally would. Then issue the command: # /usr/etc/extract-unbundled After the tape is read, extract-unbundled invokes the C* installation script ./etc/build_cs_driver. If the installation is interrupted and restarted after the tape is read, or if it is configured incorrectly, build_cs_driver can be invoked again manually. Installing C* Version 7.2 You will be prompted for some information that will be written into the driver's configuration file. (In the 7.2 release, the "build_cs_driver" script does not actually build the "cs" driver, but still must be run.) In the example below, sample responses are shown where they differ from the default responses, shown in brackets. Simply pressing return always accepts the default response. Answering the Questions The first set of questions asks you which machines you want the driver to work with. Be sure to enable your driver for CM-5 and CMSIM. Only enable CM-2/200 if you have the CM-200 C* compiler installed on the same machine(s) as the CM-5 C* compiler. If you enable CM-2 and/or CM-200, they appear as choices for default target machine. Note that the CM5 default mode is VectorUnit since most machines have vector units. If your machine does not have vector units, you should answer "S" to this question. C* Driver ("cs") Configuration The C* driver should only be enabled for the target machines for which you have a compiler. An error will result if you try to compile for a target for which there is no compiler. If more than one target is enabled, a default target can be specified. Enable for CM2? (yn) [y] Enable for CM200? (yn) [y] Enable for CM5? (yn) [y] Enable for CMSIM? (yn) [y] Default target machine? (CM2 CM200 CM5 CMSIM) [CM2] CM5 CM5 default mode? (Sparc/VectorUnit) [VU] You will be asked several questions about the pathnames of directories that must be known to the C* driver. In all cases these must be pathnames that are valid on any machine from which users will run the compiler. If the installation machine mounts these directories differently, you will need to specifiy those pathnames. The first set of pathnames concerns where the C* software is installed. These pathnames are normally the bin, lib, and include subdirectories of the directory into which you unloaded the tape: In which directory will C* binary files be found? [/usr/cstar-7.2/usr/bin] In which directory will C* library files be found? [/usr/cstar-7.2/usr/lib] In which directory will C* include files be found? [/usr/cstar-7.2/usr/include] The next pathnames concern where CMOST binary, library, and include files are installed. On a CM-5 partition manager these are normally the /usr/bin, /usr/lib, and /usr/include directories. On machines that are set up to cross-compile for the CM-5, they may be installed in other locations such as /usr/cm5/bin, /usr/cm5/lib, and /usr/cm5/include. In which directory will CMOST binary files be found? [/usr/bin] In which directory will CMOST library files be found? [/usr/lib] In which directory will CMOST include files be found? [/usr/include] The next pathnamess concern the location of some libraries that may be linked into C* programs. These libraries are not necessary for using C*, but if they are installed, then specifying these pathnames will allow users to link with these libraries more easily by using the "+l" linking option. CMF libraries are necessary when linking CMF objects into C* programs and for C* programs that call CMSSL routines. They are normally installed in the standard CMOST library directory. This directory should contain the libraries libcmfcompiler.a, libcmfffio_cmfs.a, and so on. It should correspond to the version of CMF that users by default will use. A dash [-] means these are not available. In which directory will CM Fortran library files be found? [/usr/lib] Sun F77 libraries are necessary when linking F77 objects into C* programs. This directory should contain the libraries libF77.a, libV77.a, and so on. A dash [-] means these are not available. In which directory will F77 library files be found? [/usr/lib] X11 libraries are necessary when using CMX11 with C* programs. They are normally installed in the standard CMOST library directory or in /usr/local/lib. This directory should contain the libraries libX11.a, libXt.a, and so on. A dash [-] means these are not available. In which directory will X11 library files be found? [/usr/lib] AVS libraries are necessary when using CMAVS with C* programs. They are normally installed in /usr/avs/lib. A dash [-] means these are not available. In which directory will AVS library files be found? [/usr/avs/lib] The next question determines the version of Prism CM Profiling that is enabled by the -cmprofile switch. If you select version 1 because you do not have the proper version of Prism available, be sure to re-configure the driver when you get a newer version of Prism. A new CM Profiling mechanism supported by the C* compiler can only be used with new versions of Prism. If you have Prism version 2.0 Beta or later installed, you configure the compiler to use this new mechanism (version 2). Otherwise, select the old mechanism (version 1). Which CM Profiling mechanism should be enabled by the -cmprofile switch? (1/2) [2] The next question gives you an opportunity to set up a file that allows you to log invocations of the compiler. Since this file can grow quite large, and is not particularly useful at customer sites, we recommend that you simply press return to indicate that no logging is to be done. To log compiler invocations, enter the pathname of a log file that is writable by everyone: The script now edits the driver's configuration file to set the driver defaults and library locations specified above: Editing driver config file /usr/cstar-7.2/usr/lib/cstar-config Adding locations of library directories ... done. The next two questions will be asked only if the CM-2 and/or CM-200 targets were enabled. They allow the Paris (CM-200) C* driver to be replaced by the CM-5 C* driver, which will then invoke the Paris driver when appropriate. We recommend that the defaults be accepted. In which directory is the Paris C* driver (cs) installed? A dash [-] means Paris C* not installed (or already renamed) [/usr/local/bin] The new cs driver can replace the Paris C* driver by renaming the Paris C* driver to cs-paris, then installing the new driver in its place. The new driver will invoke cs-paris whenever -cm2 or -cm200 is specified, or by default if CM2 or CM200 is the default machine. Replace the Paris C* driver with the new cs driver? (yn) [y] The last question allows the installation script to create a link from a standard binary dir (default /usr/bin) to the C* driver in the installation area. Users must place /usr/cstar-7.2/usr/bin in their paths unless a link is made from a standard executable dir to: /usr/cstar-7.2/usr/bin/cs Please enter the dir from which a link should be made, or a dash [-] to indicate that no link should be made. [/usr/bin] The script saves its directory defaults and is then complete: Saving directory defaults in CSDRIVEROPT The C* installation is complete. Testing the Installation We recommend compiling and running the primes.cs sample program from the examples directory to test the installation. It should print the prime numbers below 256.