-
Notifications
You must be signed in to change notification settings - Fork 27
Troubleshooting
If snoing fails it will output Snoing has failed, please consult the above error messages or the snoing.log file.
. Above this line snoing should output text explaining why it failed and will often give advice on how to solve the error. If this information is not sufficient to solve the problem then email the snoing.log file to the MC group leader.
- Root versions < 5.34 will not install on Mac OS 10.8.
- XQuartz must be installed on Mac OS 10.8+.
- Root versions > 5.32 requires XCode 4.3+ and the command line tools on Mac OS 10.7. If you have XCode 4.1/4.2 you will need to get a fresh install from the App Store, the command line tools can then be installed from the XCode->Preferences->Downloads menu.
- Common installations issues are due to newer compilers. It is suggested that you do not use greater than gcc 4.9.
RAT is not C++11 compliant just yet, thus there can be a few issues if some things are compiled to allow for C++11 strings.
It is known that the latest Ubuntu LTE (16.04) has issues due to have gcc 5.3.1, and defaulting to C++11 support. The system python is installed with newer compilation flags that are required when linking python (thus with ROOT and RAT); these flags require at least gcc 4.9.
It used to be sufficient to use the CC
and CXX
environment variables; however there is an explicit call to gcc somewhere which was previously ok with compatible compilers, now it breaks.
If you are having this issue, please do the following:
- Install gcc 4.9
sudo apt-get install gcc-4.9 g++-4.9
- Make
bin
directory within your snoing folder
export SNOING=/path/to/snoing/directory
mkdir -p $SNOING/bin
As an example; you likely have cloned snoing to your home directory (~
; however it is safer to use the HOME
environment variable when scripting). In this case you would type:
export SNOING=$HOME/snoing
mkdir -p $SNOING/bin
- Link the gcc versions to this directory (written as one-liner)
for prog in /usr/bin/*-4.9; do ln -s $prog $SNOING/bin/$(basename $prog | sed 's/-4.9//g'); done
- Add some functions to your
~/.bashrc
file that will add this to your path, and set the environment variables. This will ensure that when thePATH
is queried, the wanted compiler versions will be used in all circumstances. Functions are used as you do not want these to be in your path when you are not using SNO+ software.
Note: If you are to use the below functions, ensure that you point SNOING
(in the helper function _snoplus
to the directory containing snoing.
# ~/.bashrc
# helper function
function _snoplus {
export SNOING=/path/to/snoing/directory
export PATH=$SNOING/bin:$PATH
njobs=$(nproc)
[[ $njobs != 1 ]] && njobs=$(($njobs-1))
export MAKEFLAGS=-j$njobs
export CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
unset -v njobs
}
# use snoing
function snoing {
printf "%-25s" "Loading snoing Environment..."
_snoplus
cd $SNOING >/dev/null
source env.sh >/dev/null
[[ $? == 0 ]] && printf "done\n" || printf "failed\n"
}
# use RAT
function snoplus {
printf "%-25s" "Loading SNO+ Environment..."
_snoplus
source $SNOING/install/env_rat-dev.sh >/dev/null
[[ $? == 0 ]] && printf "done\n" || printf "failed\n"
}
- Open new terminal or resource your
~/.bashrc
and type
snoing
you will automatically be taken the snoing directory, with all the environment sourced.
- Remove the install directory, everything needs to be compiled with compatible compilers/options
rm -rf install
- Install rat-dev, which will install all dependencies. If you have recently tried installing, you likely have all the source files for the dependencies in your
cache
directory, so it shouldn't take too long.
./snoing.py rat-dev
- To use RAT, in a new terminal, you can just type
snoplus
and the environment needed to run / edit / recompile RAT is up and ready for use.