Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swiftly also installs lldb on Linux #199

Open
rhoot opened this issue Jan 3, 2025 · 3 comments
Open

Swiftly also installs lldb on Linux #199

rhoot opened this issue Jan 3, 2025 · 3 comments

Comments

@rhoot
Copy link

rhoot commented Jan 3, 2025

I was surprised to find that swiftly also installs lldb in the PATH on Linux, when generally speaking you would want to use the lldb version that comes with your distribution. Worse still is that the version of lldb installed is linked to python 3.9 specifically (same issue the REPL has, as mentioned in #78), so if your distribution doesn't provide that specific version (mine doesn't) lldb won't run. Even if you have a fully functioning lldb install from your dist repos.

$ swiftly list
Installed release toolchains
----------------------------
Swift 6.0.3 (in use)

Installed snapshot toolchains
-----------------------------

$ which lldb
/home/johan/.local/bin/lldb

$ lldb
lldb: error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory

$ /usr/bin/lldb
(lldb)
@cmcgee1024
Copy link
Member

This is a tricky situation because the lldb that comes with the toolchain has the necessary extensions to debug swift code, while the system one might not have that. It's a similar problem with other tools that are in the toolchain, such as clang.

It's strange that swiftly didn't install the system dependencies needed to make its lldb work properly. What version of swiftly are you using for this?

@rhoot
Copy link
Author

rhoot commented Jan 8, 2025

$ swiftly --version
0.3.0

For context I am using Endeavour OS (Arch-based distribution), and just installed swift using swiftly install latest.

Is there any way the swift lldb binary could be renamed perhaps, just so it doesn't conflict with the distribution-provided one? lldb-swift? I don't know if anything has a hard-coded name for the binary to use.

@cmcgee1024
Copy link
Member

The upcoming release of swiftly should be able to install the required system packages on the supported Linux distributions so the lldb should have the required python version installed. In theory it should work as good or better than the system installed lldb.

I'm not sure how best to support swift toolchain in an unsupported Linux distribution, such as Arch/Endeavour. There can be other problem areas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants