ROOT 6 Build From Source Error on Ubuntu 14.04 LTS

Hi All,

I’m trying to install ROOT 6 from source on my Ubuntu 14.04 LTS machine, but I’m running into an error. Here is my architecture:

uname -a
Linux ThinkPad-Edge-E540 3.13.0-76-generic #120-Ubuntu SMP Mon Jan 18 15:59:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Here are the steps I’m taking to install ROOT 6 (after totally purging ROOT 5 from my machine) as per the building ROOT page:

cd ~/applications/bin/
git clone http://root.cern.ch/git/root.git
cd root/build/
cmake -Droofit=ON ../
cmake --build .

At this point the build goes up through 52% and then stops with the following error:

[ 52%] Generating tutorials/hsimple.root
/home/mcf/applications/bin/root/build/bin/root: can't start ROOT -- check that /home/mcf/applications/bin/root/build/bin/root.exe exists!
make[2]: *** [tutorials/hsimple.root] Error 1
make[1]: *** [CMakeFiles/hsimple.dir/all] Error 2
make: *** [all] Error 2

~/applications/bin/root/build/bin/root.exe does not exist (unsurprisingly). I don’t understand why this is happening. Any thoughts or suggestions would be greatly appreciated.

Try: cd ~/applications/bin/ rm -rf root_source root git clone http://root.cern.ch/git/root.git root_source mkdir root cd root unset ROOTSYS cmake -Dall="ON" -Dsoversion="ON" ../root_source >> cmake.out.txt 2>&1 cmake --build . >> cmake.out.txt 2>&1

There was a dependency missing to root.exe. This was corrected in the master last Friday evening. Please try again.

Pepe Le Pew,

If I run with

cmake -Dall="ON" -Dsoversion="ON" ../root_source >> cmake_Dall_fail.out.txt 2>&1

It fails with

If I run with just roofit enabled,

cmake -Dall="ON" -Dsoversion="ON" ../root_source >> cmake_Droofit_fail.out.txt 2>&1
cmake --build . >> cmake_Droofit_fail.out.txt 2>&1

cmake will initially pass, but then fail with my original error.
cmake_Droofit_fail.out.txt (214 KB)
cmake_Dall_fail.out.txt (21.8 KB)

Mato, I pulled from git this morning (2016-01-31) to try again and am still encountering the same problems. Should I expect that the dependency should be ready to be pulled by tomorrow morning?

Thanks for reporting. Try again please. I have committed a fix to master branch.

Hi Pepe. I have added some protection to missing Qt3 support in Qt4 (QT_QT3SUPPORT_INCLUDE_DIR).

From what you say, it seems that ROOT (via cmake) detected qt4 and did not find qt3 support.
This should NOT be possible.
On Ubuntu 14.04, qt3 binary support is part of the “libqt4-qt3support” package which will automatically be installed by the “libqt4-dev” package (i.e. as soon as “development” files for qt4 are there also the qt3 support, including “development” files, is there).
So, it is NOT possible that qt3 support is missing when qt4 support is there.
Looking at my “CMakeCache.txt” for ROOT v6-06-00, I have:
QT_QT3SUPPORT_INCLUDE_DIR:PATH=/usr/include/qt4/Qt3Support
QT_QT3SUPPORT_INCLUDE_DIR-ADVANCED:INTERNAL=1

Hi Pepe. Then I do not understand anything. CMake should not have complained if QT_QT3SUPPORT_INCLUDE_DIR was defined.

Hi All,

After pulling the latest version from git I am now able to get farther, but I still get an error that kills the build. I did a double check and have confirmed that all the required and optional prerequisite packages installed.
My build commands:

cd ~/applications/bin/
rm -rf root_source root
git clone http://root.cern.ch/git/root.git root_source
mkdir root
cd root
unset ROOTSYS
cmake -Dall="ON" -Dsoversion="ON" ../root_source >> cmake.out.txt 2>&1
cmake --build . >> cmake.out.txt 2>&1

The fatal error:

[ 45%] Generating G__QtGSI.cxx, ../../lib/libQtGSI_rdict.pcm, ../../lib/libQtGSI.rootmap
In file included from input_line_12:24:
/home/mcf/applications/bin/root/include/TQRootDialog.h:31:12: fatal error: 'q3vbox.h' file not found
#  include "q3vbox.h"
           ^
Error: ../../bin/rootcling: compilation failure (/home/mcf/applications/bin/root/lib/libQtGSIb24e1b2c8c_dictUmbrella.h)
make[2]: *** [gui/qtgsi/G__QtGSI.cxx] Error 1
make[1]: *** [gui/qtgsi/CMakeFiles/G__QtGSI.dir/all] Error 2
make: *** [all] Error 2

The log file is attached.

Any further thoughts or suggestions?
cmake.out.txt (192 KB)

Does your installation of Qt4 has a support for Qt3? In other words does the file is looking (q3vbox.h) for exists in our installation under /home/mcf/anaconda/…?

Can you, please, run:

locate q3vbox.h
dpkg --list “*”|grep ii|grep -i qt

I think there is a potential caveat … in my setup, q4 is the “default”, so I cannot test it … however, if you make qt5 the “default” and install qt5 with its “development” files, then there is probably a qt4 compatibility layer included (at least some “partial”?), but possibly qt3 compatibility is dropped completely (so ROOT detects qt4 and a missing qt3).

Hi,
I build root git from xenial 16.04, I guess with recent ubuntu it should work too ?
I got the source this way : git clone root.cern.ch/git/root.git, before compiling it’s better to try to get necessary most libs this way :
sudo apt-get build dep root
You should have to install quiet a lot ?
cd root
./configure && make j-9
(j-9 for me because I have a core 8 +1) so adapt to yours …
when finised just run root
I use ipython /jupyter notebook with rootpy so I made a link
sudo ln -s root/root /usr/bin/root
(adapt to your path too… For me it’s sudo ln -s /home/riri/root/root /usr/bin/root
and then if you type root from your home it should work.
I had no problem at all installing it this way.
Another method is installing root-system ver. 5.34 from repo, but if you do so after you might have problems if you want to compile it later. For most work it’s enaught but not for jupyter notebook.
Kind regards
Henri

Hi Pepe and Mato,

Here is my output:

$ locate q3vbox.h
/usr/include/qt4/Qt/q3vbox.h
/usr/include/qt4/Qt3Support/q3vbox.h

and I’ve attached the output of

dpkg --list "*"|grep ii|grep -i qt

I apologize that I am completely ignorant to the subtleties of the problem at the moment, but I appreciate your continued help.

Henri, thank you for your suggestion, however, I am trying to do this build without relying on the ROOT 5 way of doing thins with ./configure, as it seems that the future of LTS with ROOT will be with CMake. Please feel free to correct me if I am making an incorrect assumption.
dpkg_list.out.txt (17.4 KB)

It seems to me that you have all required system packages installed.
Looking at your “cmake.out.txt” file again, you seem to have another qt4 version installed in “/home/mcf/anaconda/…” (there’s the “/home/mcf/anaconda/bin/qmake” which reports qt “4.8.7”). I think you need to get rid of it completely (so that the system default qt4 version is used) or you need to install some additional anaconda qt3 backwards compatibility related packages to your new qt “4.8.7”.

It is possible for me to just do

cmake -Dall="ON" -Dsoversion="ON" -Dqt="OFF" -Dqtgsi="OFF" ../root_source >> cmake.out.txt 2>&1

?

I’m not sure what Qt actually does in terms of graphics (is it what actually runs the graphics for GUIs like TBrowser?), so would disabling these build options likely cause further problems? I’m not unwilling to get rid of anaconda’s v of qt4, but I’d just prefer not to if possible.

I think you can safely switch qt off in root.

As a summary, Pepe’s solution of turning off qt was the key.

Here are the set of instrutions that resulted in a working build for me (without having to get rid of anaconda’s version of qt):

cd ~/applications/bin/
rm -rf root_source root
git clone http://root.cern.ch/git/root.git root_source
mkdir root
cd root
unset ROOTSYS
cmake -Dall="ON" -Dsoversion="ON" -Dqt="OFF" -Dqtgsi="OFF" ../root_source >> cmake.out.txt 2>&1
cmake --build . >> cmake.out.txt 2>&1
sudo cmake --build . --target install
source bin/thisroot.sh

Many thanks to everyone for their patience and help!

You didn’t set “CMAKE_INSTALL_PREFIX” so you should not call “cmake … --target install” (you built ROOT “in-place” so don’t try to “install” it as the procedure may be broken somehow, you never know).
Note also: I think that, as soon as you set -Dqt=“OFF”, you do not need to set -Dqtgsi=“OFF” (it will be internally done automatically).

Ah, thank you. I think the Building ROOT documentation page should be updated, as that was not very clear to me: