{"id":119,"date":"2013-10-13T23:59:22","date_gmt":"2013-10-13T21:59:22","guid":{"rendered":"http:\/\/www.graverini.net\/elena\/?page_id=119"},"modified":"2018-11-20T14:11:24","modified_gmt":"2018-11-20T13:11:24","slug":"install-root","status":"publish","type":"page","link":"http:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/","title":{"rendered":"Install ROOT"},"content":{"rendered":"<p>Prerequisites:<\/p>\n<p><code>sudo apt install build-essential git subversion dpkg-dev make g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev<\/code><\/p>\n<p>Optional (recommended) prerequisites:<\/p>\n<p><code>sudo apt install gfortran libssl-dev libpcre3-dev libglu1-mesa-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio3-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python-dev libxml2-dev libkrb5-dev libgsl0-dev libqt4-dev<\/code><\/p>\n<p>Optionally, install <a title=\"Install GSL\" href=\"http:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-gsl\/\">GSL<\/a> and <a title=\"Install CASTOR\" href=\"http:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-castor\/\">CASTOR<\/a> libraries, and <a title=\"Install Geant4\" href=\"http:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-geant4\/\">Geant4 prerequisites<\/a>.<\/p>\n<p>Install font server and fonts for ROOT:<\/p>\n<p><code>sudo apt install xfstt<\/code><br \/>\n<code>sudo apt install t1-xfree86-nonfree ttf-xfree86-nonfree ttf-xfree86-nonfree-syriac xfonts-75dpi xfonts-100dpi<\/code><br \/>\n<code>service xfstt start<\/code><\/p>\n<p>(Source: <a href=\"http:\/\/root.cern.ch\/phpBB3\/viewtopic.php?f=3&amp;t=12627\" target=\"_blank\" rel=\"noopener\">http:\/\/root.cern.ch\/phpBB3\/viewtopic.php?f=3&amp;t=12627<\/a>)<\/p>\n<h5>Update: cmake-based build<\/h5>\n<p>Get ROOT sources as in <a href=\"https:\/\/root.cern.ch\/get-root-sources\">https:\/\/root.cern.ch\/get-root-sources<\/a>:<\/p>\n<p><code>mkdir ROOT && cd ROOT<\/code><br \/>\n<code>git clone http:\/\/root.cern.ch\/git\/root.git<\/code><br \/>\n<code>mv root root-sources<\/code><br \/>\n<code>mkdir root-build<\/code><br \/>\n<code>mkdir root-install<\/code><br \/>\n<code>cd root-sources<\/code><br \/>\n<code>git tag -l<\/code><\/p>\n<p>Choose your preferred version. As an example, v6-14-04:<\/p>\n<p><code>git checkout -b v6-14-04 v6-14-04<\/code><\/p>\n<p>Now build ROOT (ref. <a href=\"https:\/\/root.cern.ch\/building-root\">https:\/\/root.cern.ch\/building-root<\/a>):<\/p>\n<p><code>cd ..\/root-build<\/code><br \/>\n<code>cmake -DCMAKE_INSTALL_PREFIX=$HOME\/ROOT\/root-install -DPYTHIA8_DIR=$PYTHIA8 -DPYTHIA8_INCLUDE_DIR=$PYTHIA8\/include -DPYTHIA8_LIBRARY=$PYTHIA8\/lib\/libpythia8.so -DGSL_DIR=\/usr\/local -Dbuiltin_xrootd=ON -Droofit=ON -Dpythia8=ON ..\/root-sources<\/code><\/p>\n<p>or, to make it use python3 instead, assuming a new installation under ROOT\/ROOT-PY3 (source: <a href=\"https:\/\/root-forum.cern.ch\/t\/how-to-properly-install-pyroot-for-python-3\/26367\" target=\"_blank\" rel=\"noopener\">https:\/\/root-forum.cern.ch\/t\/how-to-properly-install-pyroot-for-python-3\/26367<\/a>):<\/p>\n<p><code>cmake -DCMAKE_INSTALL_PREFIX=$HOME\/ROOT\/ROOT-PY3\/root-install -DPYTHIA8_DIR=$PYTHIA8 -DPYTHIA8_INCLUDE_DIR=$PYTHIA8\/include -DPYTHIA8_LIBRARY=$PYTHIA8\/lib\/libpythia8.so -DGSL_DIR=\/usr\/local -Dbuiltin_xrootd=ON -Droofit=ON -Dpythia8=ON -Dpython3=ON -DPYTHON_EXECUTABLE=\/usr\/bin\/python3 ..\/root-sources<\/code><br \/>\n<code>cmake --build . --target install -- -jN<\/code><\/p>\n<h5>Outdated: make-based build<\/h5>\n<p>Get ROOT (last stable version 5.34):<\/p>\n<p><code>wget ftp:\/\/root.cern.ch\/root\/root_v5.34.14.source.tar.gz<\/code><br \/>\n<code>gzip -dc root_v5.34.14.source.tar.gz | tar -xf -<\/code><\/p>\n<p>Or get ROOT 5.99:<\/p>\n<p><code>git clone http:\/\/root.cern.ch\/git\/root.git<\/code><br \/>\n<code>cd root &amp;&amp; git tag -l<\/code><br \/>\n<code>git checkout -b v5-99-05 v5-99-05<\/code><\/p>\n<p>Compile ROOT (if you do not need GSL or Pythia, drop the configure arguments):<\/p>\n<p><code>cd root<\/code><br \/>\n<code>.\/configure --all --with-gsl-incdir=\"\/usr\/local\/include\" --with-gsl-libdir=\"\/usr\/local\/lib\" --enable-pythia8 --with-pythia8-incdir=$PYTHIA8\/include --with-pythia8-libdir=$PYTHIA8\/lib<\/code><br \/>\n<code>make -j N<\/code><\/p>\n<p>where N is the number of CPU cores:<\/p>\n<p><code>cat \/proc\/cpuinfo | grep 'cpu cores'<\/code><\/p>\n<p>For Ubuntu 14.04 you will also need to do:<\/p>\n<p><code>sudo mkdir \/usr\/include\/freetype &amp;&amp; sudo cp \/usr\/include\/freetype2\/freetype.h \/usr\/include\/freetype\/freetype.h<\/code><\/p>\n<p>Setup environment:<\/p>\n<p><code>echo \"source $PWD\/bin\/thisroot.sh\" &gt;&gt; $HOME\/.bashrc<\/code><br \/>\n<code>source $HOME\/.bashrc<\/code><\/p>\n<p>Adjust the path to your needs.<\/p>\n<h5>Installing a specific ROOT version on LxPlus \/ Fedora \/ Red Hat<\/h5>\n<blockquote><p>The newest xrootd-devel (version 3.3) RPMs for Fedora\/RedHat\/SL do not include the XrdClient\/XrdClientConn.hh header file anymore (it was there in version 3.1). There is a transitional package xrootd-private-devel that will install the missing header files into \/usr\/include\/xrootd.<\/p><\/blockquote>\n<p>(From <a title=\"http:\/\/root.cern.ch\/phpBB3\/viewtopic.php?f=3&amp;t=16096\" href=\"http:\/\/root.cern.ch\/phpBB3\/viewtopic.php?f=3&amp;t=16096\">http:\/\/root.cern.ch\/phpBB3\/viewtopic.php?f=3&amp;t=16096<\/a>.)<\/p>\n<p>To avoid compilation errors, do:<\/p>\n<p><code>.\/configure --with-xrootd-incdir=\"\/usr\/include\/xrootd\" --with-xrootd-incdir=\"\/usr\/include\/xrootd\"<\/code><\/p>\n<p>adding any other user option, for example:<\/p>\n<p><code>.\/configure --all --with-xrootd-incdir=\"\/usr\/include\/xrootd\" --with-xrootd-incdir=\"\/usr\/include\/xrootd\" --enable-pythia8 --with-pythia8-incdir=$PYTHIA8\/include --with-pythia8-libdir=$PYTHIA8\/lib <\/code><\/p>\n<p>To use <strong>pyroot<\/strong> there are further adjustments to do: follow the instructions on <a title=\"http:\/\/www.graverini.net\/elena\/computing\/physics-software\/pyroot-lxplus\/\" href=\"http:\/\/www.graverini.net\/elena\/computing\/physics-software\/pyroot-lxplus\/\">this page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisites: sudo apt install build-essential git subversion dpkg-dev make g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev Optional (recommended) prerequisites: sudo apt install gfortran libssl-dev libpcre3-dev libglu1-mesa-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio3-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python-dev libxml2-dev libkrb5-dev libgsl0-dev libqt4-dev Optionally,&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":100,"menu_order":10,"comment_status":"closed","ping_status":"open","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Install ROOT - Elena Graverini<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install ROOT - Elena Graverini\" \/>\n<meta property=\"og:description\" content=\"Prerequisites: sudo apt install build-essential git subversion dpkg-dev make g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev Optional (recommended) prerequisites: sudo apt install gfortran libssl-dev libpcre3-dev libglu1-mesa-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio3-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python-dev libxml2-dev libkrb5-dev libgsl0-dev libqt4-dev Optionally,&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/\" \/>\n<meta property=\"og:site_name\" content=\"Elena Graverini\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-20T13:11:24+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.graverini.net\/elena\/wp-content\/uploads\/2013\/12\/Penguins.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/\",\"url\":\"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/\",\"name\":\"Install ROOT - Elena Graverini\",\"isPartOf\":{\"@id\":\"https:\/\/www.graverini.net\/elena\/#website\"},\"datePublished\":\"2013-10-13T21:59:22+00:00\",\"dateModified\":\"2018-11-20T13:11:24+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.graverini.net\/elena\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Computing\",\"item\":\"http:\/\/www.graverini.net\/elena\/computing\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Physics software\",\"item\":\"http:\/\/www.graverini.net\/elena\/computing\/physics-software\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Install ROOT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.graverini.net\/elena\/#website\",\"url\":\"https:\/\/www.graverini.net\/elena\/\",\"name\":\"Elena Graverini\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.graverini.net\/elena\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install ROOT - Elena Graverini","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/","og_locale":"en_GB","og_type":"article","og_title":"Install ROOT - Elena Graverini","og_description":"Prerequisites: sudo apt install build-essential git subversion dpkg-dev make g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev Optional (recommended) prerequisites: sudo apt install gfortran libssl-dev libpcre3-dev libglu1-mesa-dev libglew-dev libftgl-dev libmysqlclient-dev libfftw3-dev libcfitsio3-dev graphviz-dev libavahi-compat-libdnssd-dev libldap2-dev python-dev libxml2-dev libkrb5-dev libgsl0-dev libqt4-dev Optionally,&hellip;","og_url":"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/","og_site_name":"Elena Graverini","article_modified_time":"2018-11-20T13:11:24+00:00","og_image":[{"width":1024,"height":768,"url":"http:\/\/www.graverini.net\/elena\/wp-content\/uploads\/2013\/12\/Penguins.jpg","type":"image\/jpeg"}],"twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/","url":"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/","name":"Install ROOT - Elena Graverini","isPartOf":{"@id":"https:\/\/www.graverini.net\/elena\/#website"},"datePublished":"2013-10-13T21:59:22+00:00","dateModified":"2018-11-20T13:11:24+00:00","breadcrumb":{"@id":"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.graverini.net\/elena\/computing\/physics-software\/install-root\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.graverini.net\/elena\/"},{"@type":"ListItem","position":2,"name":"Computing","item":"http:\/\/www.graverini.net\/elena\/computing\/"},{"@type":"ListItem","position":3,"name":"Physics software","item":"http:\/\/www.graverini.net\/elena\/computing\/physics-software\/"},{"@type":"ListItem","position":4,"name":"Install ROOT"}]},{"@type":"WebSite","@id":"https:\/\/www.graverini.net\/elena\/#website","url":"https:\/\/www.graverini.net\/elena\/","name":"Elena Graverini","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.graverini.net\/elena\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"}]}},"_links":{"self":[{"href":"http:\/\/www.graverini.net\/elena\/wp-json\/wp\/v2\/pages\/119"}],"collection":[{"href":"http:\/\/www.graverini.net\/elena\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.graverini.net\/elena\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.graverini.net\/elena\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.graverini.net\/elena\/wp-json\/wp\/v2\/comments?post=119"}],"version-history":[{"count":27,"href":"http:\/\/www.graverini.net\/elena\/wp-json\/wp\/v2\/pages\/119\/revisions"}],"predecessor-version":[{"id":573,"href":"http:\/\/www.graverini.net\/elena\/wp-json\/wp\/v2\/pages\/119\/revisions\/573"}],"up":[{"embeddable":true,"href":"http:\/\/www.graverini.net\/elena\/wp-json\/wp\/v2\/pages\/100"}],"wp:attachment":[{"href":"http:\/\/www.graverini.net\/elena\/wp-json\/wp\/v2\/media?parent=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}