Build failing on macOS 11.6 while linking clang-pseudo

Hi, I’m following the build instruction for “LLDB standalone for development with Xcode”. When I run ninja -C /path/to/llvm-build, it compiles for a while and then fails with:

[2/362] Linking CXX executable bin/clang-pseudo
FAILED: bin/clang-pseudo
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[11/362] Building CXX object tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o

full output at: ninja out · GitHub

I have read a stack overflow post saying that it’s probably ld running out of memory; however, I have 16gb ram in the laptop and activity monitor shows that total “Memory Used” is only 10-12gb during compilation.

You’re not running out of memory. If that were the case you’d see something along the lines of “killed: 9” on macOS. The problem is that the linker can’t find one or more symbols:

ld: symbol(s) not found for architecture x86_64

The linker tells you which symbols are missing in the output that you replaced with .... If you’re building ToT, it’s always possible that the branch was in a temporarily broken state. I would recommend pulling before trying again.