Install HallD Software on Ubuntu

From GlueXWiki
Revision as of 03:55, 5 February 2014 by Romanov (Talk | contribs)

Jump to: navigation, search

Here is a complete list of commands to install and run sim-recon on fresh installed Ubuntu. Tested with Ubuntu 13.10 Complete list means that one can open a terminal window after ubuntu instillation and setup halld software by copy/paste commands one by one.


sudo apt-get update && apt-get upgrade

1. Install all required staff with dependencies

sudo apt-get install vim scons mysql-server gcc subversion pythia8-root-interface python-dev libgeant321-2-dev 
sudo apt-get install geany-plugins clang llvm-dev build-essential libxft-dev cernlib-base-dev libxft-dev 
sudo apt-get install libfreetype6-dev:i386 paw libmysqlclient-dev libbz2-dev tcsh xutils-dev libcurl3-dev libatlas-base-dev

2. Create folder for HallD software in the home directory

mkdir halld
cd halld

3. Get halld build scripts

svn checkout

4. Set halld environment on startup.

echo 'source ~/halld/build_scripts/'>>~/.bashrc

and update environment

source ~/.bashrc

5. Set clang to be a default compiler

sudo update-alternatives --set c++ /usr/bin/clang++
sudo update-alternatives --config c++

6. Build first bunch of things. Notice that clhep requires clhep directory to be created

make -f build_scripts/Makefile_all xerces_build
make -f build_scripts/Makefile_all hdds_build
make -f build_scripts/Makefile_all root_build
make -f build_scripts/Makefile_all ccdb_build
#to make clhep we have to create a dir 'clhep' in GLUEX_TOP
mkdir clhep
make -f build_scripts/Makefile_all clhep_make

7. Building cernlib requires several tricks.

cernlib requires gmake. Yes. Lets make gmake

sudo ln -s /usr/bin/make /usr/bin/gmake

There is a problem with freetype includes. We have to add it explicitly before building the lib. Add next environment variables in session where you build cernlib or add to ~/.bashrc

export C_INCLUDE_PATH=/usr/include/freetype2:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/usr/include/freetype2:$CPLUS_INCLUDE_PATH

Finally build cernlib

make -f build_scripts/Makefile_all cernlib_build


SBMS looks for liblapack3 but ubuntu have it like (This patch doesn't concern BMS build. But is required if one would like to use scons in future)

sudo ln -s /usr/lib/ /usr/lib/


make -f build_scripts/Makefile_all jana_build

10. Finally we build sim-recon

make -f build_scripts/Makefile_all sim-recon_build