glacambre / firenvim

Embed Neovim in Chrome, Firefox & others.
GNU General Public License v3.0
4.76k stars 146 forks source link

plugin won't install: 'lua require("bit")' fails #1476

Closed hwine closed 1 year ago

hwine commented 1 year ago
Neovim version: v0.9.0-dev with Lua 5.1 ``` NVIM v0.9.0-dev Build type: RelWithDebInfo Lua 5.1 Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-CqPw1c/neovim-0.9.0~ubuntu1+git202212270019-fe5665be3-333b5866f=. -fstac k-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET _ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-prom otion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-commo n -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_ LEVEL=3 -I/build/neovim-CqPw1c/neovim-0.9.0~ubuntu1+git202212270019-fe5665be3-333b5866f/build/cmake.config -I/build/neovim-CqPw1c/neovim- 0.9.0~ubuntu1+git202212270019-fe5665be3-333b5866f/src -I/build/neovim-CqPw1c/neovim-0.9.0~ubuntu1+git202212270019-fe5665be3-333b5866f/.de ps/usr/include -I/usr/include -I/build/neovim-CqPw1c/neovim-0.9.0~ubuntu1+git202212270019-fe5665be3-333b5866f/build/src/nvim/auto -I/buil d/neovim-CqPw1c/neovim-0.9.0~ubuntu1+git202212270019-fe5665be3-333b5866f/build/include Compiled by buildd@bos01-arm64-010 ```

What I tried to do

Per install instructions: call firenvim#install(0)

What happened

Received error message:

Error detected while processing function firenvim#install[10]..function firenvim#install:
line    8:
Error: Lua package "bit" unavailable. Install it or switch to LuaJIT.

Neovim's checkhealth does not report any issues.

I've not had any luck resolving this. I've tried installing both lua-nvim and lua-nvim-dev, and neither helps. (I even tried installing lua and luajit, even though I didn't expect that to help.)

glacambre commented 1 year ago

Try to install the bit package by running luarocks install bit :).

Off-topic: Are you trying to use Firenvim on ARM?

alerque commented 1 year ago

Most distros compile NeoVIM using LuaJIT which has a built in bitwise library. Yours for some reason is compiled against plain Lua 5.1, not LuaJIT — hence the need to supply a 3rd party substitute library.

justinmk commented 1 year ago

in the future this will hopefully be resolved: https://github.com/neovim/neovim/pull/21222

hwine commented 1 year ago

Fixed: sudo apt install -y lua-bitop did the trick.

Looks like I switched to an unstable PPA of Neovim about a month ago. Unlike the focal Neovim, the PPA did not have lua-bitop as a dependency (it apparently isn't needed on amd64, but I'm arm64).

Thanks for the pointers to it being a Neovim build/packaging issue -- that's easier for me to understand than "lua" 😉

hwine commented 1 year ago

Off-topic: Are you trying to use Firenvim on ARM?

Yes -- I use a Microsoft Surface X (arm64) running Windows 11 and WSL. I run graphics apps (Zoom, etc) under windows, and do all my editing in neovim. I'm very happy with it in general.

Windows and linux are both good nowadays at executing amd64 binaries - I rarely notice a difference. And the bridge between the 2 OS is getting thinner -- Neovim (linux) is my embedded editor for VSCode (win11).