Skip to content

[LLDB] Issues running LLDB API and Shell tests on MacOS #130171

@wizardengineer

Description

@wizardengineer

Summary

I wanted to mess around with the LLDB code base, it compiled perfectly fine and was able to run /bin/lldb in the build folder, but when it came to running ninja check-lldb-shell or ninja check-lldb-api, I ran in to several issues. I also create a fresh clone of LLVM without any code being modified, however, I still ran into the same issues shown below.

Environment

OS: macOS 15.3.1 24D70 arm64
Host: Mac14,7
Kernel: 24.3.0
Uptime: 1 day, 5 hours, 49 mins
Packages: 255 (brew)
Shell: zsh 5.9
Resolution: 1440x900
DE: Aqua
Terminal: ghostty
CPU: Apple M2
GPU: Apple M2
Memory: 1498MiB / 8192MiB

Commands

CMake

cmake -G Ninja \
  -DCMAKE_BUILD_TYPE=Release \
  -DLLVM_ENABLE_PROJECTS='clang;lldb;lld' \
  -DCMAKE_C_COMPILER=clang \
  -DCMAKE_CXX_COMPILER=clang++ \
  -DLLVM_TARGET_ARCH=AArch64 \
  -DLLVM_USE_LINKER=lld \ -C ../lldb/cmake/caches/Apple-lldb-macOS.cmake \
  -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi;libunwind' \
  ../llvm

Ninja

Running ninja check-lldb-api:

Command Output (stdout):
--
lldb version 21.0.0git (https://github.com/wizardengineer/llvm-project.git revision b18e5b6a36399f11ba1152875b6892900c5afdaf)
  clang revision b18e5b6a36399f11ba1152875b6892900c5afdaf
  llvm revision b18e5b6a36399f11ba1152875b6892900c5afdaf

--
Command Output (stderr):
--
No entry for terminal type "xterm-ghostty";
using dumb terminal settings.
No entry for terminal type "xterm-ghostty";
using dumb terminal settings.
No entry for terminal type "xterm-ghostty";
using dumb terminal settings.
Traceback (most recent call last):
  File "/Users/juliusalexandre/GitDownloads/llvm-project/lldb/test/API/dotest.py", line 8, in <module>
    lldbsuite.test.run_suite()
    ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/Users/juliusalexandre/GitDownloads/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py", line 1042, in run_suite
    checkLibcxxSupport()
    ~~~~~~~~~~~~~~~~~~^^
  File "/Users/juliusalexandre/GitDownloads/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py", line 799, in checkLibcxxSupport
    result, reason = canRunLibcxxTests()
                     ~~~~~~~~~~~~~~~~~^^
  File "/Users/juliusalexandre/GitDownloads/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py", line 770, in canRunLibcxxTests
    from lldbsuite.test import lldbplatformutil
  File "/Users/juliusalexandre/GitDownloads/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py", line 11, in <module>
    from packaging import version
ModuleNotFoundError: No module named 'packaging'

--

Running ninja check-lldb-shell:

********************
FAIL: lldb-shell :: Settings/TestFrameFormatName.test (13 of 587)
******************** TEST 'lldb-shell :: Settings/TestFrameFormatName.test' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
Cleaning TestFrameFormatName.test.tmp.out-names.o
Cleaning TestFrameFormatName.test.tmp.out

compiling names.cpp -> TestFrameFormatName.test.tmp.out-names.o
  STDOUT:

linking TestFrameFormatName.test.tmp.out-names.o -> TestFrameFormatName.test.tmp.out
  STDOUT:

  STDERR:
    dyld[85512]: Symbol not found: __ZdaPv
      Referenced from: <8A9B97F0-17A9-3203-AE08-5C5E06804A15> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
      Expected in:     <4C4C441E-5555-3144-A11A-55AB0A093AF7> /Users/juliusalexandre/GitDownloads/llvm-project/build/lib/libc++.1.0.dylib
    clang++: error: unable to execute command: Abort trap: 6
    clang++: error: linker command failed due to signal (use -v to see invocation)


--
Command Output (stderr):
--
RUN: at line 4: '/opt/homebrew/opt/[email protected]/bin/python3.13' /Users/juliusalexandre/GitDownloads/llvm-project/lldb/test/Shell/helper/build.py --compiler=any --arch=64 --tools-dir=/Users/juliusalexandre/GitDownloads/llvm-project/build/./bin --libs-dir=/Users/juliusalexandre/GitDownloads/llvm-project/build/./lib /Users/juliusalexandre/GitDownloads/llvm-project/lldb/test/Shell/Settings/Inputs/names.cpp --std c++17 -o /Users/juliusalexandre/GitDownloads/llvm-project/build/tools/lldb/test/Shell/Settings/Output/TestFrameFormatName.test.tmp.out
+ /opt/homebrew/opt/[email protected]/bin/python3.13 /Users/juliusalexandre/GitDownloads/llvm-project/lldb/test/Shell/helper/build.py --compiler=any --arch=64 --tools-dir=/Users/juliusalexandre/GitDownloads/llvm-project/build/./bin --libs-dir=/Users/juliusalexandre/GitDownloads/llvm-project/build/./lib /Users/juliusalexandre/GitDownloads/llvm-project/lldb/test/Shell/Settings/Inputs/names.cpp --std c++17 -o /Users/juliusalexandre/GitDownloads/llvm-project/build/tools/lldb/test/Shell/Settings/Output/TestFrameFormatName.test.tmp.out

--

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions