Hello,
I have successfully installed and compiled root 5 and root 6 on my laptop.
I have extensively used root5 and root6 both in different applications when only one is installed.
Here’s a challenge, when I have set up my aliases just fine so that I can run
"root -l root6code.cpp" macro works fine
"root5 -l root5code.cpp" macro works fine
compiling a code that imports from root breaks everything/
In my .bashrc, I am trying to set up so that I have two static variables in the beginning:
alias root5load="export PATH=$ROOTSYS5/bin:$native_path ; export LD_LIBRARY_PATH=$ROOTSYS5/lib:$native_ld_library_path;"
alias root5="source ~/ROOT5/bin/thisroot.sh; ~/ROOT5/bin/root"
Try: alias root5load="source ${HOME}/ROOT5/bin/thisroot.sh"
alias root5="root5load; root"
alias root6load="source ${HOME}/ROOT6/bin/thisroot.sh"
alias root6="root6load; root"
then I set up in case, I want to reset to root5/root6 interchangeably.
#Setting up PyROOT for root6
alias nativeload="export PATH=$native_path; export LD_LIBRARY_PATH=$native_ld_library_path"
export ROOTSYS5=$HOME/ROOT5/
alias root5load="export PATH=$ROOTSYS5/bin:$native_path ; export LD_LIBRARY_PATH=$ROOTSYS5/lib:$native_ld_library_path;"
alias root6load="export PATH=$ROOTSYS/bin:$native_path ; export LD_LIBRARY_PATH=$ROOTSYS/lib:$native_ld_library_path;"
This way, I can unload both, or load one at a time, with default ROOT6 being loaded.
However, I still am very curious, and wish to find out where the environments are set, if not in the $HOME directory.
I second this. This is what I use for my everyday work flow and it makes it very clear what is going on.
Yikes, this would sure clutter up your environment quickly.
There are a number of places where you environment could be loaded from. See this page for some more information. Also, it may be that your environment was set with ROOT in the paths, and then you removed those from .bashrc, but this would not be instantly reflected in your current environment.