Problem installing ROOT 6.08.00 un Ubuntu 16.10

I have a new Ubuntu 16.10 installation, with default values. I installed a few packages missing:
sudo apt-get -y install libx11-dev
sudo apt-get -y install libxpm-dev
sudo apt-get -y install libxft-dev
sudo apt-get -y install libxext-dev
sudo apt-get -y install cmake

and tried installing 6.08.00 (also 6.06.08, and even a few 5.XX versions) the old way:
./configure
make

and this is what I get

[ 73%] Building CXX object tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/clangDynamicASTMatchers.dir/Registry.cpp.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/clangDynamicASTMatchers.dir/build.make:134: recipe for target ‘tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/clangDynamicASTMatchers.dir/Registry.cpp.o’ failed
make[3]: *** [tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/clangDynamicASTMatchers.dir/Registry.cpp.o] Error 4
make[3]: Leaving directory '/home/gamos/gamos/external/root/6.08.00/root/interpreter/llvm/obj’
CMakeFiles/Makefile2:8464: recipe for target ‘tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/clangDynamicASTMatchers.dir/all’ failed
make[2]: *** [tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/clangDynamicASTMatchers.dir/all] Error 2
make[2]: Leaving directory '/home/gamos/gamos/external/root/6.08.00/root/interpreter/llvm/obj’
Makefile:149: recipe for target ‘all’ failed
make[1]: *** [all] Error 2
make[1]: Leaving directory ‘/home/gamos/gamos/external/root/6.08.00/root/interpreter/llvm/obj’
/home/gamos/gamos/external/root/6.08.00/root/interpreter/llvm/Module.mk:99: recipe for target ‘interpreter/llvm/inst/lib/libclangSema.a’ failed
make: *** [interpreter/llvm/inst/lib/libclangSema.a] Error 2

Hi,

Could you try with CMake?

Cheers, Bertrand.

What version of the compiler is installed on Ubuntu 16.10?

It is gcc version 6.2.0

I also tried with cmake:
cmake -DCMAKE_INSTALL_PREFIX="/home/gamos/gamos/external/root/6.08.00/root.cmake" -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -Dcxx14=“ON” -Dall=“ON” -Ddavix=“OFF” -Dr=“OFF” -Dpythia8=“OFF” -Dgeocad=“ON” -Dbuiltin_ftgl=“OFF” -Dbuiltin_glew=“OFF” -Dsoversion=“ON” …/root

make

[ 51%] Building CXX object core/utils/CMakeFiles/rootcling_tmp.dir/rootcling_tmp.cxx.o
{standard input}: Assembler messages:
{standard input}:95896: Warning: end of file not at end of a line; newline inserted
{standard input}:97910: Warning: zero assumed for missing expression
{standard input}:97907: Error: invalid operands (UND and .gcc_except_table sections) for `-'
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
core/utils/CMakeFiles/rootcling_tmp.dir/build.make:134: recipe for target ‘core/utils/CMakeFiles/rootcling_tmp.dir/rootcling_tmp.cxx.o’ failed
make[2]: *** [core/utils/CMakeFiles/rootcling_tmp.dir/rootcling_tmp.cxx.o] Error 4
CMakeFiles/Makefile2:13932: recipe for target ‘core/utils/CMakeFiles/rootcling_tmp.dir/all’ failed
make[1]: *** [core/utils/CMakeFiles/rootcling_tmp.dir/all] Error 2
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2

I think you don’t need -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" any more

Now it fails in another place:

cmake -DCMAKE_INSTALL_PREFIX="/home/gamos/gamos/external/root/6.08.00/root.cmake" -Dcxx14=“ON” -Dall=“ON” -Ddavix=“OFF” -Dr=“OFF” -Dpythia8=“OFF” -Dgeocad=“ON” -Dbuiltin_ftgl=“OFF” -Dbuiltin_glew=“OFF” -Dsoversion=“ON” …/root

make


[ 46%] Building CXX object interpreter/llvm/src/tools/clang/lib/Sema/CMakeFiles/clangSema.dir/SemaExpr.cpp.o
{standard input}: Assembler messages:
{standard input}:106481: Warning: end of file not at end of a line; newline inserted
{standard input}:106834: Error: unknown pseudo-op: `.’
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
interpreter/llvm/src/tools/clang/lib/Sema/CMakeFiles/clangSema.dir/build.make:662: recipe for target ‘interpreter/llvm/src/tools/clang/lib/Sema/CMakeFiles/clangSema.dir/SemaExpr.cpp.o’ failed
make[2]: *** [interpreter/llvm/src/tools/clang/lib/Sema/CMakeFiles/clangSema.dir/SemaExpr.cpp.o] Error 4
CMakeFiles/Makefile2:6763: recipe for target ‘interpreter/llvm/src/tools/clang/lib/Sema/CMakeFiles/clangSema.dir/all’ failed
make[1]: *** [interpreter/llvm/src/tools/clang/lib/Sema/CMakeFiles/clangSema.dir/all] Error 2
Makefile:149: recipe for target ‘all’ failed
make: *** [all] Error 2

How much memory do you have on your machine?

I have found a few places in this build where LLVM executes some complex linker commands that require several gigabytes of RAM (yes, gigabytes!). I had a VM without enough memory allocated which would fail mysteriously when compiling the embedded LLVM within ROOT. When I had the allocated memory increased from 2 to 4 GB these errors went away.

You could possibly tell if this is the problem by looking at the top command output to see if it is taking up a lot of memory. It will likely fail if one of the commands is taking up close to the amount of your total system memory.

I think you might also want to compile with make VERBOSE=1 – otherwise, you can’t see the full commands that are executing and failing.

Hi,

Agreed. More diagnostics: check your free memory while building (e.g. using top); run with make -j2 instead of make -j8 (or even -j1) to reduce the number of memory consuming jobs, at least to find out whether that’s the culprit.

Axel.

That was the solution. Increasing the memory from 1 Gb to 3 Gb makes it work.
Thanks!