Building ROOT: Difference between revisions

From pCT
Ogr043 (talk | contribs)
No edit summary
Ogr043 (talk | contribs)
No edit summary
Line 8: Line 8:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo yum install git cmake gcc-c++ gcc binutils \
sudo yum install git cmake gcc-c++ gcc binutils \
libX11-devel libXpm-devel libXft-devel libXext-devel
libX11-devel libXpm-devel libXft-devel libXext-devel \
 
gcc-gfortran openssl-devel pcre-devel \
sudo yum install gcc-gfortran openssl-devel pcre-devel \
mesa-libGL-devel mesa-libGLU-devel glew-devel ftgl-devel mysql-devel \
mesa-libGL-devel mesa-libGLU-devel glew-devel ftgl-devel mysql-devel \
fftw-devel cfitsio-devel graphviz-devel \
fftw-devel cfitsio-devel graphviz-devel \
avahi-compat-libdns_sd-devel libldap-dev python-devel \
avahi-compat-libdns_sd-devel libldap-dev python-devel \
libxml2-devel gsl-static gsl-devel
libxml2-devel gsl-static gsl-devel \
 
libAfterImage libAfterImage-devel
sudo yum install libAfterImage libAfterImage-devel


sudo python3 -m pip install numpy
sudo python3 -m pip install numpy

Revision as of 13:42, 7 February 2020

Main Page -> Control & Readout Software Documentation and Howto's -> Building ROOT


In the pCT project we need to use a version of ROOT which is compiled with c++17 in order to build packages with ROOT dependencies with c++17 standard. .

ROOT implements a custom adaptor to std::string_view if not compiled with c++17 and this conflicts with the real one if a packages uses c++17 standard and ROOT libraries/includes.

<syntaxhighlight lang="bash"> sudo yum install git cmake gcc-c++ gcc binutils \ libX11-devel libXpm-devel libXft-devel libXext-devel \ gcc-gfortran openssl-devel pcre-devel \ mesa-libGL-devel mesa-libGLU-devel glew-devel ftgl-devel mysql-devel \ fftw-devel cfitsio-devel graphviz-devel \ avahi-compat-libdns_sd-devel libldap-dev python-devel \ libxml2-devel gsl-static gsl-devel \ libAfterImage libAfterImage-devel

sudo python3 -m pip install numpy

  1. clone the repository

git clone http://github.com/root-project/root.git

  1. choose a build directory

mkdir build_root; cd build_root

scl enable devtoolset-8 bash

  1. configure: choose install target, on the lab machine we need to disable asimage for some reason
  2. the important flag is the C++ standard

cmake3 -D CMAKE_INSTALL_PREFIX=/opt/root -D CMAKE_CXX_STANDARD=17 ../

  1. build

make -j

  1. install (eventually using sudo)

make install </syntaxhighlight>