ROOT 6 Build From Source Error on Ubuntu 16.04 LTS

I think that in the current master branch of ROOT 6.09 RcppCommon.h is either missing or not being found properly.

System Information:

uname -a
Linux mcf-ThinkPad-Edge-E540 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
g++ --version | grep g++
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
gcc --version | grep gcc
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

I have the latest version of all required and optional prerequisite packages.
[url=https://root-forum.cern.ch/t/locate-like-command/65/1 to this other issue[/url] I’m attempting to build from source using a script which does the following:

cd
git clone http://root.cern.ch/git/root.git root_src
mkdir root_build
cd root_build
unset ROOTSYS
cmake -Dall="ON" -Dsoversion="ON" -Dqtgsi="OFF" ../root_src >> cmake.out.txt 2>&1
cmake --build . -- -j4 >> cmake.out.txt 2>&1
sudo cmake -DCMAKE_INSTALL_PREFIX=/usr/local/root/ -P cmake_install.cmake >> cmake_install.out.txt 2>&1

which now fails during the cmake --build stage with the following (log file is attached)

[ 56%] Generating G__TMVAGui.cxx, ../../lib/libTMVAGui_rdict.pcm, ../../lib/libTMVAGui.rootmap
In file included from input_line_12:6:
In file included from /home/mcf/root_build/include/TRInterface.h:16:
In file included from /home/mcf/root_build/include/TRObject.h:15:
/home/mcf/root_build/include/RExports.h:68:9: fatal error: 'RcppCommon.h' file not found
#include<RcppCommon.h>
        ^
Error: /home/mcf/root_build/bin/rootcling: compilation failure (/home/mcf/root_build/lib/libRInterface5425c2c572_dictUmbrella.h)
bindings/r/CMakeFiles/G__RInterface.dir/build.make:72: recipe for target 'bindings/r/G__RInterface.cxx' failed
make[2]: *** [bindings/r/G__RInterface.cxx] Error 1
CMakeFiles/Makefile2:22896: recipe for target 'bindings/r/CMakeFiles/G__RInterface.dir/all' failed
make[1]: *** [bindings/r/CMakeFiles/G__RInterface.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 56%] Built target G__MySQL
[ 56%] Built target G__TMVAGui
[ 56%] Built target G__TMVA
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Any thoughts? Also, is this the appropriate forum for these questions or should I be posting things like this in JIRA?
cmake.out.txt (282 KB)

Does your installation on R has the ‘Rcpp’ modules? This is required as it says in the pre-requisites.
You can disable R with -Dr=OFF if you wish.
Pere

I am very sorry to have made this mistake, but you are quite correct, Mato. I had recently purged and reinstalled R and in doing so forgot to reinstall Rcpp and RInside (as outlined in the Ubuntu Build Prerequisites page).

Thank you for your help and patience.

As this is in the same vein of problem I thought I’d post back in this tread again.

System Information:

$ uname -a
Linux mcf-ThinkPad-Edge-E540 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ g++ --version | grep g++
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
$ gcc --version | grep gcc
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

As far as I know I really do (this time) have the latest version of all required and optional prerequisite packages.

The most simplified version of my script does

cd
git clone http://root.cern.ch/git/root.git root_src
mkdir root_build
cd root_build
unset ROOTSYS
cmake -Dall="ON" -Dsoversion="ON" -Dqtgsi="OFF" ../root_src >> cmake.out.txt 2>&1
cmake --build . -- -j8 >> cmake.out.txt 2>&1
sudo cmake -DCMAKE_INSTALL_PREFIX=/usr/local/root/ -P cmake_install.cmake >> cmake_install.out.txt 2>&1

and in this case I’m using a rebuild option in my script which is essentially just skipping the mkdir parts and pulling down changes from the master branch into root_src before building.

My build now fails during the cmake --build stage with the following (in cmake.out.txt)

make[2]: *** No rule to make target '/home/mcf/root_src/math/genvector/inc/Math/LinkDef_Point3D.h', needed by 'math/genvector/G__GenVector.cxx'.  Stop.
CMakeFiles/Makefile2:16293: recipe for target 'math/genvector/CMakeFiles/GenVector.dir/all' failed

And as a check, it is seen that LinkDef_Point3D.h doesn’t exist where CMake wants it to.

$ cd
$ find . -iname "*Point3D.h" 2>/dev/null 
./root_build/include/Math/Point3D.h
./root_build/etc/dictpch/math/genvector/inc/Math/LinkDef_Point3D.h
./root_src/math/genvector/inc/Math/Point3D.h
$ find . -iname "*G__GenVector.cxx" 2>/dev/null 
./root_build/math/genvector/G__GenVector.cxx

Any thoughts on this, or if I’m doing something wrong?

Hi,

that’s a consequence of a recent change that broke our CMake setup. This is what worked for me:

cd your-build-directory
rm -rf math/genvector
cmake .
make -j 8

Cheers, Axel

1 Like

Yup. Thanks.

I guess this is a good reminder that when encountering a failing build I should always do a clean install to make sure that I’m not failing on an artifact.

Well, usually our build system behaves better than in this case. We do incremental builds for every single merge, i.e. this is supposed to work, in principle.

Axel