Starlink Software Distribution System

Index

bullet Distribution Policy
bullet Support and Keeping in Touch
bullet General Notes and System Requirements
bullet Starlink Software Store - Latest News
bullet Introduction - Using the Software Store
bullet Starlink Software Available for Download on the Store
bulletStarlink Software Request Forms
bullet Starlink Software `Built' Distribution
bulletStarlink Software `Built' Files
bulletStarlink Software `Source' Distribution
bulletStarlink Software `Source' Files
bulletStarlink Source Directories
bulletThe star_build script
bulletStarlink Standard Makefiles

Distribution Policy

Starlink software is available via WWW for Unix systems. The standard Starlink conditions (Now GPL!) apply to all Starlink Software Items. In obtaining any Starlink software you are deemed to have read and accepted these conditions.

Back to Index

Support and Keeping in Touch

Please report any problems you have installing/using this software to ussc@star.rl.ac.uk - we may be able to help.

Back to Index

General Notes and System Requirements

Before you download a package please read the following notes about systems requirements for running the USSC packages.
PC/Linux
The Spring 2004 release was built using the RedHat Linux distribution at v9.0 with the v2.4.20 kernel and the standard gcc integrated compiler set. It will NOT run under RedHat v7.3 and earlier. The distribution is based on glibc v2.3.2 (RedHat 9.0) should run under glibc compatible Linux distributions. The Debian 3.0r2 and RedHat Enterprise version of the software is available for download as an ISO image.
Solaris
The Spring 2004 release is built on Solaris 9 with the Workshop v6 Update 2 Compilers. In some cases the v6.2 compiler shared libraries will be required. You will need either the standard Open Windows shared libraries or one of the MIT X11 shared library sets to run CCDPACK, GAIA and the XRV GUIs. The software will NOT run under Solaris 2.5/2.5.1/2.6 and Solaris 7 due to changes to support 64bit file addressing and other system library changes.

Back to Index

Starlink Software Store - Latest News

You can get the latest information on Starlink software updates from the Software Store news page.

Back to Index

Introduction - Using the Software Store

Starlink software is distributed via WWW in the form of a shell archive file containing a tar file and the commands to unpack it and build and/or install the items it contains.

Software items are usually available ready-built for the platforms we support, and some items also as source-only to be built by you. Both forms of distribution include a README file which gives instructions for building and installing the software. Sources are supplied for all libraries and applications, but the build dependencies are only given for the libraries, you will not be able to build the applications from source.

The system for obtaining a Starlink Software Item has three main stages:

  1. Obtain the shell archive file, by selecting an item from one of the four lists of available software (Libraries, Applications, Utilities and Information) and submitting the resultant Starlink Software Request form(s). The archive file will be returned as a document with a content type of application/octet-stream. Save the file in a convenient place. Browsers will normally default to saving application/octet-stream documents onto disk - if yours does not, configure it appropriately. If the shell archive file download works for you then you can skip to stage 2 below, ignoring the information on downloading via ftp.

    Download via ftp

    The WWW can be unreliable for downloading some of the larger items in the Starlink Software Store (up to 200Mb). Furthermore, on Linux there is a problem with unpacking the shell archives produced by the Software Store which can give the error "xmalloc: execute_cmd.c:510: cannot allocate 159771854 bytes (0 bytes allocated)", this is due to a bug in Bourne shell ('sh' or 'bash'). You may be able to use the 'ash' shell in place of Bourne shell to unpack the archive.

    An alternative but more labour-intensive method has been set up. The individual files which are packaged up by the Software Store shell archive file can be obtained separately using anonymous ftp. To obtain a list of ftp links to the required files in the Software Store and instructions on how to build/install them, substitute the name of the software item you want for PKG in the following URL:

    http://www.starlink.ac.uk/cgi-store/ftpform1?PKG

    You will first be asked to submit a form specifying the Software Store format you require.

    The software item name can be found by looking at the four lists of available software (Libraries, Applications, Utilities and Information). An example from the first item in the Libraries list (AGI, Applications Graphics Interface) would look like, http://www.starlink.ac.uk/cgi-store/ftpform1?AGI. PKG can be upper or lower case.

  2. Execute the archive file using the Bourne shell or 'ash', for example:
               % sh {archive_name}
              
               % ash {archive_name}
              
    where {archive_name} is the name of the saved file. The 'ash' shell should be used under Linux if you experience trouble with Bourne shell ('sh' or 'bash'), such as out of memory errors. Executing the archive file will unpack it into a special source directory and subdirectories of it. It will then, optionally or automatically, proceed with Stage 3.

  3. For each required item:
    bulletEnsure that the source subdirectory for the item contains a `built' system (by building it if necessary).
    bullet`Install' the built files in subdirectories bin, lib, etc... of a directory designated as the top-level Starlink software directory. At Starlink sites this directory is /star.

Stage 3 is performed by the shell script star_build which is normally executed by the shell archive but may be run separately and repeatedly. It uses the individual item Starlink Standard Makefiles to build and/or install items. Throughout the process the user may be prompted to define required values or to resolve problems.

Back to Index

Starlink Software Available for Download on the Store

This is the index to the sets of software available via the Software Store. Please check the
latest news for news of additions and updated products. See Introduction - Using the Software Store for instructions on installing the downloads from the store.

Subroutine Libraries

Applications and User Interfaces

Utilities

Information

Back to Index

Starlink Software Request Forms

There are currently three types of form which users may be presented with when using the Starlink Software Store.
bulletType 1: Primarily for software libraries or simple applications or utilities, these offer a choice of format (source or built etc. depending upon what is available) and a list of any subsidiary Starlink Software Items which will be required to use the requested item. The user can choose not to take the subsidiary items if, for instance, they have already been obtained.

bulletType 2: Offers the choice of format for larger applications which are more likely to be obtained in the ready-built state and thus not require all the libraries etc. which would be required to build them. They may however require some subsidiary Starlink Software Items in order to run.

bulletType 2a: If a type 2 item requires any subsidiary items at runtime, or if 'Source only' format is requested and it requires other items to build, a type 2a form is returned when the type 2 form is submitted. This new form is similar to the type 1 but restricts the available formats of subsidiary items to those which are sensible given the choice for the main item.

Back to Index

Starlink Software `Built' Distribution

A `Built' distribution of a Starlink Software Item obtained via this WWW system will consist of compressed tar files for the item requested and, by default, for all the other Starlink Software Items which it depends upon. A shell script, star_build, together with a file containing a list of other Starlink items which the selected item depends upon is provided to unpack and install each item in turn. In addition, a README file will give instructions for installing the software.

The compressed tar file for each individual item contains the following files for a typical package (pkg appearing in a filename indicates the package name in lower case):

Built files
The built files for the package.
makefile
A Starlink Standard Makefile for the package.
mk
A script to run the make.
Documentation
Usually the appropriate Starlink User Note in LaTeX and hypertext form, and pkg.news, a news item for the latest release of the package.

The built systems are available with or without source for:
bulletAlpha_OSF/1
bulletSolaris
bulletLinux

All packages are available `without source' and some also `with source'. A `with source' distribution will also contain pkg_source.tar, the source tar file for the package.

Back to Index

Starlink Software `Built' Files

In this document pkg appearing in a filename indicates the package name in lower case.

The `built' files for a typical Starlink Software Item are:

.BUILT
A flag file indicating that the item has been built.
pkg_datestamp
A file containing details of the environment under which the package was built.
The remaining files will depend upon the package. Typically they will be:

For Subroutine Libraries

bulletObject libraries and, for appropriate platforms, shareable libraries. There are often different versions for use stand-alone (libpkg.a, libpkg.so) or with ADAM (libpkg_adam.a, libpkg_adam.so).
bulletPublic Fortran INCLUDE files and C header files (pkg_par, pkg_err, pkg.h etc.)
bulletScripts used to specify the required libraries at link-time. (pkg_link and pkg_link_adam).
bulletA script used to produce links to the Fortran INCLUDE files (pkg_dev).
bulletA file containing messages associated with error codes for this package. (fac_???_err - where ??? is some number).

For Application Packages

bulletApplication programs and scripts.
bulletADAM Interface Modules.
bulletStartup shell scripts for the package.
bulletICL startup scripts for the package.
bulletHelp files.
bulletData files etc.
bulletDemonstrations.

Back to Index

Starlink Software `Source' Distribution

A `Source' distribution of a Starlink Software Item obtained via this WWW system will consist of compressed tar files for the item requested and, by default, for all the other Starlink Software Items which it depends upon. A shell script, star_build, together with a file containing a list of other Starlink items which the selected item depends upon is provided to unpack and build and install each item in turn. In addition, a README file will give instructions for building and installing the software.

The compressed tar file for each individual item contains the source files for the item.

Back to Index

Starlink Software `Source' Files

The 'source' files for a typical package are as follows (pkg appearing in a filename indicates the package name in lower case):

pkg_source.tar
A tar file containing all the program source, include files and scripts, etc. for the package.
makefile
A Starlink Standard Makefile for the package.
mk
A script to run the make.
Documentation
Usually the appropriate Starlink User Note in LaTeX and hypertext form, and pkg.news, a news item for the latest release of the package.
 
Back to Index

Starlink Source Directories

It is recommended that the same top-level directory is used for the source of all Starlink Software Items. The shell archive contains commands allowing you to define this top-level directory. Initially the default is $HOME/star/source but the name of the directory chosen will be written into $HOME/.star_config and used as the default for unpacking any further Starlink Software Items you obtain.

In what follows, `pkg' is the name of the primary Starlink Software Item which you have obtained (e.g. hds or kappa) in lower case, and `PKG' is the name in upper case.

Having unpacked the shell archive, you should have the following files in your top-level Starlink source directory.
bullet README -- Instructions
bullet star_build -- A procedure to check and, if necessary, build and/or install a Starlink Software Item and all the items it depends upon.
bullet pkg_needs -- A list (possibly empty) of the items needed to build, install and use PKG.
bullet pkg_needs_run -- Where appropriate, a list of items required to install and use a ready-built version of PKG.
bullet Various subdirectories containing compressed tar files for the required Starlink Software Items. Each subdirectory has the name of the item in lower case.

Back to Index

The star_build script

Purpose:
Check and, if necessary, build and/or install a Starlink Software Item and all the other items required by it. It is also possible to execute certain targets of the Starlink Standard Makefiles for the items.
Invocation:
% star_build item [level]

item
is the name of the item (case independent).
level
optional, indicates the function to be performed.
bullet1 (default) Build a complete system.
bullet2 Build a subdirectory.
bulletdeinstall - `deinstall' item and its subsidiaries.
bulletclean - `clean' the source directories of item and its subsidiaries.
bulletunbuild - `unbuild' item and its subsidiaries.
bulletcheck - `check' the state of item and its subsidiaries.
Description:
It is assumed that the current directory contains:
  1. File pkg_needs (where pkg is the lower case of the item name), containing a list (possibly null) of the items needed to build or use item.
  2. Where applicable, file pkg_needs_run containing a list of the items needed by item at run time.
  3. Subdirectories, one for each of the items needed by item which are required to be built/installed.

If level is 1 or not present, all the items needed by item and then item itself will be checked and built and/or installed if necessary. star_build will obtain values for the environment variables INSTALL, STARLINK and SYSTEM (used by Starlink Standard Makefiles ) by prompting the user as required. Suitable suggested values will be offered and the chosen values saved for use as suggested values in subsequent invocations. Level 2 of star_build is then called for each of the items listed in the pkg_needs file and any pkg_needs_run file and, finally, for item itself.

If level is 2, star_build has been called from level 1 to build/install the named item. Level 2 must not be specified directly by users as it assumes that all required environment variables have been set.

If the subdirectory corresponding with the named item contains a Starlink export compressed tar file, it is assumed that a new version of the item has been obtained unless the directory also contains a .BUILT file which is newer. (Any .BUILT file extracted from the tar file is touched to flag the extraction.) If there is a new version, any existing version is deinstalled and unbuilt and the new version extracted and built and/or installed in its place.

If level is one of the other permitted values, values for INSTALL and STARLINK are found as for level 1 and if they are the same, make is performed on the specified target for any dependencies listed in the pkg_needs and/or pkg_needs_run file, and then for item itself. If INSTALL and STARLINK are different, only item itself is processed.

Item HTX is treated as a special case and handled last as it may be required to deinstall any of the other items.

Back to Index

Starlink Standard Makefiles

Targets

Each Starlink Software Item has its own makefile with the following targets:
bulletbuild - Build the libraries and executables etc. in the source directory.
bulletinstall - Install items beneath a top-level directory defined by the macro INSTALL.
bullettest - Run an installation test.
bulletclean - Remove intermediate files used in the build.
bulletdeinstall - De-install the software from the INSTALL hierarchy.
bulletunbuild - Remove built files from the source directory.
bulletcheck - Report on current build/installation status.
bulletexport_source - Produce a compressed tar file of all the source files.
bulletexport - Produce a compressed tar file of the 'built' system together with the source.
bulletexport_run - Produce a compressed tar file of the 'built' system without the source.

The mk Script

The makefiles are always run via a shell script (mk)

% mk build

mk sets up environment variables as required for various platforms according to the value of environment variable SYSTEM. These environment variables are imported into the makefiles to ease the task of building and installing for a particular platform.

Currently the following values of SYSTEM are handled:

alpha_OSF1
For DEC Alpha_OSF/1. (No longer fully supported.)
sun4_Solaris
For Sun Solaris.
ix86_Linux
For Intel PC Linux
sun4
For SunOS/4. (No longer fully supported.)
mips
For DEC Ultrix. (No longer fully supported.)
unknown
Likely options for other platforms.

The build Target

The build target will extract source files from the source tar file and compile and link as necessary to produce the `built' files for the item - the built files remain in the source directory. Other Starlink software items on which the build depends are expected to be found beneath a top-level directory defined by the macro STARLINK which is usually inherited from the environment variable but will default to /star.

The install Target

The install target will install the built files in subdirectories of a top-level directory defined by the macro INSTALL which is usually inherited from the environment variable but will default to the user's HOME directory. In most cases the installation process will just leave a link to the installed file in the source directory. Subdirectories of $INSTALL will be automatically created as required. The hierarchy beneath $INSTALL is:
bullet/bin - to hold executables - applications often have their own subdirectories.
bullet/dates - to hold build date_stamp files
bullet/docs - to hold Starlink documents. Where hypertext versions of the documents are available, they will be linked, using the Starlink HTX system, to other Starlink documents, locally-held versions in preference but, failing that, via the Starlink document server to versions held at RAL.
bullet/etc - to hold miscellaneous files.
bullet/help - to hold help files and error messages - applications often have their own subdirectories.
bullet/include - to hold public Fortran INCLUDE files and C header files
bullet/lib - to hold subroutine object libraries.
Note that care is needed if INSTALL and STARLINK point to different directories.

The test target

Builds and runs a simple test program to check for correct installation of the package.

The check target

Performs a simple check that all necessary source files are present, and displays the version number and current state of the package (built/installed/tested, etc.).

The deinstall target

Reverses the action of the install target, removing files from sub-directories of the $INSTALL directory and restoring them to the source directory

The clean target

Cleans up after building the package, removing all intermediate files created during the building process, but leaving the built files themselves.

The unbuild target

Reverses the building process, removing all intermediate files along with all the built files. The installed system will still be usable.

The export targets

These produce compressed tar files of the item for export to other sites. They are written into the directory defined by the macro EXPORT, which is usually inherited from the environment variable but will default to the current directory. The compressed tar files for item pkg are named as follows:
bullet pkg.tar.Z (export_source).
bullet pkg_system.tar.Z (export built for system system).
bullet pkg_system_run.tar.Z (export_run built for system system).

Back to Index



CLRC Home SSTD Home Starlink Home

Alan Chipperfield, Starlink, ajc@star.rl.ac.uk

Stephen Rankin, Starlink, ser@star.rl.ac.uk

24 12 2004