/lamp

Scripts to build the GENIE support libraries and then GENIE on *nix.

Primary LanguageShell

READ ME FIRST!

Note: Support for GENIE v3 is managed through rub_the_lamp_v3.sh, which is not part of any of the R-2_* tags/releases. The menu options are essentially the same as for rub_the_lamp.sh, so the rest of this README should be applicable to rub_the_lamp_v3.sh.

This version of lamp/rub_the_lamp.sh is designed to work with GENIE R-2_12_10. It should also work with R-2_10_2, but earlier versions may require checking out older tags of lamp (see below).

It is a good idea to use a tagged version of the lamp for work on GENIE v2. The latest recommended tag for GENIE v2 is R-2_12_10.0. Use the following command to check it out (and read below for more if you're really interested). For GENIE v3, the current best practice is to use the latest version of the lamp. After cloning the repository, cd into the lamp directory and run:

git checkout -b R-2_12_10.0-br R-2_12_10.0

Run ./rub_the_lamp.sh -h to get a help menu. If you run into trouble, please consult the "Trouble-Shooting" section below. If you find a bug, please feel free to contact Afroditi Papadopoulou (apapadop at mit.edu) or open an issue on GitHub.

NOTE: On May 4, 2015 the GENIE SVN repository on HepForge was re-orgnaized, breaking the SVN checkout path in some versions oflamp. Please check the version tags and use one appropriate for your needs with respect to this change. If you continue to have checkout problems for a specific version of GENIE, please let Afroditi know or open an issue on GitHub.

Let GENIE out of the bottle!

                                          ..                               
                                         dP/$.                             
                                         $4$$%                             
                                       .ee$$ee.                            
                                    .eF3??????$C$r.        .d$$$$$$$$$$$e.
 .zeez$$$$$be..                    JP3F$5'$5K$?K?Je$.     d$$$FCLze.CC?$$$e
     """??$$$$$$$$ee..         .e$$$e$CC$???$$CC3e$$$$.  $$$/$$$$$$$$$.$$$$
            `"?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$b $$"$$$$P?CCe$$$$$F
                 "?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$b$$J?bd$$$$$$$$$F"
                     "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$d$$F"           
                        "?$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"...           
                            "?$$$$$$$$$$$$$$$$$$$$$$$$$F "$$"$$$$b         
                                "?$$$$$$$$$$$$$$$$$$F"     ?$$$$$F         
                                     ""????????C"                          
                                     e$$$$$$$$$$$$.                        
                                   .$b CC$????$$F3eF                       
                                 4$bC/%$bdd$b@$Pd??Jbbr                    
                                   ""?$$$$eeee$$$$F?"                      

Tags and versioning

When first checking out this package, you will have the HEAD version of the master branch. Get a specific tagged release by checking out the tag into a branch like so:

git checkout -b R-2_12_10.0-br R-2_12_10.0

This will checkout tag R-2_12_10.0 into branch R-2_12_10.0-br. You want to checkout into a branch to avoid being in a "detached HEAD" state.

Check the releases page to be sure you are using a version of lamp that is appropriate for the version of GENIE you want to use. lamp has been tested for GENIE R-2_8_0 and later. It may not work with earlier versions. You will need to check out an older release of lamp to work with the 2.8 series.

You can do this with a branch checkout command that will switch to the version of the code matching the tag and also put you on a separate branch (away from master) in case you want to make commits, etc. See the VERSIONS.md file in this package for more information.

  • The latest tagged version is 2.12.10. To use 2.12.10, you want tag "R-2_12_10.0":

      git checkout -b R-2_12_10.0-br R-2_12_10.0
    
  • To use 2.10.0, you probably want tag R-2_10_0.0:

      git checkout -b R-2_10_0.0-br R-2_10_0.0
    
  • To use 2.8.6, you probably want tag R-2_8_6.5:

      git checkout -b R-2_8_6.5-br R-2_8_6.5
    
  • If you have created a repo with a different name or naming structure from those expected by lamp, you will need to update this script or rename your repository. This script expects repositories in HepForge to look like R-X_Y_Z and in GitHub to look like GENIE, with the version set by the branch name. You may grep this script for the checklamp function to see how the major, minor, and patch version numbers are managed.

Basic Usage

If you rub the lamp, you will let GENIE out of the bottle! Running the script with no arguments will produce the help menu:

Welcome to "rub_the_lamp". This script will build the 3rd party support packages
for GENIE and then build GENIE itself.

Usage: ./rub_the_lamp.sh -<flag>
             -h / --help   : Help
             -g / --github : Check out GENIE code from GitHub
             -f / --forge  : Check out GENIE code from HepForge
                             (DEFAULT)
             -u / --user   : Specify the GitHub user
                             (default == GENIEMC)
             -t / --tag    : Specify the HepForge SVN tag
                             (default == R-2_12_10)
                             Available: use ./list_hepforge_branches.sh
             -b / --branch : Specify the GitHub GENIE branch
                             (default == R-2_12_10)
             -p / --pythia : Pythia version (6 or 8)
                             (default == 6)
                             8 is under construction! Not available yet.
             -n / --nice   : Run make under nice
                             (default == normal make)
             -o / --root   : ROOT tag version
                             (default == v5-34-36)
             -s / --https  : Use HTTPS checkout from GitHub
                             (default is ssh)
             -c / --force  : Archive existing packages and rebuild
                             (default is to keep the existing area)
             -v / --verbose : Install Support packages with verbose mode
                              turned on.
             -d / --debug  : Build GENIE with debugging symbols. (Also impacts
                             support libraries.)
             --svnauthname : HepForge user name (SSH credentialed checkout)
                             (default is anonymous checkout)
             --support-tag : Tag for GENIE Support
                             (default is R-2_11_0.0)
             --no-roomu    : build without RooMUHistos (requires Boost)
                             (default is to use RooMUHistos)

  All defaults:
    ./rub_the_lamp.sh
  Produces: R-2_12_10 from HepForge, Pythia6, ROOT v5-34-36

  Other examples:
    ./rub_the_lamp.sh --forge
    ./rub_the_lamp.sh -f --tag trunk
    ./rub_the_lamp.sh -g -u GENIEMC --root v5-34-24 -n

Note: Advanced configuration of the support packages may require inspection of
that script.

This script only supports Linux. It may support Mac OSX in the future (we hope).

Pythia

Checking out Pythia version 8 is an option, but GENIE will not currently build against it. Please specify only Pythia version 6 for now.

ROOT

As of now, the lamp only supports ROOT5. The internal build scripts do not work for ROOT6. That would be a nice community contribution! See GENIESupport.

Checking Available HepForge Tags

If checking out from HepForge (recommended except for very specific development tasks), you may see the available tags with:

Usage: ./list_hepforge_branches.sh

Trouble-Shooting

Sometimes you may run into permissions troubles with https or ssh, so toggle usage of the -s flag if you are gettting "permission denied" errors.

If the build fails it is important to check the logs for each of the 3rd party support packages installed under GENIESupport. It is possible you are missing requirements for those packages to build. ROOT especially requires a large number of libraries to be installed. See the provisioning scripts in the Wayfarer project for clues on libraries your system may be missing.

One common set of errors involve log4cpp; it is likely in this case that you are missing the autoconf tools. In that case, you can install them with a package manager:

  • sudo apt-get install autoconf (Ubuntu)
  • yum install autoconf (RedHat/SLF)
  • Download source from GNU and build.
  • etc.

This is a bash script, so some errors will likely occur under different shells. If you get errors, make sure /bin/bash exists and it is not a link to a different executable.

If there is a strong desire for a c-shell or some other version of this script, we welcome a translation!

Contributors

Please contact Afroditi Papadopoulou (apapadop "at" mit.edu) for complex inquiries, etc.


ASCII Art from Chris.com.