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

Error while trying to use Beaver on Windows #358

Open
nofe1248 opened this issue Sep 23, 2024 · 1 comment
Open

Error while trying to use Beaver on Windows #358

nofe1248 opened this issue Sep 23, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@nofe1248
Copy link

When I try to use Beaver in my project on Windows, I got following errors:

> iex.bat -S mix
Erlang/OTP 27 [erts-15.1] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit:ns]

==> beaver
could not compile dependency :beaver, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile beaver --force", update it with "mix deps.update beaver" or clean it with "mix deps.clean beaver"
** (FunctionClauseError) no function clause matching in Kinda.Precompiler.current_target/1

    The following arguments were given to Kinda.Precompiler.current_target/1:

        # 1
        {:win32, :nt}

    Attempted function clauses (showing 1 out of 1):

        def current_target({:unix, _})

    (kinda 0.9.2) Kinda.Precompiler.current_target/1
    (elixir_make 0.8.4) lib/elixir_make/artefact.ex:252: ElixirMake.Artefact.current_target_url/3
    (elixir_make 0.8.4) lib/mix/tasks/compile.elixir_make.ex:220: Mix.Tasks.Compile.ElixirMake.download_or_reuse_nif/3
    (elixir_make 0.8.4) lib/mix/tasks/compile.elixir_make.ex:165: Mix.Tasks.Compile.ElixirMake.run/1
    (mix 1.17.3) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
    (mix 1.17.3) lib/mix/tasks/compile.all.ex:108: Mix.Tasks.Compile.All.run_compiler/2
    (mix 1.17.3) lib/mix/tasks/compile.all.ex:88: Mix.Tasks.Compile.All.compile/4
    (mix 1.17.3) lib/mix/tasks/compile.all.ex:62: Mix.Tasks.Compile.All.run/1

Also I've spotted the following code in Kinda:

  @impl ElixirMake.Precompiler
  def all_supported_targets(:fetch) do
    ~w(
      aarch64-apple-darwin
      x86_64-linux-gnu
    )
  end

Is Beaver doesn't support Windows?

@jackalcooper
Copy link
Contributor

Is Beaver doesn't support Windows?

With some changes on Kinda and Beaver it should be possible to support Windows. The error you posted is about the absence of Windows prebuild of Beaver+LLVM/MLIR shared library. You can trigger a source build with system env BEAVER_BUILD_CMAKE=1 (it might fail for some other reasons)

Very welcome if you can send a PR to get Windows build working and we can make the prebuild as a regular one like those for Linux and macOS. You can also give me some more information about what kind of Windows setup you are running (like C/C++ compilers etc), so I can try to install and reproduce build failures.

@jackalcooper jackalcooper added the help wanted Extra attention is needed label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants