beaver-lodge / beaver

MLIR Toolkit in Elixir and Zig.
MIT License
162 stars 8 forks source link

Wrong NIF version when installing Beaver #248

Closed jumerckx closed 10 months ago

jumerckx commented 10 months ago

I'm new to Elixir so this might be my bad. But I'm getting an error because mix.compile seems to be trying to fetch the wrong NIF version release. I added:

  defp deps do
    [
      {:beaver, "~> 0.3.0"}
    ]
  end
== Compilation error in file lib/beaver/mlir/capi.ex ==
** (RuntimeError) Error while downloading precompiled NIF: couldn't fetch NIF from https://github.com/beaver-lodge/beaver-prebuilt/releases/download/2023-07-18-0903/libbeaver-v0.2.20-nif-2.15-x86_64-unknown-linux-gnu.so.tar.gz: {:ok, {{'HTTP/1.1', 404, 'Not Found'}, [{'cache-control', 'no-cache'}, {'date', 'Fri, 22 Dec 2023 10:14:00 GMT'}, {'server', 'GitHub.com'}, {'vary', 'X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With'}, {'content-length', '9'}, {'content-type', 'text/plain; charset=utf-8'}, {'strict-transport-security', 'max-age=31536000; includeSubdomains; preload'}, {'x-frame-options', 'deny'}, {'x-content-type-options', 'nosniff'}, {'x-xss-protection', '0'}, {'referrer-policy', 'no-referrer-when-downgrade'}, {'content-security-policy', 'default-src \'none\'; base-uri \'self\'; connect-src \'self\'; form-action \'self\'; img-src \'self\' data:; script-src \'self\'; style-src \'unsafe-inline\''}, {'x-github-request-id', 'EC4A:35816B:513379E:5263356:6585616B'}], "Not Found"}}.

I tried with a few different versions of Erlang and Elixir, is there a very specific version I need?

jackalcooper commented 10 months ago

what is your elixir version? also is it ubuntu 20.04?

jumerckx commented 10 months ago

what is your elixir version?

I tried with Elixir 1.14.5 (compiled with Erlang/OTP 24) as well as Elixir 1.16.0-rc.1 (0ae4bfb) (compiled with Erlang/OTP 26), both installed using asdf.

also is it ubuntu 20.04?

No, Ubuntu 22.04.1 LTS (through WSL on windows 11)

To make sure I'm not doing something obviously wrong, the commands I'm running are:

mix new beaver_test
cd beaver_test
[add beaver~>"0.3.0" dependency in mix.exs]
mix deps.get
mix deps.compile
jackalcooper commented 10 months ago

I will upload a new release

jackalcooper commented 10 months ago

please try {:beaver, "~> 0.3.1"}

jackalcooper commented 10 months ago

sorry, there is a problem, I will release 0.3.2

jackalcooper commented 10 months ago

please try {:beaver, "~> 0.3.2"}

jumerckx commented 10 months ago

please try {:beaver, "~> 0.3.2"}

0.3.2 works flawlessly, thanks a lot!