Unable to use Root inside MA5

I have successfully built root from source on my Ubuntu VM Box (my previous VM crashed and got corrupt) However, it is not working in MA5. I tried installing inside MA5 but I am getting a configuration error related to python.

I am attaching the config log, bashfile and error.
P.S. to run MA5 I have to use ‘python ./bin/ma5’ instead ‘./bin/ma5’ . Are these two issues related

CONFIG LOG:
Checking for source directory … /tmp/strider/MA5_root/root-6.04.08
Configuring for linuxx8664gcc
Checking for GNU Make version >= 3.80 … ok
Checking for C compiler … gcc
Checking for C++ compiler … g++
Checking for linker (LD) … g++
Checking for F77 compiler … gfortran
Checking whether compiler can generate dependencies … yes
Checking whether c++11 mode is supported … yes
Checking for string_view implementation … <string_view>
Checking for Python version >= 2.7 … ./configure: line 2817: -c: command not found
./configure: line 2821: test: : integer expression expected
./configure: line 2822: test: : integer expression expected
no
configure: Python >= 2.7 MUST be installed

#######################################
#ROOT PATH
export PATH=$PATH:~/root_build/bin/thisroot.sh
#home/strider/root_install/bin/root
export PATH=$PATH:~/LHAPDF/LHAPDF-6.5.3/bin
export LHADIR=~/LHAPDF/LHAPDF-install
export LD_LIBRARY_PATH=~/LHAPDF/LHAPDF-6.5.3/lib:LD_LIBRARY_PATH

export PYTHONPATH=$PYTHONPATH:/usr/local/bin/python3
export PATH=$PATH:/usr/local/bin/python2
#export PYTHONPATH=~/LHAPDF/LHAPDF-6.5.3

alias python=python3
alias Python=python3
alias python=‘python3’
#######################################

install root
MA5:
MA5: **********************************************************
MA5: Installing root
MA5: **********************************************************
MA5: Detecting a previous installation …
MA5: => found
MA5: Removing the previous installation …
MA5-WARNING: Are you sure to remove the directory called ‘/home/strider/Documents/MG5_aMC_v3_5_3/HEPTools/madanalysis5/madanalysis5/tools/root’ ? (Y/N)
Answer: y
MA5: How many cores would you like to use for the compilation ? default = max = 2
=> Answer: 2
MA5: => Number of cores used for the compilation = 2
MA5: **********************************************************
MA5: Creating a devoted folder …
MA5: Creating a temporary folder …
MA5: Downloading the package …
MA5: - 1/1 /root.cern.ch/download/root_v6.04.08.source.tar.gz …
MA5: → ‘root.tar.gz’ already exists. Package not downloaded.
MA5: Unpacking the package …
MA5: Configuring the package …
MA5-ERROR: impossible to configure the project. For more details, see the log file:
MA5-ERROR: /home/strider/Documents/MG5_aMC_v3_5_3/HEPTools/madanalysis5/madanalysis5/tools/root/configuration.log
MA5: Installation NOT complete.
MA5: Elapsed time = 11.12 seconds
MA5: => Status: [FAILURE]
MA5: ****************************************************

Dear @Legolas ,

Thanks for reaching out to the forum!

From the stack reported above I cannot really see the ROOT-related error. The line

Suggests there might be more information regarding what went wrong in the configuration.

Also, you mention in the beginning of the post that you successfully compiled ROOT already, but the MA5 stack seems to suggest that it will try to rebuild ROOT (I see wording as installation, configure etc.). Is this intended?

Cheers,
Vincenzo

Yes I built root from source, however, MA5 could not identify it. Hence I went forward by enabling it in MA5 which again did not work.

When I add root path in bashrc, I get the following error:
/home/strider/root_build/bin/thisroot.sh: /usr/share/bashdb/bashdb-main.inc: No such file or directory
/home/strider/root_build/bin/thisroot.sh: warning: cannot start debugger; debugging mode disabled
ERROR: please turn on extdebug using “shopt -s extdebug”
or “cd where/root/is” before calling “. bin/thisroot.sh”
/home/strider/root_build/bin/thisroot.sh: line 228: return: can only `return’ from a function or sourced script

I am not familiar with MA5, but this sounds a bug in its build system. Maybe you can get in contact with MA5 devs and ask more help about it? Something else that caught my eye from your original post is the following line

Checking for source directory … /tmp/strider/MA5_root/root-6.04.08

Which suggests ROOT version 6.04 is being searched for. Is this intended? That version of ROOT is quite ancient at this point and you would get an incredible amount of performance and feature improvements by using the latest version (ROOT 6.30 at the time of writing).

When I add root path in bashrc, I get the following error:

I am not sure how you are adding ROOT path to the bashrc, and in general you should not. In your original post, I see this line

export PATH=$PATH:~/root_build/bin/thisroot.sh

The thisroot.sh script is supposed to be sourced, it’s not an executable per se and does not contain further executables (so you shouldn’t add it to PATH). The idea is that you source thisroot.sh and the script will set all the environment variables needed. If you want it to be sourced every time you open a terminal, then you can add the source command in the .bashrc.

Cheers,
Vincenzo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.