Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It presumes nothing except a working Windows machine (2000, XP) 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

The Cygwin Linux emulation package is a prerequisite for building on Windows.

...

  1. Download www.cygwin.com/setup.exe from www.cygwin.com.
  2. Double-click on it and click Next.
  3. Select Install from Internet and click Next.
  4. Enter your preferred Root Directory and click Next.
  5. Enter your preferred Local Package Directory, which can be the same as the Root Directory, and then click Next.
  6. Select Direct Connection, if it is not already, click Next.
  7. Select a site from the Available Download Sites. Servers inside your country will probably be fastest. I use ftp://ftp.sunsite.utk.edu.
  8. Click Next.
  9. 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.
    1. Required packages.
      • Devel -> cvs
      • Devel -> gcc-core
      • Devel -> gcc-g++
      • Devel -> make
      • Base -> gzip
      • Base -> tar
    2. Tool for downloading package tarballs and zip files.
      • Web -> wget
  10. Click Next after you have selected the packages.
  11. 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.
  12. If desired, select Create icon on Desktop or Add icon to Start Menu, and 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.
    No Format
    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.
Warning

Throughout this guide, I assume you are using bash or at least another sh-compatible shell. I take no responsibility if you decide to use csh, tcsh, et al.

Work Area

We will install all packages into a common work area.

...

Tip

Throughout the guide, any time a line is added to setup.sh, it is presumed that you also set this up in the current environment. Probably the easiest way to do this is adding to the script first and then (re)sourcing it.

Java

Java is required for installing LCIO.

...

Warning

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

Proceed!

You are now ready to start the installation.

Tip

Leave your Cygwin window open, as you will be using it throughout the installation. This will also allow the environment to be built-up incrementally as the installation proceeds.

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.

...

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, it takes a long time, and it requires several different make commands. I will describe a minimal installation procedure with support for built-in UI and visualization drivers. You can always update the libraries later if you decide to change these settings.

...

Hopefully, Geant4 has been installed successfully, and you don't have too many more gray hairs.

LCPhys

  1. Go back to the work dir.
    No Format
    cd $sim_wrk
    
  2. Checkout the physics list from CVS.
    No Format
    cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcd checkout LCPhys
    
  3. Assuming that the environment from the Geant4 installation is still in place, you can build this like any other physics list.
    No Format
    cd LCPhys
    make
    
  4. Set the LCPhys variable in setup.sh.
    No Format
    LCPHYS_BASE=$sim_wrk/LCPhys
    

LCIO

Warning

LCIO installation requires a working Java SDK.

...

  1. Go back to the work dir.
    No Format
    cd $sim_wrk
    
  2. Checkout LCIO from CVS.
    No Format
    cvs -d :pserver:anonymous@cvs.freehep.org:/cvs/lcio checkout lcio
    
  3. Add these lines to your setup.sh.
    No Format
    export LCIO=${sim_wrk}/lcio 
    export PATH=$LCIO/tools:$LCIO/bin:$PATH
    
  4. Build the libraries using the bundled aid and ant tools.
    No Format
    ant aid cpp
    

Xerces-C++

  1. Go back to the work dir, create a subdir for Xerces-C++, and go into it.
    No Format
    cd $sim_wrk
    mkdir xercesc
    cd xercesc
    
  2. Download the Xerces tarball.
    No Format
    wget http://www.apache.org/dist/xml/xerces-c/xerces-c-src_2_6_0.tar.gz
    
  3. Unzip the tarball.
    No Format
    tar -zxvf xerces-c-src_2_6_0.tar.gz
    
  4. Set XERCESCROOT for the build in your environment, only.
    No Format
    export XERCESCROOT=${sim_work}/xerces-c-src_2_6_0
    
  5. Go into the Xerces-C++ build area.
    No Format
    cd xerces-c-src_2_6_0/src/xercesc
    
  6. Configure the build.
    No Format
    ./runConfigure -pcygwin -cgcc -xg++ \
    -minmem -nsocket -tnative -rpthread \
    -P `cd ../../..; pwd`
    
  7. Build and install it.
    No Format
    make
    make install
    
  8. In setup.sh, set XERCESCROOT to the installation area and add the library path.
    No Format
    export XERCESCROOT=${sim_work}/xercesc
    export PATH=$XERCESCROOT/lib:$PATH
    

GDML

GDML's CVS is not directly accessible from the command line, but a tarball is available through a WWW interface.

  1. Download a snapshot of the current CVS head using this link in your browser. http://simu.cvs.cern.ch/cgi-bin/simu.cgi/simu/GDML2/GDML2.tar.gz?tarball=1
    • Save the tarball to sim_wrk, which should be C:\sim.
  2. Unzip the tarball.
    No Format
    tar -zxvf GDML2.tar.gz
    
  3. Change into the CPPGDML directory.
    No Format
    cd GDML2/CPPGDML
    
  4. Set GDML_BASE in setup.sh.
    No Format
    export GDML_BASE=${sim_work}/GDML2/CPPGDML
    export PLATFORM=cygwin_g++
    
  5. Configure the build.
    No Format
    ./configure --enable-geant4-vis --enable-geant4-ui --with-geant4-libtype=granular \
    --with-platform=cygwin_g++
    
  6. Build it.
    No Format
    make
    

LCDD

  1. Go to the work dir and checkout LCDD.
    No Format
    cd ${sim_work}
    cvs -d CVSROOT=:pserver:anonymous@cvs.freehep.org:/cvs/lcd checkout lcdd
    
  2. Go into the LCDD dir.
    No Format
    cd lcdd
    
  3. Configure the build.
    No Format
    ./configure --with-xerces-libname=xerces-c.dll
    
  4. Build the library.
    No Format
    make
    
  5. Set the LCDD_BASE variable in setup.sh.
    No Format
    export LCDD_BASE=${sim_work}/lcdd
    

SLIC

  1. Go to the work dir and checkout SLIC.
    No Format
    cd ${sim_work}
    cvs -d CVSROOT=:pserver:anonymous@cvs.freehep.org:/cvs/lcd checkout slic
    
  2. Go into the SLIC dir.
    No Format
    cd slic
    
  3. Set the SLIC_BASE variable in setup.sh.
    No Format
    export SLIC_BASE=${sim_work}/slic
    
  4. Configure the build with the Windows name for the Xerces-C++ lib.
    No Format
    ./configure --with-xerces-libname=xerces-c.dll
    
  5. Build the binary.
    No Format
    make all
    

If the test completes successful, you should see SLIC's usage statement as it runs and then exits.

Final Setup Script

The final setup.sh should look like this.

...

Tip

When rebuilding Xerces-C++, which you will probably not need to do once you get it working, XERCESCROOT needs to be set back to the Xerces-C++ source area rather than the installation base.

Additional Resources

SLIC Homepage
Running SLIC at SLAC