Difference between revisions of "Install HallD Software on Ubuntu"
Line 1: | Line 1: | ||
Here is a complete list of commands to install and run sim-recon on fresh installed Ubuntu. Tested with Ubuntu 13.10 | 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. | Complete list means that one can open a terminal window after ubuntu instillation and setup halld software by copy/paste commands one by one. | ||
+ | |||
0. | 0. | ||
sudo apt-get update && apt-get upgrade | sudo apt-get update && apt-get upgrade | ||
+ | |||
1. Install all things with dependencies. (Probably it is more than required for only gluex-software) | 1. Install all things with dependencies. (Probably it is more than required for only gluex-software) | ||
− | sudo apt-get install vim scons | + | sudo apt-get install vim scons 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 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 | sudo apt-get install libfreetype6-dev:i386 paw libmysqlclient-dev libbz2-dev tcsh xutils-dev libcurl3-dev libatlas-base-dev | ||
+ | |||
Line 19: | Line 23: | ||
mkdir halld | mkdir halld | ||
cd halld | cd halld | ||
+ | |||
Line 24: | Line 29: | ||
svn checkout https://halldsvn.jlab.org/repos/trunk/scripts/build_scripts | svn checkout https://halldsvn.jlab.org/repos/trunk/scripts/build_scripts | ||
+ | |||
Line 33: | Line 39: | ||
source ~/.bashrc | source ~/.bashrc | ||
+ | |||
Line 38: | Line 45: | ||
sudo update-alternatives --set c++ /usr/bin/clang++ | sudo update-alternatives --set c++ /usr/bin/clang++ | ||
+ | |||
+ | one can check and change it later by: | ||
+ | |||
sudo update-alternatives --config c++ | sudo update-alternatives --config c++ | ||
+ | |||
Line 51: | Line 62: | ||
mkdir clhep | mkdir clhep | ||
make -f build_scripts/Makefile_all clhep_make | make -f build_scripts/Makefile_all clhep_make | ||
+ | |||
7. Building cernlib requires several tricks. | 7. Building cernlib requires several tricks. | ||
− | cernlib requires gmake | + | First, cernlib requires gmake. Lets make gmake |
sudo ln -s /usr/bin/make /usr/bin/gmake | sudo ln -s /usr/bin/make /usr/bin/gmake | ||
Line 71: | Line 83: | ||
− | + | ||
+ | 8. JANA | ||
SBMS looks for liblapack3 but ubuntu have it like liblapack.so.3 (This patch doesn't concern BMS build. | SBMS looks for liblapack3 but ubuntu have it like liblapack.so.3 (This patch doesn't concern BMS build. | ||
Line 83: | Line 96: | ||
− | + | ||
+ | 9. Finally we build sim-recon | ||
make -f build_scripts/Makefile_all sim-recon_build | make -f build_scripts/Makefile_all sim-recon_build | ||
+ | |||
+ | |||
+ | ---- | ||
+ | Another way is to build JANA and sim-recon using scons SBMS. Here are steps to steps 9 and 10 using SBMS | ||
+ | |||
+ | |||
+ | 8. JANA | ||
+ | |||
+ | Create a directory for JANA | ||
+ | |||
+ | mkdir ~/halld/jana | ||
+ | cd ~/halld/jana | ||
+ | |||
+ | Choose and check out the latest tag. I use jana_0.7.1p1 as an example. Link 'prod' to jana_0.7.1p1 | ||
+ | |||
+ | svn ls https://phys12svn.jlab.org/repos/tags | ||
+ | svn co https://phys12svn.jlab.org/repos/tags/jana_0.7.1p1 | ||
+ | ln -s jana_0.7.1p1 prod | ||
+ | |||
+ | go to prod, build and install using scons. | ||
+ | cd ~/halld/jana/prod | ||
+ | scons | ||
+ | scons install | ||
+ | |||
+ | Jana created environment script which is have to be used before using jana. Add it to .bashrc | ||
+ | |||
+ | echo 'source ~/halld/jana/prod/$BMS_OSNAME/setenv.sh'>>~/.bashrc | ||
+ | source ~/.bashrc | ||
+ | |||
+ | 9. sim-recon | ||
+ | |||
+ | Create directory and checkout sim-recon | ||
+ | |||
+ | mkdir ~/halld/sim-recon | ||
+ | cd ~/halld/sim-recon | ||
+ | svn co https://halldsvn.jlab.org/repos/trunk/sim-recon trunk | ||
+ | ln -s trunk prod | ||
+ | cd ~/halld/sim-recon/trunk/src |
Revision as of 12:09, 11 February 2014
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.
0.
sudo apt-get update && apt-get upgrade
1. Install all things with dependencies. (Probably it is more than required for only gluex-software)
sudo apt-get install vim scons 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
cd mkdir halld cd halld
3. Get halld build scripts
svn checkout https://halldsvn.jlab.org/repos/trunk/scripts/build_scripts
4. Set halld environment on startup.
echo 'source ~/halld/build_scripts/gluex_env.sh'>>~/.bashrc
and update environment
source ~/.bashrc
5. Set clang to be a default compiler
sudo update-alternatives --set c++ /usr/bin/clang++
one can check and change it later by:
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.
First, cernlib requires gmake. 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
8. JANA
SBMS looks for liblapack3 but ubuntu have it like liblapack.so.3 (This patch doesn't concern BMS build. But is required if one would like to use scons in future)
sudo ln -s /usr/lib/liblapack.so.3 /usr/lib/liblapack3.so
build
make -f build_scripts/Makefile_all jana_build
9. Finally we build sim-recon
make -f build_scripts/Makefile_all sim-recon_build
Another way is to build JANA and sim-recon using scons SBMS. Here are steps to steps 9 and 10 using SBMS
8. JANA
Create a directory for JANA
mkdir ~/halld/jana cd ~/halld/jana
Choose and check out the latest tag. I use jana_0.7.1p1 as an example. Link 'prod' to jana_0.7.1p1
svn ls https://phys12svn.jlab.org/repos/tags svn co https://phys12svn.jlab.org/repos/tags/jana_0.7.1p1 ln -s jana_0.7.1p1 prod
go to prod, build and install using scons.
cd ~/halld/jana/prod scons scons install
Jana created environment script which is have to be used before using jana. Add it to .bashrc
echo 'source ~/halld/jana/prod/$BMS_OSNAME/setenv.sh'>>~/.bashrc source ~/.bashrc
9. sim-recon
Create directory and checkout sim-recon
mkdir ~/halld/sim-recon cd ~/halld/sim-recon svn co https://halldsvn.jlab.org/repos/trunk/sim-recon trunk ln -s trunk prod cd ~/halld/sim-recon/trunk/src