LLVM Discussion Forums

Unable to install LLVM

I’m trying to install LLVM-7.0.1 on BLFS 8.4 using commands (below) after extracting it in /sources/BLFS.

mkdir -v build &&
cd build &&

CC=gcc CXX=g++
cmake -DCMAKE_INSTALL_PREFIX=/usr
-DLLVM_ENABLE_FFI=ON
-DCMAKE_BUILD_TYPE=Release
-DLLVM_BUILD_LLVM_DYLIB=ON
-DLLVM_LINK_LLVM_DYLIB=ON
-DLLVM_TARGETS_TO_BUILD=“host;AMDGPU;BPF”
-DLLVM_BUILD_TESTS=ON
-Wno-dev -G Ninja … &&
ninja

I had run this command in /sources/BLFS/llvm-7.0.1-src

The Error is " internal compiler error: segmentation fault "
It fails at various .cpp files.

This seems to be your host GCC crashing? Which version of gcc are you using?
Can you post maybe more context (a few lines of the log) around the error?

I am using gcc 8.2.0
I think that the problem is due to bad ram and I have put my laptop on repair.
Therefore I cannot show any log files today but the problem mostly occurred in “utils/TableGen/_____ .cpp”
For example DAGISelMatcherEmitter.cpp or GlobalISelEmitter.cpp

Thanks @joker-eph.
Finally it did compile.
As I thought the culprit was the faulty ram. I just removed a module which I guessed could be the faulty one and it did work!