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

Unable to compile #2

Closed
luizsol opened this issue Jun 13, 2021 · 2 comments · Fixed by #3
Closed

Unable to compile #2

luizsol opened this issue Jun 13, 2021 · 2 comments · Fixed by #3

Comments

@luizsol
Copy link

luizsol commented Jun 13, 2021

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)
@mjaric
Copy link
Owner

mjaric commented Jun 14, 2021

Hi @luizsol
This is probably due to missing rebar3 support in rustler there is still no official workaround that works for all OS-es (Win, linux and MacOS) I see some effort here to support MacOS.

@filmor
Copy link

filmor commented Aug 11, 2021

This has nothing to do with rebar3. The tds_encoding crate needs to be updated to a newer rustler version to support the newer NIF version of OTP24. See rusterlium/rustler#359.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants