LanguageClient-neovim icon indicating copy to clipboard operation
LanguageClient-neovim copied to clipboard

Precompiled binary is not available for M1 Macs (Darwin arm64)

Open limdingwen opened this issue 4 years ago • 5 comments

Describe the bug

sh install.sh does not work on M1 as no pre-built binaries exist for Darwin arm64.

Environment

  • neovim/vim version (nvim --version or vim --version): NVIM v0.5.1
  • This plugin version (git rev-parse --short HEAD): a42594c
  • This plugin's binary version (bin/languageclient --version): N/A
  • Minimal vimrc content (A minimal vimrc is the smallest vimrc that could reproduce the issue. Refer to an example here): Gist
  • Language server link and version: N/A

To Reproduce

Steps to reproduce the behavior:

  • Install via VimPlug, with sh build.sh as the post-installation (post-installation will fail)
  • Go to installation folder and run sh build.sh.

Current behavior

% sh install.sh
No pre-built binary available for Darwin arm64.
cargo is not available. Abort.

Expected behavior

The plugin installs normally.

Screenshots

N/A

Additional context

N/A

limdingwen avatar Oct 19 '21 17:10 limdingwen

Update: I managed to run sh build.sh by building locally, after installing cargo (brew install rust). Still, a official binary would be nice :)

% ./languageclient --help
languageclient 0.1.161
Junfeng Li <[email protected]>
Language Server Protocol (LSP) support for vim and neovim

USAGE:
    languageclient

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

Update 2: Works perfectly! I would like to suggest making cargo is not available. Abort. instruct the user to install Rust if they want to build locally. Thank you for such a good plugin. ^^

limdingwen avatar Oct 19 '21 17:10 limdingwen

can confirm installing cargo fixes the build, would be nice to get an arm build

zzh8829 avatar Nov 17 '21 08:11 zzh8829

to get the build to succeed I had to modify the rust-toolchain file to 1.57.0, as the 1.46.0 doesn't seem to have an arm64 build available?

meshula avatar Dec 15 '21 07:12 meshula

There is no longer a build.sh file. So after updating the rust-toolchain file (mentioned above) and installing Rust with brew install rust (also from above), from your ~/.local/share/nvim/plugged/LanguageClient-neovim folder, use cargo build --release to build the plugin. Then run mv target/release/languageclient bin to move the binary so neovim can find it.

don-smith avatar Mar 18 '22 05:03 don-smith

In case it saves anyone a few minutes, don-smith's answer above worked for me, but the directory on my computer was ~/.vim/bundle/LanguageClient-neovim/.

  1. Make sure Rust is installed.
  2. Edit the rust-toolchain file to give it a more recent Rust version. I used 1.62.0.
  3. Run cargo build --release
  4. Run mv target/release/languageclient bin

j127 avatar Jul 06 '22 21:07 j127