mischov / meeseeks_html5ever

Meeseeks-specific NIF binding of html5ever using Rustler.
Apache License 2.0
10 stars 15 forks source link

OTP 22 support #25

Closed benwilson512 closed 5 years ago

benwilson512 commented 5 years ago

Hey folks!

Attempting to compile this on OTP 22 results in:

error: failed to run custom build command for `erlang_nif-sys v0.6.4`
process didn't exit successfully: `/Users/ben/src/sensetra/_build/dev/rustler_crates/meeseeks_html5ever_nif/release/build/erlang_nif-sys-f70957cbbbd4ee34/build-script-build` (exit code: 101)
--- stdout
Unsupported Erlang version.

Is the erlang_nif-sys version up to date in the Cargo.toml?
Does 'cargo update' fix it?
If not please report at https://github.com/goertzenator/erlang_nif-sys.

--- stderr
thread 'main' panicked at 'gen_api.erl encountered an error.', /Users/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/erlang_nif-sys-0.6.4/build.rs:28:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
could not compile dependency :meeseeks_html5ever, "mix compile" failed. You can recompile this dependency with "mix deps.compile meeseeks_html5ever", update it with "mix deps.update meeseeks_html5ever" or clean it with "mix deps.clean meeseeks_html5ever"
** (RuntimeError) Rust NIF compile error (rustc exit code 101)
    lib/mix/tasks/compile.rustler.ex:68: Mix.Tasks.Compile.Rustler.compile_crate/1
    (elixir) lib/enum.ex:1336: Enum."-map/2-lists^map/1-0-"/2
    lib/mix/tasks/compile.rustler.ex:15: Mix.Tasks.Compile.Rustler.run/1
    (mix) lib/mix/task.ex:331: Mix.Task.run_task/3
    (mix) lib/mix/tasks/compile.all.ex:73: Mix.Tasks.Compile.All.run_compiler/2
    (mix) lib/mix/tasks/compile.all.ex:53: Mix.Tasks.Compile.All.do_compile/4
    (mix) lib/mix/tasks/compile.all.ex:24: anonymous fn/1 in Mix.Tasks.Compile.All.run/1
    (mix) lib/mix/tasks/compile.all.ex:40: Mix.Tasks.Compile.All.with_logger_app/1

I'm using the latest rustler from git.

mischov commented 5 years ago

@benwilson512

Without being 100% sure, there are 2 Rustler dependencies, the one on the Elixir side and the one on the Rust side.

When you say you're using the latest Rustler via git I'm guessing that's on the Elixir-side? It could still be using an older version on the Rust side.

They've been taking their time getting a release out this time around, and I generally don't like to use git dependencies in library code. Maybe you can talk to them about making a release?

mischov commented 5 years ago

If you're trying to fix in a forked version you would update deps here and here.

mischov commented 5 years ago

As of v0.12.0 this should be fixed.