mischov / meeseeks

An Elixir library for parsing and extracting data from HTML and XML with CSS or XPath selectors.
MIT License
316 stars 23 forks source link

Trouble compiling rust on Fedora 30 #81

Closed dogweather closed 5 years ago

dogweather commented 5 years ago

I have just the standard Fedora packages of rust and cargo installed. I added meeseeks to mix.exs and get:

$ mix test
==> toml
Compiling 10 files (.ex)
Generated toml app
==> rustler
Compiling 5 files (.ex)
Generated rustler app
==> meeseeks_html5ever
Compiling NIF crate :meeseeks_html5ever_nif (native/meeseeks_html5ever_nif)...
error: unable to get packages from source

Caused by:
  failed to parse manifest at `/home/robb/.cargo/registry/src/github.com-1ecc6299db9ec823/rustler-0.21.0/Cargo.toml`

Caused by:
  editions are unstable

Caused by:
  feature `edition` is required

this Cargo does not support nightly features, but if you
switch to nightly channel you can add
`cargo-features = ["edition"]` to enable this feature
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
mischov commented 5 years ago

@dogweather This appears to be an error related to the version of Rust or Cargo that you have installed.

See related issue at: https://github.com/rust-lang/cargo/issues/6113

I believe the fix would be updating your versions.

The recommended method for installing Rust is to use rustup.

dogweather commented 5 years ago

Thanks!