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

LuaJIT ASSERT lj_api.c:51: index2adr: calling frame is not a C function #2

Closed
neo451 opened this issue Sep 27, 2024 · 13 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@neo451
Copy link

neo451 commented Sep 27, 2024

目前没有成功在wsl上 load 这个插件,一直得到以下错误:

"test.lua" LuaJIT ASSERT lj_api.c:51: index2adr: calling frame is not a C function

我还尝试了单独 load rime 的 lua binding,错误是一样的:

local rime = require "rime"

rime.init {
   shared_data_dir = "/usr/share/rime-data",
   user_data_dir = "~/.local/share/rime-ls",
   log_dir = vim.fs.joinpath(vim.fn.stdpath "data", "rime"),
   distribution_name = "Rime",
   distribution_code_name = "nvim-rime",
   distribution_version = "0.0.1",
   app_name = "rime.nvim-rime",
   min_log_level = 3,
}
@Freed-Wu Freed-Wu self-assigned this Sep 27, 2024
@Freed-Wu
Copy link
Owner

The error comes from require'rime', right?

@neo451
Copy link
Author

neo451 commented Sep 27, 2024

yes

@Freed-Wu
Copy link
Owner

我还尝试了单独 load rime 的 lua binding

You load it in luajit, right?

@neo451
Copy link
Author

neo451 commented Sep 27, 2024

yes, I just use the neovim embedded luajit, to be exact, it throws the same that the plugins throws, and just quits neovim for me

@Freed-Wu
Copy link
Owner

What is your environment?

@Freed-Wu
Copy link
Owner

Have you tried 0.0.1-1? https://luarocks.org/modules/Freed-Wu/rime.nvim

@neo451
Copy link
Author

neo451 commented Sep 29, 2024

yes I did, but still the same problem, I tried on nvim-0.11 on wsl and nvim-0.10 on arch, both not working, librime is the newest version as well.

@Freed-Wu
Copy link
Owner

Weird. For me:

  • OS: ArchLinux rolling
  • neovim: 0.10.1
  • librime 1.11.1

Can you try

paru -S luajit-symlinks

In Archlinux?

@Freed-Wu
Copy link
Owner

Freed-Wu commented Oct 3, 2024

And, something should be noticed:

  1. https://github.com/hchunhui/librime-lua also use lua. If you use this rime plugin, make sure its lua version is same as rime.nvim's lua version (rime.nvim's lua version is neovim's luajit). Otherwise some different lua version's function will conflict.
  2. Other rime plugins seems to have undetermined problem. I just disable them and haven't found the reason.
  3. luajit-symlinks use luajit as lua5.1. That means luarocks --lua-verson 5.1 in fact use luajit. I believe it should be helpful.

@Freed-Wu Freed-Wu pinned this issue Oct 3, 2024
@Freed-Wu Freed-Wu added the bug Something isn't working label Oct 3, 2024
@Freed-Wu
Copy link
Owner

BTW, Does WSL mean WSL1 or WSL2?

@chujDK
Copy link

chujDK commented Nov 25, 2024

BTW, Does WSL mean WSL1 or WSL2?

I also got the same error in NixOS, WSL2.

@Freed-Wu
Copy link
Owner

NixOS's librime now updated to 1.12.0, and some API changed rime/librime#877

@Freed-Wu
Copy link
Owner

Now it can work for my NixOS. This is my configuration.nix.

WSL2 is a VM based on hyperV. I think it should be same as normal Linux.

@Freed-Wu Freed-Wu changed the title error loading on wsl LuaJIT ASSERT lj_api.c:51: index2adr: calling frame is not a C function Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants