Build LBNE Software Suites
This package is used to build the software suites for LBNE. It makes use of waf and worch.
Note: this is not yet ready to use. Soon!
Prerequisites
On all platforms, some OS-level packages are implicitly required.
- compiler
- a compiler capable to build the version of GCC from source
- autoconf
- and related tools
Red Hat Enterprise based (eg. Scientific Linux)
A base install of SL6.4 has most of the packages required. The exceptions are:
- t.b.d.
Debian based (eg. Ubuntu)
You will need at least these:
$ sudo apt-get install \ libbz2-dev libx11-dev libxmu-dev \ libgl1-mesa-dev libglu1-mesa-dev \ doxygen-latex libtool libbz2-dev \ libreadline-dev automake libncurses5-dev \ tcl8.5-dev
Fedora Core 20
Starting from a base netinst
of FC20 here are the packages that need to be installed:
$ sudo yum install python-virtualenv git gcc-c++ m4 subversion patch automake flex \ ncurses-devel zlib-devel libtool bzip2-devel \ libX11-devel libXmu-devel libXpm-devel libXft-devel \ mesa-libGL-devel mesa-libGLU-devel \ doxygen-latex tcl-devel \ libtool libbz2-dev libreadline-dev automake \ expat-devl readline-devel krb5-devel
Instructions
The build environment is provided by a few Python modules. It is recommended that these be installed into a virtualenv
virtual environment. To set up for this do:
$ virtualenv /path/to/venv $ source /path/to/venv/bin/activate
The rest of the instructions assume this.
Install the latest release build environment
Releases of lbne-build
and its few dependencies are placed on PyPI and may be installed simply via:
$ pip install lbne-build
Installing an older release
T.B.D.
Selecting the suite to build
The installation is driven by a top level configuration file which will be found:
$ ls /path/to/venv/share/worch/config/lbne/suite-*.cfg
Prepare for building
The build will need a substantial amount of disk space (10βs of GB) for intermediate build products. This is best located on fast, local disk. After the build is complete, it can be removed or, if more than one suite is desired, reused to avoid rebuilding shared packages multiple times. A final installation location must also be determined. This will require many GBs of space. With the suite name determined from the above listing the build is configured with:
$ cd /path/to/build $ cp /path/to/venv/share/worch/wscripts/lbne/wscript . $ waf --prefix=/path/to/install \ --orch-config=lbne/suite-<SUITE>.cfg \ configure
Building the software
Finally, to kick off the build one simply runs:
$ waf
The intermediate files will be populated below the directory ./tmp/
.
Development
To develop lbne-build
itself you need a way to edit its files,
install and exercise them.
Either create a new Virtual Environment (run βdeactivate
β to deactivate the current one from any activated shells) or reuse the one from above. The initial setup goes like:
$ virtualenv /path/to/venv $ source /path/to/venv/bin/activate $ mkdir -p /path/to/work $ cd /path/to/work $ git clone git@github.com:brettviren/worch-ups.git $ cd worch-ups $ python setup.py sdist $ pip install dist/worch-ups-X.Y.tar.gz $ cd .. $ git clone git@github.com:LBNE/lbne-build.git $ cd lbne-build $ python setup.py sdist $ pip install dist/lbne-build-X.Y.tar.gz $ cd ..
Replace X.Y
with whatever version is built.
After hacking on the lbne-build
file reinstall everything like:
$ cd lbne-build $ pip uninstall -y lbne-build $ python setup.py sdist $ pip install dist/lbne-build-X.Y.tar.gz $ cd -
To actually run the build one does the same as if installing an official release:
$ cd /path/to/build $ cp /path/to/venv/share/worch/wscripts/lbne/wscript . $ waf --prefix=/path/to/install \ --orch-config=lbne/suite-<SUITE>.cfg \ configure $ waf
Note, this still installs Worch and other required Python packages automatically. If you need to hack on them you can similarly βpip uninstall
β them from the Virtual Environment, βgit cloneβ their source, βpython setup.py sdist
β to make the dist/*.tar.gz
file and βpip install
β that.