williamboman / mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
Apache License 2.0
7.24k stars 258 forks source link

clangd on Ubuntu aarch64 is unsupported #1578

Open realh opened 6 months ago

realh commented 6 months ago

I've searched open issues for similar requests

I've recently downloaded the latest plugin version of mason.nvim

Problem description

I'm using an init.lua based on kickstart on an Ubuntu 22.04 server. If clangd is included in the table of servers passed to mason_lspconfig.setup { ensure_installed = ... } I get this error: Installation failed for Package(name=clangd) error="The current platform is unsupported."

Ubuntu's clangd .deb package seems to have a working version though, so I think mason is downloading the wrong version on this platform. It doesn't have this problem on my M1 Mac.

Expected behavior

Mason should install a version of clangd compatible with the platform.

Affected packages

clangd

Mason output

mason.nvim 
                                                                  press g? for help
                                                      https://github.com/williamboman/mason.nvim
   (1) All   (2) LSP   (3) DAP   (4) Linter   (5) Formatter  

  Language Filter: press <C-f> to apply filter

  Installed
    ◍ lua-language-server lua_ls, lua_ls

  Available
    ◍ actionlint
    ◍ ada-language-server als, als
    ◍ alex
    ◍ angular-language-server angularls, angularls
    ◍ ansible-language-server ansiblels, ansiblels
    ◍ ansible-lint
    ◍ antlers-language-server antlersls, antlersls
    ◍ apex-language-server apex_ls, apex_ls
    ◍ arduino-language-server arduino_language_server, arduino_language_server
    ◍ asm-lsp asm_lsp, asm_lsp
    ◍ asmfmt
    ◍ ast-grep ast_grep, ast_grep
    ◍ astro-language-server astro, astro
    ◍ autoflake
    ◍ autopep8
    ◍ autotools-language-server autotools_ls, autotools_ls
    ◍ awk-language-server awk_ls, awk_ls
    ◍ azure-pipelines-language-server azure_pipelines_ls, azure_pipelines_ls
    ◍ bash-debug-adapter
    ◍ bash-language-server bashls, bashls
    ◍ beancount-language-server beancount, beancount
    ◍ beautysh
    ◍ bibtex-tidy
    ◍ bicep-lsp bicep, bicep
    ◍ biome
    ◍ black
    ◍ blackd-client
    ◍ blade-formatter
    ◍ blue
    ◍ brighterscript bright_script, bright_script
    ◍ brighterscript-formatter
    ◍ bsl-language-server bsl_ls, bsl_ls
    ◍ bslint
    ◍ buf
    ◍ buf-language-server bufls, bufls
    ◍ buildifier
    ◍ bzl
    ◍ cairo-language-server cairo_ls, cairo_ls
    ◍ cbfmt
    ◍ cds-lsp
    ◍ cfn-lint
    ◍ checkstyle
    ◍ chrome-debug-adapter
    ◍ clang-format
    ◍ clangd
    ◍ clarinet
    ◍ clarity-lsp clarity_lsp, clarity_lsp
    ◍ clj-kondo
    ◍ clojure-lsp clojure_lsp, clojure_lsp
    ◍ cmake-language-server cmake, cmake
    ◍ cmakelang
    ◍ cmakelint
    ◍ codelldb
    ◍ codeql codeqlls, codeqlls
    ◍ codespell
    ◍ colorgen-nvim
    ◍ commitlint
    ◍ contextive
    ◍ cpplint
    ◍ cpptools
    ◍ cql-language-server
    ◍ crystalline
    ◍ csharp-language-server csharp_ls, csharp_ls
    ◍ csharpier
    ◍ cspell
    ◍ css-lsp cssls, cssls
    ◍ cssmodules-language-server cssmodules_ls, cssmodules_ls
    ◍ cucumber-language-server cucumber_language_server, cucumber_language_server
    ◍ cueimports
    ◍ cuelsp dagger, dagger
    ◍ curlylint
    ◍ custom-elements-languageserver custom_elements_ls, custom_elements_ls
    ◍ cypher-language-server cypher_ls, cypher_ls
    ◍ darker
    ◍ dart-debug-adapter
    ◍ debugpy
    ◍ delve
    ◍ deno denols, denols
    ◍ detekt
    ◍ dhall-lsp dhall_lsp_server, dhall_lsp_server
    ◍ diagnostic-languageserver diagnosticls, diagnosticls
    ◍ djlint
    ◍ docformatter
    ◍ docker-compose-language-service docker_compose_language_service, docker_compose_language_service
    ◍ dockerfile-language-server dockerls, dockerls
    ◍ doctoc
    ◍ dot-language-server dotls, dotls
    ◍ dprint
    ◍ drools-lsp drools_lsp, drools_lsp
    ◍ easy-coding-standard
    ◍ editorconfig-checker
    ◍ efm
    ◍ elixir-ls elixirls, elixirls
    ◍ elm-format
    ◍ elm-language-server elmls, elmls
    ◍ elp
    ◍ ember-language-server ember, ember
    ◍ emmet-language-server emmet_language_server, emmet_language_server
    ◍ emmet-ls emmet_ls, emmet_ls
    ◍ erb-lint
    ◍ erg
    ◍ erg-language-server erg_language_server, erg_language_server
    ◍ erlang-ls erlangls, erlangls
    ◍ esbonio
    ◍ eslint-lsp eslint, eslint
    ◍ eslint_d
    ◍ facility-language-server facility_language_server, facility_language_server
    ◍ fantomas
    ◍ fennel-language-server fennel_language_server, fennel_language_server
    ◍ firefox-debug-adapter
    ◍ fixjson
    ◍ flake8
    ◍ flux-lsp flux_lsp, flux_lsp
    ◍ foam-language-server foam_ls, foam_ls
    ◍ fortls
    ◍ fourmolu
    ◍ fsautocomplete
    ◍ gci
    ◍ gdtoolkit
    ◍ gersemi
    ◍ gh
    ◍ gitleaks
    ◍ gitlint
    ◍ gitui
    ◍ gleam
    ◍ glint
    ◍ glow
    ◍ go-debug-adapter
    ◍ gofumpt
    ◍ goimports
    ◍ goimports-reviser
    ◍ golangci-lint
    ◍ golangci-lint-langserver golangci_lint_ls, golangci_lint_ls
    ◍ golines
    ◍ gomodifytags
    ◍ google-java-format
    ◍ gopls
    ◍ gospel
    ◍ gotests
    ◍ gotestsum
    ◍ gradle-language-server gradle_ls, gradle_ls
    ◍ grammarly-languageserver grammarly, grammarly
    ◍ graphql-language-service-cli graphql, graphql
    ◍ groovy-language-server groovyls, groovyls
    ◍ hadolint
    ◍ haml-lint
    ◍ haskell-debug-adapter
    ◍ haskell-language-server hls, hls
    ◍ haxe-language-server haxe_language_server, haxe_language_server
    ◍ hdl-checker hdl_checker, hdl_checker
    ◍ helm-ls helm_ls, helm_ls
    ◍ hoon-language-server hoon_ls, hoon_ls
    ◍ html-lsp html, html
    ◍ htmlbeautifier
    ◍ htmlhint
    ◍ htmx-lsp htmx, htmx
    ◍ hydra-lsp hydra_lsp, hydra_lsp
    ◍ iferr
    ◍ impl
    ◍ intelephense
    ◍ isort
    ◍ java-debug-adapter
    ◍ java-language-server java_language_server, java_language_server
    ◍ java-test
    ◍ jdtls
    ◍ jedi-language-server jedi_language_server, jedi_language_server
    ◍ joker
    ◍ jq
    ◍ jq-lsp jqls, jqls
    ◍ js-debug-adapter
    ◍ json-lsp jsonls, jsonls
    ◍ json-to-struct
    ◍ jsonld-lsp
    ◍ jsonlint
    ◍ jsonnet-language-server jsonnet_ls, jsonnet_ls
    ◍ jsonnetfmt
    ◍ julia-lsp julials, julials
    ◍ kcl
    ◍ kotlin-debug-adapter
    ◍ kotlin-language-server kotlin_language_server, kotlin_language_server
    ◍ ktlint
    ◍ latexindent
    ◍ lean-language-server
    ◍ lelwel lelwel_ls, lelwel_ls
    ◍ lemminx
    ◍ lemmy-help
    ◍ llm-ls
    ◍ ltex-ls ltex, ltex
    ◍ luacheck
    ◍ luaformatter
    ◍ luau-lsp luau_lsp, luau_lsp
    ◍ markdown-toc
    ◍ markdownlint
    ◍ markdownlint-cli2
    ◍ markmap-cli
    ◍ marksman
    ◍ markuplint
    ◍ matlab-language-server matlab_ls, matlab_ls
    ◍ mdformat
    ◍ mdx-analyzer mdx_analyzer, mdx_analyzer
    ◍ metamath-zero-lsp mm0_ls, mm0_ls
    ◍ millet
    ◍ misspell
    ◍ mockdebug
    ◍ move-analyzer move_analyzer, move_analyzer
    ◍ mutt-language-server mutt_ls, mutt_ls
    ◍ mypy
    ◍ neocmakelsp neocmake, neocmake
    ◍ netcoredbg
    ◍ nextls
    ◍ nginx-language-server
    ◍ nickel-lang-lsp nickel_ls, nickel_ls
    ◍ nil nil_ls, nil_ls
    ◍ nilaway
    ◍ nimlangserver nim_langserver, nim_langserver
    ◍ nimlsp nimls, nimls
    ◍ node-debug2-adapter
    ◍ nomicfoundation-solidity-language-server solidity_ls_nomicfoundation, solidity_ls_nomicfoundation
    ◍ nxls
    ◍ ocaml-lsp ocamllsp, ocamllsp
    ◍ ocamlformat
    ◍ oelint-adv
    ◍ ols
    ◍ omnisharp
    ◍ omnisharp-mono omnisharp_mono, omnisharp_mono
    ◍ opencl-language-server opencl_ls, opencl_ls
    ◍ openedge-language-server
    ◍ openscad-lsp openscad_lsp, openscad_lsp
    ◍ ormolu
    ◍ oxlint
    ◍ perl-debug-adapter
    ◍ perlnavigator
    ◍ pest-language-server pest_ls, pest_ls
    ◍ php-cs-fixer
    ◍ php-debug-adapter
    ◍ phpactor
    ◍ phpcbf
    ◍ phpcs
    ◍ phpmd
    ◍ phpstan
    ◍ pico8-ls
    ◍ pint
    ◍ pkgbuild-language-server pkgbuild_language_server, pkgbuild_language_server deprecated
    ◍ powershell-editor-services powershell_es, powershell_es
    ◍ prettier
    ◍ prettierd
    ◍ pretty-php
    ◍ prisma-language-server prismals, prismals
    ◍ proselint
    ◍ prosemd-lsp prosemd_lsp, prosemd_lsp
    ◍ protolint
    ◍ psalm
    ◍ puppet-editor-services puppet, puppet
    ◍ purescript-language-server purescriptls, purescriptls
    ◍ purescript-tidy
    ◍ pydocstyle
    ◍ pyflakes
    ◍ pyink
    ◍ pylama
    ◍ pylint
    ◍ pylyzer
    ◍ pyment
    ◍ pyproject-flake8
    ◍ pyre
    ◍ pyright
    ◍ python-lsp-server pylsp, pylsp
    ◍ quick-lint-js quick_lint_js, quick_lint_js
    ◍ r-languageserver r_language_server, r_language_server
    ◍ raku-navigator raku_navigator, raku_navigator
    ◍ reason-language-server reason_ls, reason_ls
    ◍ remark-cli
    ◍ remark-language-server remark_ls, remark_ls
    ◍ reorder-python-imports
    ◍ rescript-language-server rescriptls, rescriptls
    ◍ rescript-lsp deprecated
    ◍ revive
    ◍ ripper-tags
    ◍ rnix-lsp rnix, rnix
    ◍ robotframework-lsp robotframework_ls, robotframework_ls
    ◍ rome deprecated
    ◍ rstcheck
    ◍ rubocop
    ◍ ruby-lsp ruby_ls, ruby_ls
    ◍ rubyfmt
    ◍ ruff
    ◍ ruff-lsp ruff_lsp, ruff_lsp
    ◍ rufo
    ◍ rust-analyzer rust_analyzer, rust_analyzer
    ◍ rustfmt deprecated
    ◍ rustywind
    ◍ salt-lsp salt_ls, salt_ls
    ◍ selene
    ◍ semgrep
    ◍ serve-d serve_d, serve_d
    ◍ shellcheck
    ◍ shellharden
    ◍ shfmt
    ◍ shopify-theme-check theme_check, theme_check
    ◍ slang
    ◍ slint-lsp slint_lsp, slint_lsp
    ◍ smithy-language-server smithy_ls, smithy_ls
    ◍ snakefmt
    ◍ snyk
    ◍ snyk-ls
    ◍ solang
    ◍ solang-llvm
    ◍ solargraph
    ◍ solhint
    ◍ solidity solc, solc
    ◍ solidity-ls solidity, solidity
    ◍ sonarlint-language-server
    ◍ sorbet
    ◍ sourcery
    ◍ spectral-language-server spectral, spectral
    ◍ sql-formatter
    ◍ sqlfluff
    ◍ sqlfmt
    ◍ sqlls
    ◍ sqls
    ◍ standardjs
    ◍ standardrb
    ◍ staticcheck
    ◍ stimulus-language-server stimulus_ls, stimulus_ls
    ◍ stylelint
    ◍ stylelint-lsp stylelint_lsp, stylelint_lsp
    ◍ stylua
    ◍ svelte-language-server svelte, svelte
    ◍ svlangserver
    ◍ svls
    ◍ swift-mesonlsp swift_mesonls, swift_mesonls
    ◍ tailwindcss-language-server tailwindcss, tailwindcss
    ◍ taplo
    ◍ teal-language-server teal_ls, teal_ls
    ◍ tectonic
    ◍ templ
    ◍ terraform-ls terraformls, terraformls
    ◍ texlab
    ◍ textlint
    ◍ tflint
    ◍ tfsec
    ◍ thriftls
    ◍ tlint
    ◍ tree-sitter-cli
    ◍ trivy
    ◍ trufflehog
    ◍ ts-standard
    ◍ twigcs
    ◍ typescript-language-server tsserver, tsserver
    ◍ typos
    ◍ typos-lsp typos_lsp, typos_lsp
    ◍ typst-lsp typst_lsp, typst_lsp
    ◍ unocss-language-server unocss, unocss
    ◍ usort
    ◍ v-analyzer v_analyzer, v_analyzer
    ◍ vacuum
    ◍ vala-language-server vala_ls, vala_ls
    ◍ vale
    ◍ vale-ls vale_ls, vale_ls
    ◍ verible
    ◍ veryl-ls veryl_ls, veryl_ls
    ◍ vetur-vls vuels, vuels
    ◍ vim-language-server vimls, vimls
    ◍ vint
    ◍ visualforce-language-server visualforce_ls, visualforce_ls
    ◍ vls
    ◍ vscode-java-decompiler
    ◍ vtsls
    ◍ vue-language-server volar, volar
    ◍ vulture
    ◍ wgsl-analyzer wgsl_analyzer, wgsl_analyzer
    ◍ woke
    ◍ write-good
    ◍ xmlformatter
    ◍ xo deprecated
    ◍ yaml-language-server yamlls, yamlls
    ◍ yamlfix
    ◍ yamlfmt
    ◍ yamllint
    ◍ yapf
    ◍ yls-yara
    ◍ yq
    ◍ zk
    ◍ zls
    ◍ zprint
    ◍ zprint-clj

Installation log

[INFO  Fri 15 Dec 2023 15:43:13 UTC] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=clangd) {}
[DEBUG Fri 15 Dec 2023 15:43:13 UTC] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:58: Attempting to lock package Package(name=clangd)
[DEBUG Fri 15 Dec 2023 15:43:13 UTC] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:70: Wrote lockfile Package(name=clangd)
[DEBUG Fri 15 Dec 2023 15:43:13 UTC] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:71: fs: mkdirp /home/tony/.local/share/nvim/mason/staging/clangd
[DEBUG Fri 15 Dec 2023 15:43:13 UTC] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:148: Compiling installer. clangd {}
[DEBUG Fri 15 Dec 2023 15:43:13 UTC] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:140: Failed to parse spec spec clangd PLATFORM_UNSUPPORTED
[DEBUG Fri 15 Dec 2023 15:43:13 UTC] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink /home/tony/.local/share/nvim/mason/staging/clangd.lock
[DEBUG Fri 15 Dec 2023 15:43:13 UTC] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf /home/tony/.local/share/nvim/mason/staging/clangd
[DEBUG Fri 15 Dec 2023 15:43:13 UTC] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=clangd)
[ERROR Fri 15 Dec 2023 15:43:13 UTC] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=clangd) error="The current platform is unsupported."

Neovim version (>= 0.7)

NVIM v0.9.4 Build type: Release LuaJIT 2.1.1692716794

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Operating system/version

Linux angel2 5.15.0-1049-oracle #55-Ubuntu SMP Mon Nov 20 19:53:49 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

Healthcheck

==============================================================================
mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.8.3
- OK PATH: prepend
- OK Providers: 
  mason.providers.registry-api
  mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2023-12-15-prize-oval` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.`
- OK wget: `GNU Wget 1.21.2 built on linux-gnu.`
- OK curl: `curl 7.81.0 (aarch64-unknown-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16`
- OK gzip: `gzip 1.10`
- OK tar: `tar (GNU tar) 1.34`
- OK bash: `GNU bash, version 5.1.16(1)-release (aarch64-unknown-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING Ruby: not available
  - ADVICE:
    - spawn: ruby failed with exit code - and signal -. ruby is not executable
- WARNING npm: not available
  - ADVICE:
    - spawn: npm failed with exit code - and signal -. npm is not executable
- WARNING node: not available
  - ADVICE:
    - spawn: node failed with exit code - and signal -. node is not executable
- WARNING javac: not available
  - ADVICE:
    - spawn: javac failed with exit code - and signal -. javac is not executable
- WARNING java: not available
  - ADVICE:
    - spawn: java failed with exit code - and signal -. java is not executable
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- WARNING RubyGem: not available
  - ADVICE:
    - spawn: gem failed with exit code - and signal -. gem is not executable
- OK python: `Python 3.10.12`
- OK Go: `go version go1.18.1 linux/arm64`
- OK cargo: `cargo 1.70.0`
- WARNING pip: not available
  - ADVICE:
    - spawn: python3 failed with exit code 1 and signal 0. /usr/bin/python3: No module named pip

- OK PHP: `PHP 8.1.2-1ubuntu2.14 (cli) (built: Aug 18 2023 11:41:11) (NTS)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Fri 15 Dec 2023 16:47:21 UTC.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots

No response

janvhs commented 6 months ago

I am hitting the same problem, but Fedora provides a clangd package, which I have installed. However, when I open a C file, it still tells me that my platform is not supported. How can I tell mason to use my locally installed servers, which are on the $PATH insted?

ingcrengifo commented 4 months ago

Same problem with hadolint, any solution?

wespiard commented 4 months ago

Same here. Installed clangd with DNF (Fedora), but get the same error when Mason tries to install it.

ZonghuiWang commented 4 months ago

I hitted same probelm, anyone knows solve that?

Robin329 commented 4 months ago

I hitted same probelm too.

DanyPops commented 4 months ago

I'll join the party. Same issue on Void Linux.

ktkimit commented 3 months ago

Same issue here when I try to use this on docker alpine Linux.

JuraszekL commented 3 months ago

I am facing the same issue with RPi Bullseye. Is there any workaround to temporary inform mason that the package is already installed?

diegorusso commented 3 months ago

Same thing here. Running Ubuntu on Parallels (Apple M1).

Update: I copied the directory ~/.local/share/nvim/mason/packages/clangd from my x86 machine and then I had to trick mason and change the sim link to the clangd installed with the system.

user at ubuntu-vm in ~/.local/share/nvim/mason/bin$ ls -l clangd
lrwxrwxrwx 1 dierus01 dierus01  18 Apr  3 16:07 clangd -> /usr/bin/clangd-17
diegorusso commented 3 months ago

TBH there should be a nice way to point clangd to the system provided one/or a version installed by the user.

nskeip commented 2 months ago

FreeBSD 14.0 - the same thing. clangd is installed via pkg

Managed to fix (thanks to @diegorusso): copied mason-receipt.json from a linux and edited the path to clangd.

KanonWY commented 2 months ago

I temporarily fixed the issue by: I copy m1 macbook's layzvim config, ~/.local/nvim ~/.config/nvim, and use it in aarch64 machine. and delete the clangd, download aarch64-clangd. and it works!Perhaps better official support is needed!