Error installing ALICE-O2 framework using aliBuild in Clang

Hello,

I have a trouble with doing

aliBuild build O2 --defaults o2 --debug

It fails at the building of Clang with error message:

2022-11-07@02:12:36:DEBUG:O2Physics:Clang:0: FAILED: tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o

2022-11-07@02:12:36:DEBUG:O2Physics:Clang:0: /usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/rohaan/alice/sw/BUILD/5a27fb04ce0ef48f81b6fa90993838ab1f51069d/Clang/tools/clang/lib/ASTMatchers/Dynamic -I/home/rohaan/alice/sw/SOURCES/Clang/v13.0.0/llvmorg-13.0.0/clang/lib/ASTMatchers/Dynamic -I/home/rohaan/alice/sw/SOURCES/Clang/v13.0.0/llvmorg-13.0.0/clang/include -I/home/rohaan/alice/sw/BUILD/5a27fb04ce0ef48f81b6fa90993838ab1f51069d/Clang/tools/clang/include -I/home/rohaan/alice/sw/BUILD/5a27fb04ce0ef48f81b6fa90993838ab1f51069d/Clang/include -I/home/rohaan/alice/sw/SOURCES/Clang/v13.0.0/llvmorg-13.0.0/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -fno-exceptions -std=c++14 -MD -MT tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o -MF tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o.d -o tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o -c /home/rohaan/alice/sw/SOURCES/Clang/v13.0.0/llvmorg-13.0.0/clang/lib/ASTMatchers/Dynamic/Registry.cpp

2022-11-07@02:12:36:DEBUG:O2Physics:Clang:0: c++: fatal error: Killed signal terminated program cc1plus

2022-11-07@02:12:36:DEBUG:O2Physics:Clang:0: compilation terminated.

2022-11-07@02:13:03:DEBUG:O2Physics:Clang:0: ninja: build stopped: subcommand failed.

2022-11-07@02:13:03:ERROR:O2Physics:Clang:0: Error while executing /home/rohaan/alice/sw/SPECS/ubuntu2204_x86-64/Clang/v13.0.0-local1/build.sh on `Excalibur’.

2022-11-07@02:13:03:ERROR:O2Physics:Clang:0: Log can be found in /home/rohaan/alice/sw/BUILD/Clang-latest/log

2022-11-07@02:13:03:ERROR:O2Physics:Clang:0: Please upload it to CERNBox/Dropbox if you intend to request support.

2022-11-07@02:13:03:ERROR:O2Physics:Clang:0: Build directory is /home/rohaan/alice/sw/BUILD/Clang-latest/Clang.

It is bit strange for me because there seems no critical reason of error on
the log.

Could anyone give me suggestion?

Hi Rohaan,

The error in the log you posted is the following:

2022-11-07@02:12:36:DEBUG:O2Physics:Clang:0: c++: fatal error: Killed signal terminated program cc1plus

This message indicates that the compiler was killed by the system, most probably because it ran out of memory. Try re-running the aliBuild command with a low number for -j in order to make aliBuild run fewer compiler processes in parallel, for instance like so:

aliBuild build O2 --defaults o2 --debug -j 8

A safe value might be half the number of cores in your computer. Run nproc to see how many cores you have, halve the number it gives you and pass that to -j.