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

Support lower versions of glibc in precompiled packages #545

Open
nstinus opened this issue Oct 14, 2021 · 8 comments
Open

Support lower versions of glibc in precompiled packages #545

nstinus opened this issue Oct 14, 2021 · 8 comments
Labels
enhancement Enchancement request

Comments

@nstinus
Copy link

nstinus commented Oct 14, 2021

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

@nstinus nstinus added the enhancement Enchancement request label Oct 14, 2021
@vadimcn
Copy link
Owner

vadimcn commented Oct 15, 2021

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
Copy link

jhfrontz commented Sep 9, 2022

@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
Copy link
Owner

vadimcn commented Sep 9, 2022

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
Copy link

7c00 commented Oct 11, 2022

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

@mak3
Copy link

mak3 commented Dec 15, 2022

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
Copy link
Owner

vadimcn commented Dec 17, 2022

@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?

@michaeleisel
Copy link

@vadimcn are you able to facilitate people building for their platform of choice in some way? For instance, I'm just curious to know, how'd you build liblldb.so without almost any dependencies? When I run ldd lldb.so with the CodeLLDB library, I see only the most basic .so files being linked in. But when I try with my own copy of lldb.so, I see lots of other ones like libplace.so

@vadimcn
Copy link
Owner

vadimcn commented Mar 10, 2025

@michaeleisel: static linking and getting rid of the dependencies that cannot be linked statically (like libreadline).

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

No branches or pull requests

6 participants