llm-ls
llm-ls copied to clipboard
WIP: statically linked build for non Alpine Linux x86_64
This was going to work very well, but the recent addition of tree-sitter broke the build, as it has few modules written in C++ and they fail to build with Rust and musl. For two of them I have found the git repo already contained code rewritten in C, so only Ruby didn't, so I disabled it in the fork. I could not find any solution how to build C++ with Rust and musl.
Below is the error related to C++ tree-sitter-ruby code. Similar ones happened for tree-sitter-elixir, tree-sitter-html
running: "musl-g++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "src" "-Wall" "-Wextra" "-o" "/home/runner/work/llm-ls/llm-ls/target/x86_64-unknown-linux-musl/release/build/tree-sitter-ruby-7669b38d3e7a5c68/out/src/scanner.o" "-c" "src/scanner.cc"
--- stderr
error occurred: Failed to find tool. Is `musl-g++` installed?
@kalinkrustev quick question, can I use the target x86_64-unknown-linux-gnu instead of the x86_64-unknown-linux-musl? My local servers do not support that g++ version.
The x86_64-unknown-linux-musl published in the fork works fine on older Ubuntu and probably many other distributions. The error above is a compilation error before removing the Ruby parser.
@kalinkrustev and @McPatate see my comment, here: https://github.com/huggingface/llm-ls/issues/25#issuecomment-1764466147 still does not work with older versions of GLIBC
I tested the version from @kalinkrustev's fork and was able to get it running fine. What do we need to change to get this PR merged?
I tested the version from @kalinkrustev's fork and was able to get it running fine. What do we need to change to get this PR merged?
@McPatate I am really keen on using this fix as trying to orchestrate other forks is a bit cumbersome. Would be grateful if you could expedite the merge. Cheers!
Let me finish up some fixes for 0.5.0 and I'll merge this PR as well before the release :)
I'm not convinced we have to modify the CI yaml. The fix looks like it's about the tree sitter crates using C++
Maybe we can break out the removal of the tree sitter C++ dependency into it's own PR and then we can reason about the changes seperately.