ROOT installation on Ubuntu 14.04

Hello,
I am having some trouble installing ROOT6 on Ubuntu 14.04. I removed the previous version and tried diverse installations but it doesn’t seem to work.
The last thing I tried was posted on this forum :

[code]sudo apt-get install git dpkg-dev make g++ gcc binutils libx11-dev libxpm-dev
libxft-dev libxext-dev
sudo apt-get install gfortran libssl-dev libpcre3-dev
xlibmesa-glu-dev libglew1.5-dev libftgl-dev
libmysqlclient-dev libfftw3-dev cfitsio-dev
graphviz-dev libavahi-compat-libdnssd-dev
libldap2-dev python-dev libxml2-dev libkrb5-dev
libgsl0-dev libqt4-dev ccache

sudo mkdir /opt/root6_06_02
cd /opt/root6
sudo git clone http://root.cern.ch/git/root.git root6_src
mkdir root_build
cd root_build
sudo cmake -Droofit=ON -Dhttp=ON -Dccache=ON /opt/root6_06_02/root6_src/[/code]

I find it weird already that I had to add the “sudo” for the last commands, but I had a denied permission without it. On the terminal, I could see that some test failed, here is what I saw :

-- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- The Fortran compiler identification is GNU 4.8.4 -- Check for working Fortran compiler: /usr/bin/gfortran -- Check for working Fortran compiler: /usr/bin/gfortran -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether /usr/bin/gfortran supports Fortran 90 -- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes -- Found GCC. Major version 4, minor version 8 -- Performing Test HAS_CXX11 -- Performing Test HAS_CXX11 - Success -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found a 64bit system -- Found GNU compiler collection -- ROOT Platform: linux -- ROOT Architecture: linuxx8664gcc -- Build Type: RelWithDebInfo -- Compiler Flags: -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -O2 -g -DNDEBUG -- Using ccache for building -- Looking for ZLib -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") -- Looking for Freetype -- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.5.2") -- Looking for PCRE -- Found PCRE version 8.31 using /usr/bin/pcre-config -- Looking for LZMA -- Found LZMA includes at /usr/include -- Found LZMA library at /usr/lib/x86_64-linux-gnu/liblzma.so -- Looking for X11 -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so -- X11_INCLUDE_DIR: /usr/include;/usr/local/include -- X11_LIBRARIES: /usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so -- X11_Xpm_INCLUDE_PATH: /usr/include -- X11_Xpm_LIB: /usr/lib/x86_64-linux-gnu/libXpm.so -- X11_Xft_INCLUDE_PATH: /usr/include -- X11_Xft_LIB: /usr/lib/x86_64-linux-gnu/libXft.so -- X11_Xext_INCLUDE_PATH: -- X11_Xext_LIB: /usr/lib/x86_64-linux-gnu/libXext.so -- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR) -- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version "4.0.3") -- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.2.50") -- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so -- Looking for GSL -- Found GSL: /usr/include (found suitable version "1.16", minimum required is "1.10") -- Looking for Python -- Found PythonInterp: /usr/bin/python (found version "2.7.6") -- Found Python interpreter version 2.7 -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.6") -- Looking for OpenGL -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so -- Looking for Graphviz -- Found GRAPHVIZ: /usr/include -- Looking for Bonjour -- Checking whether Bonjour/Avahi is supported -- Looking for Kerberos 5 -- Found KRB5: /usr/lib/x86_64-linux-gnu/libkrb5.so -- Looking for LibXml2 -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.1") -- Looking for OpenSSL -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.0.1f") -- Looking for Castor -- Castor not found. Switching off castor/rfio option -- Looking for MySQL -- Found MYSQL: /usr/include/mysql -- Looking for Oracle -- Oracle not found. -- Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client -- currently found includes: -- Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib -- currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND -- Oracle not found. Switching off oracle option -- Looking for ODBC -- ODBC not found. Switching off odbc option -- Looking for PostgreSQL -- Could NOT find PostgreSQL (missing: POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARY) -- PostgreSQL not found. Switching off pgsql option -- Looking for SQLite -- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") -- Could NOT find Sqlite (missing: SQLITE_INCLUDE_DIR SQLITE_LIBRARIES) -- SQLite not found. Switching off sqlite option -- Looking for Pythia6 -- Pythia6 not found. Switching off pythia6 option -- Looking for Pythia8 -- Found Pythia8: /usr/include/Pythia8 -- Looking for FFTW3 -- Found fftw3 includes at /usr/include -- Found fftw3 library at /usr/lib/x86_64-linux-gnu/libfftw3.so -- Looking for CFITSIO -- Found CFITSIO: /usr/include -- Found CFITSIO version: 3.34 -- Alien API not found. Set variable ALIEN_DIR to point to your Alien installation -- For the time being switching OFF 'alien' option -- Monalisa not found. Set variable MONALISA_DIR to point to your Monalisa installation -- For the time being switching OFF 'monalisa' option -- Looking for XROOTD -- XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation -- Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally' -- For the time being switching OFF 'xrootd' option -- Could NOT find GFAL (missing: GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARIES) -- GFAL library not found. Set variable GFAL_DIR to point to your gfal installation and the variable SRM_IFCE_DIR to the srm_ifce installation -- For the time being switching OFF 'gfal' option -- Could NOT find DCAP (missing: DCAP_INCLUDE_DIR DCAP_LIBRARY) -- dCap library not found. Set variable DCAP_DIR to point to your dCache installation -- For the time being switching OFF 'dcache' option -- Found LDAP: /usr/include -- Could NOT find CHIRP (missing: CHIRP_INCLUDE_DIR CHIRP_LIBRARY) -- chirp library not found. Set variable CHIRP_DIR to point to your chirp installation -- For the time being switching OFF 'chirp' option -- Could NOT find HDFS (missing: HDFS_INCLUDE_DIR HDFS_LIBRARY) -- hdfs library not found. Set variable HDFS_DIR to point to your hdfs installation -- For the time being switching OFF 'hdfs' option -- Looking for DAVIX -- Found DAVIX: /usr/include/davix -- >>> Option 'glite' not implemented yet! Signal your urgency to pere.mato@cern.ch -- >>> Option 'sapdb' not implemented yet! Signal your urgency to pere.mato@cern.ch -- >>> Option 'srp' not implemented yet! Signal your urgency to pere.mato@cern.ch -- Enabled support for: asimage astiff bonjour builtin_afterimage builtin_ftgl builtin_glew builtin_llvm cxx11 ccache cling davix exceptions explicitlink fftw3 fitsio fortran gviz genvector http krb5 ldap mathmore memstat mysql opengl pch pythia8 python roofit shadowpw shared ssl thread tmva vdt xft xml x11 -- Target triple: x86_64-unknown-linux-gnu -- Native target architecture is X86 -- Threads disabled. -- Doxygen disabled. -- Sphinx disabled. -- Go bindings disabled. -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- OCaml bindings disabled. -- Building with -fPIC -- Constructing LLVMBuild project information -- Targeting X86 -- Clang version: 3.7.0 -- Performing Test CXX_HAS_fno_rtti -- Performing Test CXX_HAS_fno_rtti - Success -- Performing Test CXX_HAS_Wno_ignored_qualifiers -- Performing Test CXX_HAS_Wno_ignored_qualifiers - Success -- Performing Test CXX_HAS_Wno_unused_parameter -- Performing Test CXX_HAS_Wno_unused_parameter - Success -- Performing Test CXX_HAS_Wno_overloaded_virtual -- Performing Test CXX_HAS_Wno_overloaded_virtual - Success -- Performing Test found_stdstringview -- Performing Test found_stdstringview - Failed -- Performing Test found_stdexpstringview -- Performing Test found_stdexpstringview - Failed Running /opt/root6_06_02/root6_src/build/unix/compiledata.sh Making include/compiledata.h -- Configuring done -- Generating done -- Build files have been written to: /opt/root6_06_02/root_build

Then I tried to test it :

[code]mbigot@IRAM-FU-005714:/opt/root6_06_02/root_build$ . /usr/local/bin/thisroot.sh
mbigot@IRAM-FU-005714:/opt/root6_06_02/root_build$ cd
mbigot@IRAM-FU-005714:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import root
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named root
[/code]

Finally, whenever I open a new terminal now, I get the following message :

ERROR: must cd where/root/is befor calling . bin/thisroot.sh for this version of bash ! /usr/local/bin/thisroot.sh: line 39 : return: " return " is only allowed in a function or a script executed by "source "
(message translated so the terms might not be exact)

I already got this message in a previous installation and used a fix found for a previous version but it didn’t seem to work. I must say that I don’t understand quite well what I’m doing during the installation so I may have done something wrong. Could you help me to fix it, please?

Thanks already,

The ‘official’ building instructions are in root.cern.ch/installing-root-source
What you find in different post can probably be very good but also induce you to some errors. In particular the build area should not be in write projected area such that you are forced to use sudo to do anything. You can build anywhere and then install with

cmake -DCMAKE_INSTALL_PREFIX=/opt/root6_06_02 -P cmake_install.cmake

The python module is ROOT (in uppercase). So

import ROOT

should work.

Concerning the message you get sourcing thisroot.sh it has to do with the version of your shell (bash??). What is the version?

bash --version

So I uninstalled root and tried again the installation following the steps of the link you gave me.
I still have the same falures for the tests.
Here is what I’ve done :

[code]mbigot@IRAM-FU-005714:/opt/root6/root_build$ sudo cmake /opt/root6/root6_src/root-6.06.02
– The C compiler identification is GNU 4.8.4
– The CXX compiler identification is GNU 4.8.4
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– The Fortran compiler identification is GNU 4.8.4
– Check for working Fortran compiler: /usr/bin/gfortran
– Check for working Fortran compiler: /usr/bin/gfortran – works
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - done
– Checking whether /usr/bin/gfortran supports Fortran 90
– Checking whether /usr/bin/gfortran supports Fortran 90 – yes
– Found GCC. Major version 4, minor version 8
– Performing Test HAS_CXX11
– Performing Test HAS_CXX11 - Success
– Looking for pthread.h
– Looking for pthread.h - found
– Looking for pthread_create
– Looking for pthread_create - not found
– Looking for pthread_create in pthreads
– Looking for pthread_create in pthreads - not found
– Looking for pthread_create in pthread
– Looking for pthread_create in pthread - found
– Found Threads: TRUE
– Found a 64bit system
– Found GNU compiler collection
– ROOT Platform: linux
– ROOT Architecture: linuxx8664gcc
– Build Type: RelWithDebInfo
– Compiler Flags: -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -O2 -g -DNDEBUG
– Looking for ZLib
– Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version “1.2.8”)
– Looking for Freetype
– Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version “2.5.2”)
– Looking for PCRE
– Found PCRE version 8.31 using /usr/bin/pcre-config
– Looking for LZMA
– Found LZMA includes at /usr/include
– Found LZMA library at /usr/lib/x86_64-linux-gnu/liblzma.so
– Looking for X11
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
– Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
– Looking for gethostbyname
– Looking for gethostbyname - found
– Looking for connect
– Looking for connect - found
– Looking for remove
– Looking for remove - found
– Looking for shmat
– Looking for shmat - found
– Looking for IceConnectionNumber in ICE
– Looking for IceConnectionNumber in ICE - found
– Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
– X11_INCLUDE_DIR: /usr/include;/usr/local/include
– X11_LIBRARIES: /usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
– X11_Xpm_INCLUDE_PATH: /usr/include
– X11_Xpm_LIB: /usr/lib/x86_64-linux-gnu/libXpm.so
– X11_Xft_INCLUDE_PATH: /usr/include
– X11_Xft_LIB: /usr/lib/x86_64-linux-gnu/libXft.so
– X11_Xext_INCLUDE_PATH:
– X11_Xext_LIB: /usr/lib/x86_64-linux-gnu/libXext.so
– Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
– Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (found version “4.0.3”)
– Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version “1.2.50”)
– Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so
– Looking for GSL
– Found GSL: /usr/include (found suitable version “1.16”, minimum required is “1.10”)
– Looking for Python
– Found PythonInterp: /usr/bin/python (found version “2.7.6”)
– Found Python interpreter version 2.7
– Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version “2.7.6”)
– Looking for OpenGL
– Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
– Looking for Graphviz
– Found GRAPHVIZ: /usr/include
– Looking for Bonjour
– Checking whether Bonjour/Avahi is supported
– Looking for Kerberos 5
– Found KRB5: /usr/lib/x86_64-linux-gnu/libkrb5.so
– Looking for LibXml2
– Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version “2.9.1”)
– Looking for OpenSSL
– Found OpenSSL: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so (found version “1.0.1f”)
– Looking for Castor
– Castor not found. Switching off castor/rfio option
– Looking for MySQL
– Found MYSQL: /usr/include/mysql
– Looking for Oracle
– Oracle not found.
– Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client
– currently found includes:
– Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib
– currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
– Oracle not found. Switching off oracle option
– Looking for ODBC
– ODBC not found. Switching off odbc option
– Looking for PostgreSQL
– Could NOT find PostgreSQL (missing: POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARY)
– PostgreSQL not found. Switching off pgsql option
– Looking for SQLite
– Found PkgConfig: /usr/bin/pkg-config (found version “0.26”)
– Could NOT find Sqlite (missing: SQLITE_INCLUDE_DIR SQLITE_LIBRARIES)
– SQLite not found. Switching off sqlite option
– Looking for Pythia6
– Pythia6 not found. Switching off pythia6 option
– Looking for Pythia8
– Found Pythia8: /usr/include/Pythia8
– Looking for FFTW3
– Found fftw3 includes at /usr/include
– Found fftw3 library at /usr/lib/x86_64-linux-gnu/libfftw3.so
– Looking for CFITSIO
– Found CFITSIO: /usr/include
– Found CFITSIO version: 3.34
– Alien API not found. Set variable ALIEN_DIR to point to your Alien installation
– For the time being switching OFF ‘alien’ option
– Monalisa not found. Set variable MONALISA_DIR to point to your Monalisa installation
– For the time being switching OFF ‘monalisa’ option
– Looking for XROOTD
– XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation
– Alternatively, you can also enable the option ‘builtin_xrootd’ to build XROOTD internally’
– For the time being switching OFF ‘xrootd’ option
– Could NOT find GFAL (missing: GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARIES)
– GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
and the variable SRM_IFCE_DIR to the srm_ifce installation
– For the time being switching OFF ‘gfal’ option
– Could NOT find DCAP (missing: DCAP_INCLUDE_DIR DCAP_LIBRARY)
– dCap library not found. Set variable DCAP_DIR to point to your dCache installation
– For the time being switching OFF ‘dcache’ option
– Found LDAP: /usr/include
– Could NOT find CHIRP (missing: CHIRP_INCLUDE_DIR CHIRP_LIBRARY)
– chirp library not found. Set variable CHIRP_DIR to point to your chirp installation
– For the time being switching OFF ‘chirp’ option
– Could NOT find HDFS (missing: HDFS_INCLUDE_DIR HDFS_LIBRARY)
– hdfs library not found. Set variable HDFS_DIR to point to your hdfs installation
– For the time being switching OFF ‘hdfs’ option
– Looking for DAVIX
– Found DAVIX: /usr/include/davix
– >>> Option ‘glite’ not implemented yet! Signal your urgency to pere.mato@cern.ch
– >>> Option ‘sapdb’ not implemented yet! Signal your urgency to pere.mato@cern.ch
– >>> Option ‘srp’ not implemented yet! Signal your urgency to pere.mato@cern.ch
– Enabled support for: asimage astiff bonjour builtin_afterimage builtin_ftgl builtin_glew builtin_llvm cxx11 cling davix exceptions explicitlink fftw3 fitsio fortran gviz genvector krb5 ldap mathmore memstat mysql opengl pch pythia8 python shadowpw shared ssl thread tmva vdt xft xml x11
– Target triple: x86_64-unknown-linux-gnu
– Native target architecture is X86
– Threads disabled.
– Doxygen disabled.
– Sphinx disabled.
– Go bindings disabled.
– Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
– Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
– OCaml bindings disabled.
– Building with -fPIC
– Constructing LLVMBuild project information
– Targeting X86
– Clang version: 3.7.0
– Performing Test CXX_HAS_fno_rtti
– Performing Test CXX_HAS_fno_rtti - Success
– Performing Test CXX_HAS_Wno_ignored_qualifiers
– Performing Test CXX_HAS_Wno_ignored_qualifiers - Success
– Performing Test CXX_HAS_Wno_unused_parameter
– Performing Test CXX_HAS_Wno_unused_parameter - Success
– Performing Test CXX_HAS_Wno_overloaded_virtual
– Performing Test CXX_HAS_Wno_overloaded_virtual - Success
– Performing Test found_stdstringview
– Performing Test found_stdstringview - Failed
– Performing Test found_stdexpstringview
– Performing Test found_stdexpstringview - Failed
Running /opt/root6/root6_src/root-6.06.02/build/unix/compiledata.sh
Making include/compiledata.h
– Configuring done
– Generating done
– Build files have been written to: /opt/root6/root_build

mbigot@IRAM-FU-005714:/opt/root6/root_build$ cmake --build
Usage: cmake --build [options] [-- [native-options]]
Options:

= Project binary directory to be built. --target = Build instead of default targets. --config = For multi-configuration tools, choose . --clean-first = Build target 'clean' first, then build. (To clean only, use --target 'clean'.) --use-stderr = Ignored. Behavior is default in CMake >= 3.0. -- = Pass remaining options to the native tool.

mbigot@IRAM-FU-005714:/opt/root6/root_build$ source /opt/root6/root_build/bin/thisroot.sh
mbigot@IRAM-FU-005714:/opt/root6/root_build$ root

| Welcome to ROOT 6.06/02 http://root.cern.ch |
| © 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From heads/master@v6-07-02-437-gb06340c, Mar 02 2016, 19:01:57 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/’.q’

root [0]
[/code]

I also tried beforehand

in the build repertory but it felt like I was in the wrong place. Should I have done it in the source directory?

The bash version is 4.3.11(1), release (x86-64-pc-linux-gnu)

You are missing the dot. The right command is:

Taking your first post as reference, it should work if you do:

sudo apt-get install git dpkg-dev make g++ gcc binutils libx11-dev libxpm-dev \
libxft-dev libxext-dev
sudo apt-get install gfortran libssl-dev libpcre3-dev \
xlibmesa-glu-dev libglew1.5-dev libftgl-dev \
libmysqlclient-dev libfftw3-dev cfitsio-dev \
graphviz-dev libavahi-compat-libdnssd-dev \
libldap2-dev python-dev libxml2-dev libkrb5-dev \
libgsl0-dev libqt4-dev ccache

sudo mkdir /opt/root6
sudo chown myusername /opt/root6
#No need to use sudo anymore.
#Alternatively, just do mkdir /home/myuser/root6 and replace below all /opt/root6
cd /opt/root6
git clone http://root.cern.ch/git/root.git root6_src
cmake -Droofit=ON -Dhttp=ON -Dccache=ON /opt/root6/root6_src/
cmake --build .
#Or instead: make -j8
source /opt/root6/bin/thisroot.sh
# Or add previous line in your ~/.bashrc

#Test if it works
root -b
root --notebook
python
   import ROOT

I finished the installation and tried the asked command lines:

[code]mbigot@IRAM-FU-005714:/opt/root6/root6_build$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import root
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named root
exit()
mbigot@IRAM-FU-005714:/opt/root6/root6_build$ root -b


| Welcome to ROOT 6.06/02 http://root.cern.ch |
| (c) 1995-2014, The ROOT Team |
| Built for linuxx8664gcc |
| From heads/master@v6-07-02-437-gb06340c, Mar 02 2016, 19:01:57 |

Try ‘.help’, ‘.demo’, ‘.license’, ‘.credits’, ‘.quit’/‘.q’

root [0] .q
mbigot@IRAM-FU-005714:/opt/root6/root6_build$ root --notebook
Traceback (most recent call last):
File “/usr/local/bin/ipython”, line 4, in
from IPython import start_ipython
File “/usr/local/lib/python2.7/dist-packages/IPython/init.py”, line 48, in
from .core.application import Application
File “/usr/local/lib/python2.7/dist-packages/IPython/core/application.py”, line 24, in
from IPython.core import release, crashhandler
File “/usr/local/lib/python2.7/dist-packages/IPython/core/crashhandler.py”, line 28, in
from IPython.core import ultratb
File “/usr/local/lib/python2.7/dist-packages/IPython/core/ultratb.py”, line 121, in
from IPython.utils.terminal import get_terminal_size
File “/usr/local/lib/python2.7/dist-packages/IPython/utils/terminal.py”, line 27, in
import backports.shutil_get_terminal_size
ImportError: No module named backports.shutil_get_terminal_size
[/code]

I don’t really understand but maybe the problem lies with python and not root

It is with capital letters!

For the notebook option, you may have to install also

sudo apt-get install python-pip
sudo pip install jupyter metakernel zmq functools32 terminado

Yes, actually it seems to work with capital letters:

[code]mbigot@IRAM-FU-005714:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
exit()[/code]

The notebook thing, however, is still not working, even with the installations I made:

mbigot@IRAM-FU-005714:~$ root --notebook Traceback (most recent call last): File "/usr/local/bin/ipython", line 4, in <module> from IPython import start_ipython File "/usr/local/lib/python2.7/dist-packages/IPython/__init__.py", line 48, in <module> from .core.application import Application File "/usr/local/lib/python2.7/dist-packages/IPython/core/application.py", line 24, in <module> from IPython.core import release, crashhandler File "/usr/local/lib/python2.7/dist-packages/IPython/core/crashhandler.py", line 28, in <module> from IPython.core import ultratb File "/usr/local/lib/python2.7/dist-packages/IPython/core/ultratb.py", line 121, in <module> from IPython.utils.terminal import get_terminal_size File "/usr/local/lib/python2.7/dist-packages/IPython/utils/terminal.py", line 27, in <module> import backports.shutil_get_terminal_size ImportError: No module named shutil_get_terminal_size

Which ipython version do you have?

sudo pip install --upgrade jupyter
pip list
ipython --version
python -m IPython --version

See also:
trac.macports.org/ticket/51202
github.com/jupyter/notebook/issues/270

Hi there all,

I am using Ubuntu 14.04 LTS in HP Notebook. I am trying to install root version of 5.34.18 and have followed the following process.

  1. sudo ./configure
    (2) sudo make
    After making this it showed some error messages which are given below in the following lines. First lines It is checking for available files. Please reply soon.





==> lib/libMemStat.so done
checking for gcc… gcc -m64
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc -m64 accepts -g… yes
checking for gcc -m64 option to accept ANSI C… none needed
checking whether ln -s works… yes
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking for ranlib… ranlib
checking for rm… /bin/rm
checking for mv… /bin/mv
checking for cp… /bin/cp
checking for mkdir… /bin/mkdir
checking for perl… /usr/bin/perl
checking for find… /usr/bin/find
checking for xargs… /usr/bin/xargs
checking for ldconfig… /sbin/ldconfig
checking how to run the C preprocessor… gcc -m64 -E
checking for X… libraries , headers in standard search path
checking for gethostbyname… yes
checking for connect… yes
checking for remove… yes
checking for shmat… yes
checking for IceConnectionNumber in -lICE… no
checking for XOpenDisplay in -lX11… yes
checking whether byte ordering is bigendian… no
checking for inline… inline
checking for egrep… grep -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for long long… yes
checking whether time.h and sys/time.h may both be included… yes
checking sys/wait.h usability… yes
checking sys/wait.h presence… yes
checking for sys/wait.h… yes
checking sys/time.h usability… yes
checking sys/time.h presence… yes
checking for sys/time.h… yes
checking malloc.h usability… yes
checking malloc.h presence… yes
checking for malloc.h… yes
checking for stdlib.h… (cached) yes
checking for unistd.h… (cached) yes
checking stddef.h usability… yes
checking stddef.h presence… yes
checking for stddef.h… yes
checking stdarg.h usability… yes
checking stdarg.h presence… yes
checking for stdarg.h… yes
checking errno.h usability… yes
checking errno.h presence… yes
checking for errno.h… yes
checking for XShapeCombineMask in -lXext… yes
checking jpeglib.h usability… no
checking jpeglib.h presence… no
checking for jpeglib.h… no
checking built-in JPEG library… yes
checking for unsigned char… yes
checking for unsigned short… yes
checking for an ANSI C-conforming const… yes
checking whether char is unsigned… no
checking png.h usability… yes
checking png.h presence… yes
checking for png.h… yes
checking zlib.h usability… yes
checking zlib.h presence… yes
checking for zlib.h… yes
checking for png_get_sRGB in png.h… yes
checking using built-in UNGIF library… yes
checking tiffio.h usability… no
checking tiffio.h presence… no
checking for tiffio.h… no
checking headers required by TTF support… -I/usr/include/freetype2
checking ft2build.h usability… yes
checking ft2build.h presence… yes
checking for ft2build.h… yes
checking freetype/freetype.h … no
checking freetype.h… yes
checking libAfterBase… disabled
checking for dirent.h that defines DIR… yes
checking for library containing opendir… none required
checking sys/dirent.h usability… no
checking sys/dirent.h presence… no
checking for sys/dirent.h… no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating afterbase.h
config.status: creating afterimage-libs
config.status: creating afterimage-config
config.status: creating config.h
*** Building libAfterImage …
make[1]: Entering directory `/cern/root/graf2d/asimage/src/libAfterImage’
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jaricom.c -o libjpeg/jaricom.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcarith.c -o libjpeg/jcarith.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdarith.c -o libjpeg/jdarith.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcapimin.c -o libjpeg/jcapimin.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcapistd.c -o libjpeg/jcapistd.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jccoefct.c -o libjpeg/jccoefct.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jccolor.c -o libjpeg/jccolor.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcdctmgr.c -o libjpeg/jcdctmgr.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jchuff.c -o libjpeg/jchuff.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcinit.c -o libjpeg/jcinit.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcmainct.c -o libjpeg/jcmainct.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcmarker.c -o libjpeg/jcmarker.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcmaster.c -o libjpeg/jcmaster.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcomapi.c -o libjpeg/jcomapi.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcparam.c -o libjpeg/jcparam.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcphuff.c -o libjpeg/jcphuff.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcprepct.c -o libjpeg/jcprepct.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jcsample.c -o libjpeg/jcsample.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jctrans.c -o libjpeg/jctrans.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdapimin.c -o libjpeg/jdapimin.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdapistd.c -o libjpeg/jdapistd.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdatadst.c -o libjpeg/jdatadst.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdatasrc.c -o libjpeg/jdatasrc.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdcoefct.c -o libjpeg/jdcoefct.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdcolor.c -o libjpeg/jdcolor.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jddctmgr.c -o libjpeg/jddctmgr.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdhuff.c -o libjpeg/jdhuff.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdinput.c -o libjpeg/jdinput.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdmainct.c -o libjpeg/jdmainct.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdmarker.c -o libjpeg/jdmarker.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdmaster.c -o libjpeg/jdmaster.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdmerge.c -o libjpeg/jdmerge.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdpostct.c -o libjpeg/jdpostct.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdsample.c -o libjpeg/jdsample.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jdtrans.c -o libjpeg/jdtrans.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jerror.c -o libjpeg/jerror.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jfdctflt.c -o libjpeg/jfdctflt.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jfdctfst.c -o libjpeg/jfdctfst.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jfdctint.c -o libjpeg/jfdctint.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jidctflt.c -o libjpeg/jidctflt.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jidctfst.c -o libjpeg/jidctfst.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jidctint.c -o libjpeg/jidctint.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jquant1.c -o libjpeg/jquant1.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jquant2.c -o libjpeg/jquant2.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jutils.c -o libjpeg/jutils.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jmemmgr.c -o libjpeg/jmemmgr.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/jmemnobs.c -o libjpeg/jmemnobs.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libjpeg/transupp.c -o libjpeg/transupp.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libungif/dgif_lib.c -o libungif/dgif_lib.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libungif/egif_lib.c -o libungif/egif_lib.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libungif/gifalloc.c -o libungif/gifalloc.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libungif/gif_err.c -o libungif/gif_err.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c libungif/gif_hash.c -o libungif/gif_hash.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c afterbase.c -o afterbase.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c asimage.c -o asimage.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c ascmap.c -o ascmap.o
gcc -m64 -O3 -DNO_DEBUG_OUTPUT -fPIC -I/usr/include/freetype2 -c asfont.c -o asfont.o
asfont.c:67:33: fatal error: freetype/freetype.h: No such file or directory

include <freetype/freetype.h>

                             ^

compilation terminated.
make[1]: *** [asfont.o] Error 1
make[1]: Leaving directory `/cern/root/graf2d/asimage/src/libAfterImage’
make: *** [graf2d/asimage/src/libAfterImage/libAfterImage.a] Error 2

Can anyone help me to install successfully this in ubuntu 14.04 LTS.

Kind regards

This is a duplicate of

sft.its.cern.ch/jira/browse/ROOT-6903

Did you install the prerequisites?
root.cern.ch/build-prerequisites

What does the command

locate freetype.h

say?

The easy workaround is:

cd /usr/include
sudo ln -s freetype2 freetype

Thanks it seems to work now !

Nice.

Mark please as solved (green tick).