-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
lldb missing from mac and linux packages #359
Comments
Right, this was one of the things that were sacrificed in the transition to building the releases with github actions (along with clang-tools-extra in the unix based packages), mentioned in #336. In the 16.0.0 release (which was built manually), I'm fairly sure LLDB was available on all platforms. It's good input to hear that LLDB is wanted in those packages too (when it was included, I mostly got the question about why it was there). I guess it could be possible to add LLDB into the build on Github without exceeding the per-job time limits; each pipeline run will take slightly longer of course, but I guess it can be tolerated if there's a concrete desire to have LLDB included there. |
To speed up things you could use some caching via This is what we do at Qt Creator https://github.com/qt-creator/qt-creator/actions Besides loading of MiniDump core files I can think of remote debugging from a Linux/mac machine to a Windows one. You can easily get a Windows 11 VM machine from https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/ but might not want to develop on a Windows machine, which has slow file access, but deploy and remote debug an application. This is where you need a |
FWIW, there's usually not much benefit from that when I'm just building the LLVM projects nightly; almost every day (except for some day on the weekends), enough common headers are changed so that essentially every single file needs to be rebuilt anyway. But I guess it could be useful for speeding up multiple rebuilds of the same LLVM version - possibly. (For local development of LLVM, ccache is quite useful though.) Caching is useful for the first stage in the build process (building LLVM with a system provided toolchain), but for the second stage, building code with the just-built Clang, we can't really benefit from caching since we're using a brand new compiler each time and we need to test that it actually ends up right when built with this exact compiler.
Thanks for the pointer!
Yep, these are all good usecases. |
Even though Python is needed for Qt Creator's lldb usage, Qt Creator is getting also support for the Debug Adapter Protocol (DAP) and might not be such a big deal. |
Ok, great! Yeah, for the Windows packages, we bundled a (minimal) copy of python. For macOS, it is messy to get a system-provided version of Python to rely on, and for Linux I'd prefer not to (even if it's probably easy to rely on the base distribution) since it makes the tools less portable across distributions. And I wouldn't want to spend time/effort/space on bundling a selfcontained copy of Python in the unix packages. |
The later LLVM 17.x based releases candidates, and the stable releases, should include LLDB in the unix based builds now as well, so I think this issue is done. |
I've forgotten that the lldb doesn't come with python 'batteries' for macOS. I was trying to configure a LLVM MinGW toolchain with Qt Creator and CMakePresets with the ability to register a debugger, and then noticed that python bindings are missing... 😔 #430 worked fine in helping me test https://bugreports.qt.io/browse/QTCREATORBUG-29880 😀 |
As it turns out See https://lldb.llvm.org/use/variable.html#python-scripting and https://lldb.llvm.org/use/variable.html#synthetic-children For a moment I thought that one could use the |
I guess if this really is desired, the way forward would be to build a minimal cpython install that we bundle along with the package, just like we do for Windows. I guess most of the groundwork for this already has been done, and it could mostly be a case of adapting things for doing the bundling/packaging for Linux/macOS. |
The build steps are the same, we just need to swap |
Ah, right, one might need to mess around with setting rpaths or similar, to get it work properly self-contained. Anyway, to be clear, this isn't something I'm actively seeing myself picking up in the near future, but I wouldn't mind if someone else wants to pick it up. (Totally unrelated side note; compiling Python produces extremely much log output. When doing it as part of a GitHub Actions job, it produces so much output that GitHub Actions practically stops handling realtime log output from the remainder of that job, although the log output is available afterwards. It's annoying to the point that I've considered, but not yet implemented, splitting out building python into a separate step - it'd complicate the scripts, but would make it more possible to observe the later build of LLVM while it still is running.) |
Is it mostly from |
Yes - but that's not ideal either... If anything fails, we're entirely blind and don't even have an initial clue about what went wrong. Ideally, we'd do e.g. what ninja does, silence printing the actual commands by default, but print the failing command if something failed. But IIRC the regular make output is only one part of it; most of it is their own python based compilation of modules and such. We could of course pipe the output to a file, and print that if something failed. But then we also lose the realtime aspect of seeing what's happening while compiling, getting some feel of what's happening.
If that's possible, that'd be great! |
There is I also found |
Thanks, this cuts down the number of line quite significantly, from 21539 lines of log output, to 14653 lines. (This includes building libffi and cpython twice each.)
It does indeed affect the quality of the output quite a bit - the python part of the build runs entirely blind - but the output still is 13303 lines (libffi, and the configure parts, and other bits). But it reduces the size of the log a bit - most of the omitted lines are fairly long; cutting down the log size from 1.5 MB at this point (2.3 MB before
|
FYI, I tried to break down the different contributions to the log output from building python, and got the following numbers. Initially, before a78eb49, the amount of log output looked like this:
After a78eb49, it looks like this:
If adding
Out of the 4000 lines in
2874 are of this type:
And 207 are of this type:
|
These lines come from |
If I search after the
clang++
compiler I can find:The same for the
ld.lld
linker:But for the
lldb
debugger only the Windows package contains it:I expected the debugger to be present into the linux and mac releases. Could be useful for doing
MiniDump
core analysis without having to have a Windows machine.The text was updated successfully, but these errors were encountered: