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
…
[ 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
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.
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.