williamboman / nvim-lsp-installer

Further development has moved to https://github.com/williamboman/mason.nvim!
https://github.com/williamboman/mason.nvim
Apache License 2.0
2k stars 123 forks source link

`ccls` cannot execute binary file #466

Closed MomePP closed 2 years ago

MomePP commented 2 years ago

Problem description

ccls was installed successfully but when lsp start the process, 'Client 1 quit with exit code 126 and signal 0'

I've try to execute binary directly and it failed to execute.

exec: Exec format error
The file './ccls' is marked as an executable but could not be run by the operating system.

There is no issue while installing the LSP but might be related with build flag.

PS. I've installed llvm stable 13.0.1 from Homebrew

Neovim version (>= 0.6)

NVIM v0.6.1 Build type: Release LuaJIT 2.1.0-beta3

Operating system/version

Darwin 21.3.0 Darwin Kernel Version 21.3.0: root:xnu-8019.80.24~20/RELEASE_ARM64_T8101 arm64

I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig

Affected language servers

ccls

Actual behavior

ccls quit with exit code 126 and signal 0

Expected behavior

ccls working normally without exit code

Healthcheck output

nvim-lsp-installer: require("nvim-lsp-installer.health").check()
========================================================================
## nvim-lsp-installer report
  - OK: neovim version >= 0.6.0
  - WARNING: **Go**: not available
  - WARNING: **Composer**: not available
  - WARNING: **PHP**: not available
  - WARNING: **julia**: not available
  - OK: **bash**: `GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)`
  - OK: **tar**: `bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 `
  - OK: **gzip**: `Apple gzip 352.40.6`
  - OK: **curl**: `curl 7.77.0 (x86_64-apple-darwin21.0) libcurl/7.77.0 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.42.0`
  - OK: **python3**: `Python 3.9.10`
  - OK: **node**: `v17.4.0`
  - OK: **Ruby**: `ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin21]`
  - OK: **sh**: `Ok`
  - OK: **wget**: `GNU Wget 1.21.2 built on darwin21.1.0.`
  - WARNING: **java**: not available
  - WARNING: **javac**: not available
  - OK: **npm**: `8.3.1`
  - OK: **pip3**: `pip 21.3.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)`
  - OK: **RubyGem**: `3.3.3`

Screenshots

lsp.log

image

:LspInfo image

execute ccls directly

image
MomePP commented 2 years ago

Seems to be issue from CMAKE_PREFIX_PATH. I've changed llvm_dir just like the attach screenshot. ccls build macos

image

And ccls getting back to work as expected after reinstall the LSP.

image

williamboman commented 2 years ago

Hello! Hmm I'm running virtually the same environment but I'm not experiencing any issues. Let's try your suggestion, I see now that the guide suggests appending /lib/cmake to the llvm root path

williamboman commented 2 years ago

@MomePP Does branch ccls-macos-prefix-path fix this?

MomePP commented 2 years ago

@williamboman Yes, it does. I've completely remove ccls and try to switching branch between llvm root path. ccls-macos-prefix-path fixed the issue.