blink.cmp icon indicating copy to clipboard operation
blink.cmp copied to clipboard

Prebuilt binaries for BSD

Open fpusersuggest opened this issue 11 months ago • 10 comments

Make sure you have done the following

  • [X] Updated to the latest version of blink.cmp
  • [X] Searched for existing issues and documentation (try <C-k> on https://cmp.saghen.dev)

Bug Description

Hi, I'm running openbsd 7.6 on my pc but I have the same issue on FreeBSD 14.1. I followed the instruction to install LazyVim but I found that LazyVim has found some problem with blink.cmp. On LazyHealth I found the error that is something like: eventi: InsertError it seems that the error concern a compile issue. So I entered on ~/.local/share/nvim/lazy/blink.cmp and I run the command "cargo build". And the following is the error:

blink_cmp_2025-01-08_02-32

NVIM v0.10.1 Build type: Release LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more info

Relevant configuration

No response

neovim version

v0.10.1

blink.cmp version

don't know

fpusersuggest avatar Jan 08 '25 01:01 fpusersuggest

You need to use nightly rust if you want to use the main branch: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust

Otherwise, you can use the latest release which will automatically download a binary so you don't need to build yourself. There should be an option in LazyVim for this

saghen avatar Jan 08 '25 01:01 saghen

sorry my english is not the best english in the world. But i don't understand what is the subject of your answer. You said to use "latest release" but i don't understand what you mean. Do you mean the latest release of rust? I can't download the latest release of rust and compile it because in this way i would break the openbsd package system. Also rustup doesn't exist on openbsd because it hasn't been ported yet. I don't think it's a local problem of my machine because i have a vps always on openbsd with a very basic system on shell and i have the same problem. So i assume it's a common problem for all openbsd and freebsd installations.

fpusersuggest avatar Jan 12 '25 02:01 fpusersuggest

No worries at all. I didn't realize you were on OpenBSD; we don't provide prebuilt binaries for that system yet.

If you can figure out how to get nightly rust on OpenBSD, the error should go away after a re-install of blink.cmp. Otherwise, you'll want to wait for me to add support, or you may switch to nvim-cmp via the LazyVim extra: https://www.lazyvim.org/extras/coding/nvim-cmp

saghen avatar Jan 12 '25 02:01 saghen

Strangely enough, after updating via rustup toolchain install nightly blink.cmp compilation still fails.. w/ the exact same error the previous user described. im on macOS sequoia 15.2 though. running neovim nightly (via bob-nvim) & the Lazy manager.

eo1989 avatar Jan 24 '25 16:01 eo1989

Does the error go away if you run with cargo +nightly build --release?

saghen avatar Jan 24 '25 16:01 saghen

idk why but 'cargo +nightly build --release' returns an error stating "no such command: +nightly". Even though rustup has the nightly toolchain set as the default..

eo1989 avatar Jan 24 '25 16:01 eo1989

It's possible you have a system install of cargo that's overriding rustup but I'm not sure

saghen avatar Jan 24 '25 16:01 saghen

You were right. I have rust and rustup installed via brew. the brew-rust 'cargo' overrode the brew-rustup nightly. had to export /opt/homebrew/opt/rustup/bin:$PATH to my .zshrc & reload kitty terminal. Thanks for the advice!

Quick question: how hard would it be to include logic into the plugin to automatically download the binary if compilation fails? I can't imagine it would be too difficult, but idk rust at all.

eo1989 avatar Jan 24 '25 17:01 eo1989

We'll already download the latest release when you're on a release tag via version = '*', if you're not building locally. That happens in lua rather than in rust though

saghen avatar Jan 24 '25 17:01 saghen

  • FreeBSD on x86_64 is supported by Rust as "Tier 2 with Host Tools" => rustup and nightly are available to build blink.cmp binaries

  • OpenBSD is supported as "Tier3" by Rust (see https://doc.rust-lang.org/nightly/rustc/platform-support/openbsd.html) => rustup and nightly are not available for this platform - unable to build blink.cmp binaries

lcheylus avatar May 05 '25 07:05 lcheylus