LLDB broken in Swift 5.2 development snapshots

I checked a few recent Swift 5.2 development snapshots from swift.org/downloads (specifically January 13, January 11, and January 6 2020). In every snapshot, I receive the same error when I try to launch LLDB:

dyld: Library not loaded: @rpath/LLDB.framework/Versions/A/LLDB
Referenced from: /{redacted}/Toolchains/swift-5.2-DEVELOPMENT-SNAPSHOT-2020-01-13-a.xctoolchain/usr/bin/lldb
Reason: image not found
Abort trap: 6

To launch LLDB, I've been setting a "TOOLCHAINS" environment variable with the CFBundleIdentifier of the relevant toolchain (from its Info.plist file) and then running xcrun lldb. This works fine in the latest version of the development snapshot from master, but fails with the above error for the Swift 5.2 toolchains. I also noticed that when I try to use the Swift 5.2 toolchain in Xcode, when I use the debugger Xcode launching the packaged version of LLDB instead of the one from the selected toolchain which makes me think LLDB isn't working for Xcode either.

Do I need to launch LLDB differently in the Swift 5.2 toolchain, or is LLDB in the toolchain broken?

1 Like

@dcci Hello - I think this sounds identical to a regression that you fixed here: LLDB Broken in Nightly Toolchains

Could you take a look at this one? My apologies if this isn't actually related to that issue or what you're working on now.

I thought it was fixed, but I haven't downloaded one of these toolchains in a while.
@vedantk is the last one who touched that code, maybe he has some guess?

1 Like

The fix wasn't merged into the 5.2 branch:

g diff master -- utils/build-script-impl | grep LLDB_FRAMEWORK_INSTALL_DIR
-                    -DLLDB_FRAMEWORK_INSTALL_DIR="$(get_host_install_prefix ${host})../System/Library/PrivateFrameworks"
1 Like

I'll merge it later today, and it should be available in the next day or two.

1 Like

Thank you @vedantk!

I kicked this one off already: https://github.com/apple/swift/pull/29228

1 Like
Terms of Service

Privacy Policy

Cookie Policy