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

Compare with Current View Page History

« Previous Version 9 Next »

Introduction

We are planning to move away from CMT as our build tool in favor of a the more flexible SCons.  What is SCons?  "SCons is an Open Source software construction tool---that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software." - http://scons.org/

Getting Started

The current version of SCons installed at SLAC is version 1.0.1, the current release version of SCons is 1.1.  Those starting out with SCons are free to use the current release 1.1.

SLAC Linux

SCons is installed at SLAC in /afs/slac/g/glast/applications/SCons 

Desktop Machines

Prerequisites: 
Python 2.5.1 available from the installer [see the workbook for details]
CVS access [see the workbook for details]

Obtain SCons from http://scons.org

Taking SCons for a Test Drive

Please Note:  As of November 21, 2008, ScienceTools is the only checkout package fully prepared to be built using SCons.  GlastRelease is a work in progress.

External Libraries

In our move to SCons we have decided to also modify our directory structures for the external libraries

Obtaining a copy of the code from CVS

cvs co -r ScienceTools-v9r8p2 ScienceTools-scons

After the completion of this command you would enter the ScienceTools-scon directory that was created. In this directory there is the SConstruct file that is read by SCons.

To get a list of options added to SCons specifically for ScienceTools you can issue the command:

scons --help

These options have been programmed into the SConstruct and support files for ScienceTools. They are not written or supported by the SCons developers. To see the options that are written and supported by the SCons developers you need to issue the command

scons -H

Building only a specific package (and its dependencies)

To build only a single package simply specify the package name as the target. For example, to build facilities (and its dependencies) issue the following command along with any other options necessary

scons facilities

Ignoring errors

By default SCons will stop compilation after the first error it encounters. Since the first error is most likely not in a package of interest, one can tell SCons to continue building after it encounters an error. To do this you append the -i option to the SCons command.

References

https://confluence.slac.stanford.edu/display/SAS/SCons

http://www.slac.stanford.edu/exp/glast/ground/software/notes/GoGui/GoGui-use.shtml

  • No labels