T
Termux•4mo ago
Exelroad

help install ruff-lsp

can someone please help me install ruff-lsp i try with pip install ruff-lsp but it failed to build this is the last log
= note: ld.lld: error: unable to find library -lgcc
cc: error: linker command failed with exit code 1 (use -v to see invocation)


error: could not compile `ruff` (bin "ruff") due to 1 previous error
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `env -u CARGO "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/data/data/com.termux/files/usr/tmp/pip-install-7s4j8t2m/ruff_31023f42316e42b29231c2f0adce91ad/crates/ruff/Cargo.toml" "--release" "--bin" "ruff" "--" "-C" "link-arg=-s"`
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/data/data/com.termux/files/usr/bin/python3.11', '--compatibility', 'off'] returned non-zero exit status 1
error: subprocess-exited-with-error

× Building wheel for ruff (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /data/data/com.termux/files/usr/bin/python3.11 /data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /data/data/com.termux/files/usr/tmp/tmpjps7sjqr
cwd: /data/data/com.termux/files/usr/tmp/pip-install-7s4j8t2m/ruff_31023f42316e42b29231c2f0adce91ad
Building wheel for ruff (pyproject.toml) ... error
ERROR: Failed building wheel for ruff
Failed to build ruff
ERROR: Could not build wheels for ruff, which is required to install pyproject.toml-based projects
= note: ld.lld: error: unable to find library -lgcc
cc: error: linker command failed with exit code 1 (use -v to see invocation)


error: could not compile `ruff` (bin "ruff") due to 1 previous error
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `env -u CARGO "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/data/data/com.termux/files/usr/tmp/pip-install-7s4j8t2m/ruff_31023f42316e42b29231c2f0adce91ad/crates/ruff/Cargo.toml" "--release" "--bin" "ruff" "--" "-C" "link-arg=-s"`
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/data/data/com.termux/files/usr/bin/python3.11', '--compatibility', 'off'] returned non-zero exit status 1
error: subprocess-exited-with-error

× Building wheel for ruff (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /data/data/com.termux/files/usr/bin/python3.11 /data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py build_wheel /data/data/com.termux/files/usr/tmp/tmpjps7sjqr
cwd: /data/data/com.termux/files/usr/tmp/pip-install-7s4j8t2m/ruff_31023f42316e42b29231c2f0adce91ad
Building wheel for ruff (pyproject.toml) ... error
ERROR: Failed building wheel for ruff
Failed to build ruff
ERROR: Could not build wheels for ruff, which is required to install pyproject.toml-based projects
any idea?
13 Replies
TomIO
TomIO•4mo ago
ruff requires some patches to work on Termux. It is available from the regular repos.
pkg i ruff
Exelroad
Exelroad•4mo ago
yeah, i notice that its available for the ruff packages, but the lsp is not available, i have installed the ruff packages if that matter but compiling ruff-lsp failed, does it not detect the ruff package or what i don't understand yet
TomIO
TomIO•4mo ago
Is ruff-lsp not ruff? It's a linter after all...
Exelroad
Exelroad•4mo ago
no, its different apparently
Exelroad
Exelroad•4mo ago
GitHub
GitHub - astral-sh/ruff-lsp: A Language Server Protocol implementat...
A Language Server Protocol implementation for Ruff. - astral-sh/ruff-lsp
TomIO
TomIO•4mo ago
hmm yep that is different from the main ruff package https://github.com/charliermarsh/ruff
GitHub
GitHub - astral-sh/ruff: An extremely fast Python linter and code f...
An extremely fast Python linter and code formatter, written in Rust. - astral-sh/ruff
Exelroad
Exelroad•4mo ago
i wanted to try using it for my coc-ruff ,but failed there any suggestion?
TomIO
TomIO•4mo ago
afraid not
Exelroad
Exelroad•4mo ago
dang,,, thanks for trying to help
TomIO
TomIO•4mo ago
If you're using Neovim maybe you can instead set it up through none-ls. But I don't have any experience with that either. https://github.com/nvimtools/none-ls.nvim
GitHub
GitHub - nvimtools/none-ls.nvim: null-ls.nvim reloaded / Use Neovim...
null-ls.nvim reloaded / Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua. - nvimtools/none-ls.nvim
Exelroad
Exelroad•4mo ago
sadly i have a bad experience with neovim before ,thats why i stick with regular vim now
fisher
fisher•4mo ago
i had same error, its trying to compile ruff even if you have it pre installed my solution:
git clone "https://github.com/astral-sh/ruff-lsp"
cd ruff-lsp
sed -i 's/ "ruff.*",//' pyproject.toml
pip install .
git clone "https://github.com/astral-sh/ruff-lsp"
cd ruff-lsp
sed -i 's/ "ruff.*",//' pyproject.toml
pip install .
skill issue
Exelroad
Exelroad•4mo ago
oh, thats works. thank you probably that