SCons: An IntroductionARCHIVED COPY - Obsolete - for current version, click here. SCons is replacing CMT as the Science Analysis Systems' build tool. Chosen for its cross-platform capabilities, SCons has been described as "an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache". It is Open Source software using Python scripts to create configuration files. SConscript files are the equivalent of the requirements files currently used with CMT: they define the targets that Scons will create during the build process. (For a more detailed introduction, go to http://scons.org/.) Notes:
Tagging ConventionWith SCons, the vXrYpZ tagging convention is replaced by packageName-XX-YY-ZZ standard. For example, the old tagging convention might apply v1r2p3 to the Likelihood package. Using the new convention, this tag would become Likelihood-01-02-03, adding the package name to the tag and restricting use to 2 digit version numbering. This convention applies to container release tag as well: e.g., CMT version ScienceTools-v9r15p2 now equates to SCons version ScienceTools-09-15-02. Installer ReleasesEnd-user releases of ScienceTools provide all the binaries and associated files required for running ScienceTools applications. Note: At this time (May 19, 2010) end-user ScienceTools releases are available for download; GlastRelease releases are not. When GlastRelease end-user release builds are available, the instructions below for ScienceTools will apply.
Release Manager Builds: Directory StructureSCons builds for the various operating systems currently supported are located in their respective subdirectories of the directory:
For example, at the time of this writing, these subdirectories included:
The last redhat3 builds were made in February, 2010. SLAC will discontinue all redhat3 support in October, 2010. No new builds have been created in the subdirectories without compiler indication of the form gccXX since June, 2009. Within each of these subdirectories are two subdirectories:
So, the full path to the ScienceTools-09-15-05 build for redhat4-i686-32bit-gcc34 optimized would be: /nfs/farm/g/glast/u35/ReleaseManagerBuild/redhat4-i686-32bit-gcc34/Optimized/ScienceTools/09-15-05 The directory contents of the corresponding redhat3 build are: External Libraries: Directory StructureIn moving to SCons, it was decided to modify directory structures for the external libraries in order to provide a structure which includes compiler in its path. For example, CLHEP's include and lib directories are in: redhat4-x86_64bit/CLHEP/1.9.2.2/gcc34 The reorganized external libraries are installed at SLAC, and are available for build types as follows (note that the names have been modified to include the compiler name (e.g., redhat4-i686-32bit is now redhat4-i686-32bit-gcc32): Windows Linux – in /afs/slac/g/glast/ground/GLAST_EXT/ Mac – in /afs/slac/g/glast/ground/GLAST_EXT/ Examples: Setup Scripts for Running SCons-built ScienceTools ExecutablesYou must define values for GLAST_EXT and INST_DIR. The correct values will be determined by
For our SCons builds, there is another concept, called variant, somewhat analogous to the value of CMTCONFIG for CMT. For SCons as for CMT, binaries for different platforms may be created from the same source. The variant fully identifies the binary type (OS, compiler, debug or optimized). Typical values are redhat4-i686-32bit-gcc34-Optimized and XP-i386-32bit-vc71-Debug. Note: It is an unfortunate fact that, depending on context, variant may have a different meaning, namely just the choice between debug and optimized. For example, the command line installer uses the term variant in this way. You should also decide which mode of running you prefer: use of wrapper scripts or single setup, after which you may run the executables directly. Wrapper scripts may be found under INST_DIR/bin/variant and the actual executables are under INST_DIR/exe/variant. Example: C Shell
Example: Bash Shell
Developers Also See:
|