Compile ROOT with h2root support


_ROOT Version: 6.16.00
_Platform: Ubuntu 18.04 64bit
_Compiler: g++ 7.4.0


Hello!

I need to convert some hbook files into root files but I cannot find the h2root program in the bin folder of my ROOT installation. I have both the gfortran and g77 compilers installed. I also have the CERNLIB 2006 library installed in the default path /usr/lib/x86_64-linux-gnu/
But when I run the ROOT configure

 cmake -Dbuiltin_xrootd=ON -DCMAKE_INSTALL_PREFIX=$HOME/Code/ROOT/6-16-00 ../sources

there is no reference to h2root or paw or Fortran.
So my question is: how can I compile ROOT with h2root support?

CERNLIB is NOT needed for h2root / g2root (they just need “gfortran” and if you installed “g77”, it may even break the built).

Note: The ROOT team provides ready-to-use binary distributions for some systems, including “Ubuntu 18 gcc7.3”, which you just need to download and unpack.

You need to give the option -Dfortran=ON to CMake to enable building the Fortran parts of ROOT, including h2root. Cheers,

@amadio
Thank you. That worked!
@Wile_E_Coyote
I am aware of the ROOT binaries for Ubuntu but I prefer to compile ROOT from source because it gives me more control on the ROOT plugins and compiler version.

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