Skip to content

Unable to compile #2

@luizsol

Description

@luizsol

Hi everyone.

I'm currently using tds and tds_encoding on my project and I'm having problems compiling this library:

$ mix compile
Compiling NIF crate :tds_encoding (native/tds_encoding)...
   Compiling rustler_sys v2.0.0
   Compiling rustler v0.21.0
error: failed to run custom build command for `rustler_sys v2.0.0`

Caused by:
  process didn't exit successfully: `/home/luiz/projects/atlas-intelligence-v3/server/_build/dev/rustler_crates/tds_encoding/release/build/rustler_sys-0fe1e00f6527ada8/build-script-build` (exit code: 101)
  --- stdout
  This OTP release uses the unsupported Erlang NIF version "2.16".

  Please report at https://github.com/rustlerium/rustler.

  --- stderr
  thread 'main' panicked at 'gen_api.erl encountered an error.', /home/luiz/.cargo/registry/src/github.com-1ecc6299db9ec823/rustler_sys-2.0.0/build.rs:34:18
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
could not compile dependency :tds_encoding, "mix compile" failed. You can recompile this dependency with "mix deps.compile tds_encoding", update it with "mix deps.update tds_encoding" or clean it with "mix deps.clean tds_encoding"
** (RuntimeError) Rust NIF compile error (rustc exit code 101)
    (rustler 0.21.1) lib/mix/tasks/compile.rustler.ex:68: Mix.Tasks.Compile.Rustler.compile_crate/1
    (elixir 1.11.3) lib/enum.ex:1411: Enum."-map/2-lists^map/1-0-"/2
    (rustler 0.21.1) lib/mix/tasks/compile.rustler.ex:15: Mix.Tasks.Compile.Rustler.run/1
    (mix 1.11.3) lib/mix/task.ex:394: Mix.Task.run_task/3
    (mix 1.11.3) lib/mix/tasks/compile.all.ex:90: Mix.Tasks.Compile.All.run_compiler/2
    (mix 1.11.3) lib/mix/tasks/compile.all.ex:70: Mix.Tasks.Compile.All.compile/4
    (mix 1.11.3) lib/mix/tasks/compile.all.ex:57: Mix.Tasks.Compile.All.with_logger_app/2
    (mix 1.11.3) lib/mix/tasks/compile.all.ex:35: Mix.Tasks.Compile.All.run/1

I suspect that by bumping the rustler dependency to 0.21.1 the problem may be solved.

Here's my elixir version:

Erlang/OTP 24 [erts-12.0] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [jit]

Elixir 1.11.3 (compiled with Erlang/OTP 23)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions