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

bug: Fail to load avante_repo_map #882

Closed
dinggul opened this issue Nov 21, 2024 · 6 comments
Closed

bug: Fail to load avante_repo_map #882

dinggul opened this issue Nov 21, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@dinggul
Copy link

dinggul commented Nov 21, 2024

Describe the bug

LUA_VERSION=luajit bash ./build.sh
+ mkdir -p /home/dinggul/.local/share/nvim/lazy/avante.nvim/build
+ curl -L https://github.com/yetone/avante.nvim/releases/download/v0.0.9/avante_lib-linux-aarch64-luajit.tar.gz
+ tar -zxv -C /home/dinggul/.local/share/nvim/lazy/avante.nvim/build
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0 9714k    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0avante_repo_map.so
  9 9714k    9  908k    0     0   494k      0  0:00:19  0:00:01  0:00:18 1173kavante_templates.so
avante_tokenizers.so
100 9714k  100 9714k    0     0  4043k      0  0:00:02  0:00:02 --:--:-- 7249k
file .local/share/nvim/lazy/avante.nvim/build/avante_repo_map.so
.local/share/nvim/lazy/avante.nvim/build/avante_repo_map.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=b5fd49939426d21b29a5047270aa0c082ca47978, not stripped

I tried to install avante on my aarch64 machine, but this download link seems to contain x86-64 binary

This causes lib load error

Error executing vim.schedule lua callback: ...ocal/share/nvim/lazy/avante.nvim/lua/avante/repo_map.lua:23: Failed to load avante_repo_map
stack traceback:
        [C]: in function 'error'
        ...ocal/share/nvim/lazy/avante.nvim/lua/avante/repo_map.lua:23: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

To reproduce

No response

Expected behavior

No response

Installation method

Use lazy.nvim:

  {
    "yetone/avante.nvim",
    event = "VeryLazy",
    lazy = false,
    version = false, -- set this if you want to always pull the latest change
    opts = {
      -- add any opts here
    },
    -- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
    build = "make",
    -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
    dependencies = {
      "nvim-treesitter/nvim-treesitter",
      "stevearc/dressing.nvim",
      "nvim-lua/plenary.nvim",
      "MunifTanjim/nui.nvim",
      --- The below dependencies are optional,
      "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
      "zbirenbaum/copilot.lua", -- for providers='copilot'
      {
        -- support for image pasting
        "HakonHarnes/img-clip.nvim",
        event = "VeryLazy",
        opts = {
          -- recommended settings
          default = {
            embed_image_as_base64 = false,
            prompt_for_file_name = false,
            drag_and_drop = {
              insert_mode = true,
            },
            -- required for Windows users
            use_absolute_path = true,
          },
        },
      },
      {
        -- Make sure to set this up properly if you have lazy=true
        'MeanderingProgrammer/render-markdown.nvim',
        opts = {
          file_types = { "markdown", "Avante" },
        },
        ft = { "markdown", "Avante" },
      },
    },
  }

Environment

nvim -v
NVIM v0.11.0-dev-1152+gb820b0e47e
Build type: RelWithDebInfo
LuaJIT 2.1.1731485912
Run "nvim -V1 -v" for more info
uname -a
Linux oracle-main-arm64 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    -- add any other plugins here
  },
})
@dinggul dinggul added the bug Something isn't working label Nov 21, 2024
@cdekort
Copy link

cdekort commented Nov 21, 2024

Having the same issue yesterday (on the given default configuration), haven't been able to resolve it yet.
..

@yetone
Copy link
Owner

yetone commented Nov 21, 2024

Solution: #612 (comment)

@yetone yetone closed this as completed Nov 21, 2024
@yetone yetone pinned this issue Nov 21, 2024
@dinggul
Copy link
Author

dinggul commented Nov 21, 2024

I already tried the solution described in #612 , and my first snippet shows the result what I get.
Still not solved.

@dinggul
Copy link
Author

dinggul commented Nov 21, 2024

Note that I got those binaries at https://github.com/yetone/avante.nvim/releases/download/v0.0.9/avante_lib-linux-aarch64-luajit.tar.gz, but file results shows x86-64

@yetone
Copy link
Owner

yetone commented Nov 21, 2024

@dinggul It may be because your architecture is not included in the pre-built artifacts, you can try building it manually:

BUILD_FROM_SOURCE=true make

@Moerliy
Copy link

Moerliy commented Nov 21, 2024

I can confirm this issue.

The file that is pulled from https://github.com/yetone/avante.nvim/releases/download/v0.0.9/avante_lib-linux-aarch64-luajit.tar.gz results to be an x86-64 file. Obviously, this won't work on arm machines.

I'm using Nix and have some issues with the build from source option so I would love for the binary to be arm compatible.

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

4 participants