vadimcn / codelldb

A native debugger extension for VSCode based on LLDB
https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb
MIT License
2.55k stars 246 forks source link

Support lower versions of glibc in precompiled packages #545

Open nstinus opened 3 years ago

nstinus commented 3 years ago

Hi,

I'd like to use this package on Centos-7 for remote debugging. Alas, the libc available is 2.17. Could you provide a pre-compiled version that either supports a lower glibc or is fully statically linked?

Thanks

vadimcn commented 3 years ago

This has come up before, e.g. #268, #259.

I am not opposed to supporting older Linux versions in general, however, this should not add too much maintenance burden.
At the moment I don't have a sane way of building native binaries for glibc <2.17. Specifically, I need a Docker image that can support a c++ compiler capable of building modern LLVM and also have cross- libraries for cross-compilation to arm and arm64. The lowest common denominator I've managed to find is Ubuntu 16.04. Unfortunately, that uses glibc 2.17, whereas Centos7 has 2.16. (I suspect this is for a good reason: the APIs missing from glibc 2.16 seem to be related to support of c++11 features, which, btw, is the minimum version needed to build LLVM these days) Maybe there's a better way, but I am not aware of it. And I've spent too much time on build issues already. Unless someone can point me to a ready-made solution... sorry, this ain't happening...

jhfrontz commented 2 years ago

@vadimcn maybe I'm misunderstanding your need, but I was able to build the latest rust-analyzer ("nightly" just downloaded on 09 Sep 2022) on Centos 7 (with "rustc 1.63.0 (Red Hat 1.63.0-1.el7)"). Are you wanting to be able to do more than that in the container you're looking for?

vadimcn commented 2 years ago

Are you wanting to be able to do more than that in the container you're looking for?

Yes: rust-analyzer is a pure Rust project, but I need to build LLDB too (which means also compiling most of LLVM and clang).

7c00 commented 2 years ago

Is it possible to build the adaptor and lldb using a centos 7 image? Then we could finally fix all glibc related issues.

mak3 commented 1 year ago

At the moment I don't have a sane way of building native binaries for glibc

Could it help to use statically linked musl libc/Alpine docker and fully get rid of glibc dependency?

vadimcn commented 1 year ago

@mak3 Please see my comment above. In addition, there's now a new requirement: LLVM 16 wants libstdc++ version to be at least 7.1.
Are you willing to put in the effort to produce a container with a build environment that satisfies these constraints?