Annoucing BRAG and BREG

We're happy to announce the release of two new BRAHMS software packages: BRAG and BREG.

This outlines the building and installation procedure of these two pacakges. Please read carefully. See also individual README files in the source trees.

Contents

BRAG (BRAhms GEANT)
BREG (BRahms Event Generators)
Building and installing
Autotools
Configure information
  Finding CERNLIB
  Special note for BREG
Choosing the prefix
  Recomendations
CVS Tags and version numbers

BRAG (BRAhms GEANT)

This is our GEANT3.21 detector simulation, the software previsouly known as GBRAHMS. The somewhat ad hoc build system of the old GBRAHMS has been replaced by Autotools, since the upcoming BRAT2 will use those tools. This allows for a homogenious build system, easier installation - in short software management - as well as development.

BREG (BRahms Event Generators)

This is a set of programs and libraries for various event generators, as well as a common shared library. This package was formerly split in 6 packages: EG, EGREAD, FRIT702, HIJING, NEXUS, URQMD, and VENUS. This has now been collected in one package with the subpackages base, brfritiof, brhijing, brnexus, brrqmd, brurqmd, and brvenus. Please note, that brrqmd does not compile under Linux yet. The package uses Autotools as the build system.

Building and installing

  1. You need to have Autotools installed (see below)
  2. Get the source tree you want.

    This can be done in two ways:
    1. From CVS
      1. Get directly from CVS the development sources:
         
                      cvs -d /afs/rhic/brahms/BRAHMS_CVS checkout <package> 
                      
      2. Get a specific release:
          
         	      cvs -d /afs/rhic/brahms/BRAHMS_CVS export -r <tag> <package> 
        	      
        See more on CVS tags below.
      In any case, you should now change directory to the source tree:
                    cd <package> 
                    
    2. Via Tar-ball

      You can get a tar ball from a checked out source tree by entering the a configured source tree and then execute
                    make dist 
                    
      This will give you the tar-ball <package>-<version>.tar.gz, which you may transfer where ever you like, and then unpack
         
                    gzip -dc <package>-<version>.tar.gz | tar xf - 
                    
      which gives you the sources in the directory <package>-<version>. Now go to that directory:
       
                    cd <package>-<version> 
                    
  3. Set up the pacakge Autotools.

    If you got the sources directly from CVS, you need to prepare the Autotool for building the package. If you got the tar-ball, this is already done for you so skip this step.
                  aclocal -I config 
     	      automake -a 
     	      autoconf 
                  
    This step is normally only needed the first time you get the sources into you working area.
  4. Configure the source tree.

    At this time, we need to setup the source tree and build scripts to fit your particular system. Simply do
                  ./configure 
                  
    You may want to pass options to the configure script. Try ./configure --help for a full list of avaliable options. In particular note the --prefix option (see also below).
  5. Build and install.

    Now we are ready to build and install the package. Just do:
                  make 
      	      make install 
                  
    On most systems, you can lumb this into one, by simply saying make install

    If make isn't GNU Make, you may need to say gmake or install GNU Make on your system (see more below).

    Skip this step if you are meerly obtaing the sources from RCF to build on your home system.

  6. Building a tar ball

    You may want to make a distribution tar ball. You don't need to have build the package first, but you do need to have configured your source tree. Simply do:
                  make dist 
                  
    This will give you the tar-ball <package>-<version>.tar.gz
  7. Checking the build.

    A package may define a testsuite, which you may want to run before installing. First build the package and then run the test suite:
     
                  make 
    	      make check
                  
    If everyting worked fine, install the package
                  make install 
                  
  8. Get your shell to be able to find the program

    Include in your path the directory where the program was put, which per default is ${HOME}/bin (see also below on --prefix)

Configure information

Finding CERNLIB

Some BRAG and BREG packages depend on CERNLIB being installed. The build system need to know where the libaries are installed. per default it will look in

      /usr                        
      /usr/local                  
      /usr/local/cern             
      /usr/local/cern/pro         
      /usr/local/cern/new         
      /usr/local/cern/old         
      /cern                       
      /cern/pro                   
      /cern/new                   
      /cern/old                   
      /opt/cern                   
      /opt/cern/pro               
      /opt/cern/new               
      /opt/cern/old               
      /afs/cern.ch/asis/cern/pro  
      /afs/cern.ch/asis/cern/new  
      /afs/cern.ch/asis/cern/old  
  
This may be overridden by passing the --with-cern-libraries --> option to the configure script.

Special note for BREG

The BREG sub-packages brfritiof, and brvenus depends on the base BREG package being installed, as well as CERNLIB. Therefore, when you install BREG, take care to put it somewhere you can easily find, and can easily be accesed by the build system. Per default build system looks for BREG base headers and libraries in

      /usr/[lib|include]
      /usr/local/[lib|include]
      /usr/local/brahms/[lib|include]
      /opt/brahms/[lib|include]
      /opt/brahms/new/[lib|include]
      /opt/brahms/pro/[lib|include]
      /opt/brahms/old/[lib|include]
      /afs/rhic/opt/brahms/[lib|include]
      /afs/rhic/opt/brahms/new/[lib|include]
      /afs/rhic/opt/brahms/pro/[lib|include]
      /afs/rhic/opt/brahms/old/[lib|include]
      ${HOME}/[lib|include]
      ${HOME}/brahms/[lib|include]
  
This can be overridden by passing the --with-breg-libdir and --with-breg-incdir options to ./configure.

Autotools

Autotools is a common name for GNU Automake, GNU Autoconf, and GNU Libtool. These tools are extensively used in the OpenSource community and elsewhere for building software packages.

Autotools is commonly installed on GNU/Linux machines, and very often on Un*x machines. If your particular system have got these three packages, don't dispear, you have a number of options (ordered by our recomendation):

  1. If you have SysOp privileges on your machine, you may want to install it in the system directories.
  2. If you don't have SysOp privileges, do steps 1 above, but in step 3, you should pass a directory you can write to via the --prefix option
    	      cd <package>-<version>
    	      ./configure --prefix=<my directory> 
    	      
    Please see below on choosing the prefix.
  3. If you have AFS access, use the Autotools installed in
              /afs/rhic/opt/brahms/pro 
              
    Just put /afs/rhic/opt/brahms/pro/bin in your PATH

    The Autotools installed on the AFS area will track the ones distributed with Redhat Linux version installed on the RCAS machines.

Some Make implmentations are fairly buggy (Digital Unix for one), so if you don't have GNU Make installed on your system, We strongly sugggest you do that before installing Autotools. The procdure is the same as above. You can find GNU Make in gnu/make at a GNU FTP mirror site.

Choosing the prefix

When installing packages, either the BRAHMS or third-party ones, you need to give a little thought to where you want to install it.

The packages will be installed in a tree like

  <prefix> -+- bin
	    +- include/<package>
	    +- lib
	    +- man 
	    +- libexec 
	    +- share/<package> 
	    +- var
  
where <prefix> is the chosen prefix via the --prefix=<prefix> option. To use the pacakge, just make sure that <prefix>/bin is in your PATH. No other environment variable should be set.

Recomendations

  1. We recommend using the same prefix for all BRAHMS software packages, and that you install ROOT under the same prefix (use option --prefix to ROOT's configure script).
  2. If you need to install Autotools, and you don't have SysOp privileges, we recommend you install them using the same prefix as for the BRAHMS software.
  3. If you wan't to have an old, pro, and new set of packages, we recommend you put all packages into one tree with the appropiate topprefix:
                  <topprefix>-+- new         --prefix=<topprefix>/new
                              |
    	       	          +- pro         --prefix=<topprefix>/pro
    	       	          |
    	       	          +- old         --prefix=<topprefix>/old 
                  
    Then when you configure you source tree, you'll pass it the options listed on the right. This is the way the AFS diretories are organised.

    This allows user to easily choose which version to use, by simple putting <topprefix>/<version>/bin in her PATH before all other BRAHMS paths.

  4. We recomend using one of the prefixes:
                  /usr                  <= Need SysOp privileges 
                  /usr/local            <= Need SysOp privileges  
                  /usr/local/brahms
                  /opt/brahms           
                  ${HOME}               <= Default
                  ${HOME}/brahms
                  

CVS Tags and version numbers

BRAG Tags will always be of the form

     BRAG-<major>-<minor>-<revision> 
     
and BREG tags will be of the form
     BREG-<major>-<minor>-<revision> 
     
Sub-packages of BREG will usually not have individual tags. But if they do, they'll be of the form
     <subpackage in capitals>-<major>-<minor>-<revision> 
     
In all of the above, The tags should always correspond to the package version number as defined in the AM_INIT_AUTOMAKE macro in the configure.in file in top-level source directory of BRAG or the BREG sub-packages. The format of that macro is:
     AM_INIT_AUTOMAKE(<package>, <major>.<minor>.<revision>) 
     
Not that this is the only place that a version bump may occure, and it sould always be followed by a tagging of the CVS repository with the appropaite tag as outline above.
Flemming Videbæk <mailto:videbaek@bnl.gov>
Kris Hagel <hagel@comp.tamu.edu>
Christian Holm Christensen <cholm@nbi.dk>