-
Notifications
You must be signed in to change notification settings - Fork 55
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
GLIBC_2.32 not found when running under Ubuntu 20.04.6 #25
Comments
Does running the following help: apt update && apt install libc6 ? |
Not really. It returned:
I am not aware how Rust works, but when searching for this error, I found this golang/go#58550 |
Well, I guess the solution would be to build on ubuntu 20.04. I've had issues setting up the build CI and I won't be taking a look at this in the short term, I have too many things to do 😅 For now the best workaround would be to compile
You may encounter some odd compile time errors. |
There is no need to build on Ubuntu 20.04. The build target should be x86_64-unknown-linux-musl for static linking. I did some experiments and the produced binary runs fine with this target. The bad thing is that for this target name, the build happens under Alpine and produces an Alpine binary, which overwrites the same one built on Ubuntu. Maybe some change on the binary names could help, so that musl target is released for both Alpine and Ubuntu. I am not sure if x86_64-unknown-linux-gnu has any advantage over x86_64-unknown-linux-musl. |
We are dealing with this is issue on our Cent OS 8 system. ldd --version
ldd (GNU libc) 2.17 What is the solution to this so far? We really have to compile for older version of GLIBC? |
For the time being yes. You can configure the llm-ls' binary path in every extension, let me know if you're having issues. |
@McPatate thank you for your time and reply. Can you please send me a doc so that I can compile it on our systems? I know how to run Thank you! |
Check my fork, where I disabled the Alpine build and instead released the Ubuntu binary with statically linked GLIBC. Check the released asset llm-ls-x86_64-unknown-linux-musl.gz, it should be usable under older Ubuntu and others. |
@cmosguy let me know if @kalinkrustev's binary works on your platform. Otherwise it should be as simple as running the command provided here: https://www.rust-lang.org/tools/install & running @kalinkrustev want to submit a PR to add the musl build in the release CI? This way we can redirect people on ubuntu that have incompatible GLIBC versions to download it (which at least skips the step of having to build it). |
I was going to submit a PR, until I found the conflict with the Alpine build. This is where I am unsure how to proceed, as I do not know the reasoning behind the naming of the assets. To resolve the conflict, perhaps a new naming should be introduced. As I mentioned - if both Alpine and Ubuntu statically linked releases are needed (the musl one), a new naming is required. |
You can submit your PR with a new naming, I don't see any other way around it. I'll check in the extensions what to update. |
See #33, not so perfect solution at the moment. |
@kalinkrustev I just did a Am I supposed to specify something else that will make this work during the build process? Otherwise, we get these errors when I specify this binary as the exectuable:
|
You need to define |
Thanks @kalinkrustev - Compiling tree-sitter v0.20.10
The following warnings were emitted during compilation:
warning: In file included from src/./././tree_cursor.h:4:0,
warning: from src/././get_changed_ranges.h:8,
warning: from src/./get_changed_ranges.c:1,
warning: from src/lib.c:9:
warning: src/././././subtree.h:35:4: warning: declaration does not declare anything
warning: src/././././subtree.h:146:6: warning: declaration does not declare anything
warning: src/././././subtree.h:153:4: warning: declaration does not declare anything
warning: src/././././subtree.h: In function ‘ts_subtree_leaf_symbol’:
warning: src/././././subtree.h:251:18: error: ‘SubtreeHeapData’ has no member named ‘first_leaf’
warning: src/././././subtree.h: In function ‘ts_subtree_leaf_parse_state’: then completely fails compilation. |
I do not think warnings are the reason. Are you sure you use the code that is currently in the fork's main branch? The automated compilation works fine, as you can see here. Please note that automated compilation (happening in a docker image) is the only one I tested by downloading the published binary and running it on Ubuntu 20. If you are compiling on CentOS, there is no reason to use my fork, as the purpose of it is to cross compile on Ubuntu 22 for other distributions that are with older glibc. |
Yes, I was using your main branch in the fork you did. I thought that the older versions of glibc were all that were required. What version of GLIBC are you running within this setup? I thought even though you were compiling on Ubuntu - it could still work since you were focused on older glibc versions. Does anyone understand how to setup a Centos 8 target in the github workflow yaml? |
I am not sure why you need a new target. Did you try using the binary released here: https://github.com/kalinkrustev/llm-ls/releases/download/main/llm-ls-x86_64-unknown-linux-musl.gz ? |
Thanks @kalinkrustev , I did not realize this was a "release" I thought I had to compile your fork. Anyways, I took your file and unpacked it, then went into my VS code settings and specified: "llm.lsp.binaryPath": "/user/llm-ls-x86_64-unknown-linux-musl", Then reloaded VS code and got an error:
Is there something else I should be doing in my setup? It simply does not work on Centos 8 GLIBC v2.17. |
Oh, and by the way, when I execute this by itself it does nothing:
Also, the original binary version that was installed with the extension on my system is |
When you execute it manually, It is waiting for some input (likely JSON-RPC). You can type some random text and see it respond with a parse error. This will mean that the GLIBC error is resolved. |
cf https://docs.rs/home/latest/home/fn.home_dir.html#unix for the homedir error. Try setting |
|
@kalinkrustev so you are correct, if I type something it does not error out.
I guess I am just stuck on understanding why the extension does not see the |
@cmosguy what client are you using? VSCode (and all other IDEs for that matter) launches llm-ls as a subprocess IIUC, so you'll need to make sure it feeds the env values at that moment. |
I am using VS code and the llm-vscode extension. There is something wrong with how that extension sets the home directory when using an binary outside the extension hierarchy. |
llm-ls uses the same library as cargo to determine what the HOME directory is, so I doubt there's something wrong with that. llm-ls needs the HOME of the user to write some data like logs to disk. Returns the path of the current user's home directory if known.
# Unix
Returns the value of the `HOME` environment variable if it is set
and not equal to the empty string. Otherwise, it tries to determine the
home directory by invoking the `getpwuid_r` function on the UID of the
current user.
# Windows
Returns the value of the `USERPROFILE` environment variable if it
is set and not equal to the empty string. If both do not exist,
[`SHGetFolderPathW`](https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpathw) is used to return the appropriate path. llm-vscode does not set any kind of env var, it just reads them. |
I am not able to get the musl version of |
I have also the same problem. How to resolve it ? |
Ubuntu 20.04; not working. |
This problem must solved by using CGO_ENABLED=0 go build |
libc6 is installed on my system but i get this error yer |
Getting this:
The text was updated successfully, but these errors were encountered: