You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 46 Next »

The SLIC detector simulation package requires the setup of 7 different pieces of software. This guide is intended as a step-by-step walkthrough of installing all these packages from scratch in the Windows Cygwin environment.

It presumes nothing except a working Windows machine with internet access. Therefore, you may only need to use parts of this installation guide if you have some of the external dependencies already installed.

Preliminaries

Cygwin

  1. Download www.cygwin.com/setup.exe from the www.cygwin.com.
  2. Double-click on it.
  3. Click Next.
  4. Select Install from Internet.
  5. Click Next.
  6. Enter your preferred Root Directory.
  7. Click Next.
  8. Enter your preferred Local Package Directory, which can be the same as the Root Directory.
  9. Click Next.
  10. Select Direct Connection if it is not already.
  11. Click Next.
  12. Select a site from the Available Download Sites. Servers inside your country will probably be fastest. I use ftp://ftp.sunsite.utk.edu.
  13. Click Next.
  14. In the Cygwin Setup - Select Packages window, you need to make sure that the following tools are selected by clicking in the corresponding box under the New column until you see a version number.
    • Devel -> cvs
    • Devel -> gcc-core
    • Devel -> gcc-g++
    • Devel -> make
    • Base -> gzip
    • Base -> tar
  15. The wget tool is also useful for downloading package tarballs and zip files.
    • Web -> wget
  16. Click Next after you have selected the packages.
  17. Cygwin will now automatically download and install all the selected packages. It might take awhile, so now is the time to go get some coffee.
  18. If desired, select Create icon on Desktop or Add icon to Start Menu.
  19. Click Finish.

Testing the Cygwin Command Line Tools

  1. Select Start Menu -> Cygwin -> Cygwin Bash Shell
  2. Check that the following commands do not result in a command not found message.
    • cvs
    • gcc
    • g++
    • tar
    • wget
    • make
  3. If a command was not found, rerun the Cygwin setup to select the missing package, making sure to select Keep on the Cygwin Setup - Select Packages screen so that all the packages are not reinstalled.

Work Area

We will install all packages into a common work area.

  1. From the Cygwin shell, create a work directory for SLIC and its external dependencies.
    cd /cygdrive/c
    mkdir sim
    cd sim
    
  2. Create the file setup.sh with the following contents. (We will be adding to this file as the installation proceeds.)
    #!/bin/sh
    export sim_work=/cygdrive/c/sim
    
  3. Source the script to setup the work dir.
    source setup.sh
    

Java

Java is required for installing LCIO.

  1. Install an appropriate JDK from http://java.sun.com/ with a minimum version of 1.4.2.
  2. In your setup.sh, set JAVA_HOME and JDK_HOME to the Java installation area.
    export JAVA_HOME=/cygdrive/c/java/jdk1.4.2/
    export JDK_HOME=${JAVA_HOME}
    

The above JAVA_HOME location is an example only. You need to replace it with the correct path to your JDK.

Proceed!

You are now ready to begin the package installations.

Leave your Cygwin window open, as you will be using it throughout the installation.

Package Installations

CLHEP

There are installation instructions for version 1.9 and up http://wwwasd.web.cern.ch/wwwasd/lhc++/clhep/INSTALLATION/newCLHEP-install.html.
But you should not need them to setup the package.

  1. Create a working directory for CLHEP and go into it.
    mkdir clhep
    cd clhep
    
  2. Download the CLHEP tarball.
    wget http://cern.ch/clhep/clhep-1.9.2.0.tgz
    
  3. Unzip to your work directory.
    tar zxvf clhep-1.9.2.0.tgz
    
  4. Change to CLHEP directory.
    cd 1.9.2.0/CLHEP
    
  5. Run configure. (Takes a long time!)
    ./configure --prefix=`cd ../..; pwd` --disable-shared
    
  6. Build the library and install it. (Also takes a long time!)
    make
    make install
    
  7. Add the following to $sim_work/setup.sh
    export CLHEP_BASE_DIR=$sim_work/clhep
    

Now that the CLHEP dependency is satisfied, you should be able to install Geant4.

Geant4

Geant4 is probably the most difficult application to install of SLIC's dependencies, because there are a lot of options. I will show

  1. Return to the work dir, create a Geant4 work subdir and go into it.
    cd $sim_work
    mkdir geant4
    cd geant4
    
  2. Download the Geant4 tarball.
    wget http://geant4.cern.ch/geant4/source/source/geant4.7.0.p01.tar.gz
    
  3. Unzip it.
    tar zxvf geant4.7.0.p01.tar.gz
    
  4. Setting the following variables in $sim_work/setup.sh should allow you to compile without running the ./Configure script.
    G4INSTALL=${sim_wrk}/geant4/geant4.7.0.p01
    G4SYSTEM=WIN32-g++
    OGLHOME=/usr/X11R6
    
  5. Go into the Geant4 install dir.
    cd geant4.7.0.p01
    
  6. Build the libraries. (Maybe you should let this run overnight!)
    make
    

LCPhys

LCIO

Xerces

GDML

LCDD

SLIC

More Resources

  • No labels