Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
limdingwen opened this issue Oct 19, 2021 · 5 comments
Open

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

limdingwen opened this issue Oct 19, 2021 · 5 comments

Comments

@limdingwen
Copy link

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
Copy link
Author

limdingwen commented Oct 19, 2021

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 <autozimu@gmail.com>
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 limdingwen changed the title Does not install on M1 Macbook (Darwin arm64) Precompiled binary is not available for M1 Macs (Darwin arm64) Nov 13, 2021
@zzh8829
Copy link

zzh8829 commented Nov 17, 2021

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

@meshula
Copy link

meshula commented Dec 15, 2021

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?

@don-smith
Copy link

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.

@j127
Copy link

j127 commented Jul 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants