Comments (6)
@bysja @gmile new version released: https://hex.pm/packages/fast_rss/0.4.0
from fast_rss.
@bysja âšī¸ now that the fix is merged, I've removed my fork
from fast_rss.
@bysja it appears the error is coming from rustler library.
I would suggest you try to:
- checkout
fast_rss
locally, - bump rustler from
0.21
to0.23
in mix.exs, - check if it compiles without errors,
- it if does - submit a PR to relax dependency to be "~> 0.23"
from fast_rss.
@gmile Unfortunately I cannot get it to compile by making this change. It seems to still try to use rustler 0.21:
Reproduction
- Terminal:
git clone https://github.com/avencera/fast_rss.git
cd fast_rss
- Changed to 0.23 in
/mix.exs
defp deps do
[
{:rustler, "~> 0.23.0"},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
]
end
-
Deleted lock file
/mix.lock
-
In terminal:
> mix deps.get
> mix compile
Error
Output after mix compile
:
==> earmark_parser
Compiling 1 file (.yrl)
Compiling 2 files (.xrl)
Compiling 3 files (.erl)
Compiling 32 files (.ex)
Generated earmark_parser app
==> nimble_parsec
Compiling 4 files (.ex)
Generated nimble_parsec app
==> makeup
Compiling 44 files (.ex)
Generated makeup app
==> jason
Compiling 10 files (.ex)
Generated jason app
==> makeup_elixir
Compiling 6 files (.ex)
Generated makeup_elixir app
==> makeup_erlang
Compiling 3 files (.ex)
Generated makeup_erlang app
==> ex_doc
Compiling 26 files (.ex)
Generated ex_doc app
==> toml
Compiling 10 files (.ex)
Generated toml app
==> rustler
Compiling 7 files (.ex)
Generated rustler app
The `:rustler` compiler has been deprecated since v0.22.0 and will be
removed in v1.0.
To remove this warning, please consult the CHANGELOG for v0.22.0.
==> fast_rss
Compiling 1 file (.ex)
Updating crates.io index
Downloaded serde_derive v1.0.134
Downloaded serde v1.0.134
Downloaded 2 crates (130.5 KB) in 0.66s
Compiling crate fastrss in debug mode (native/fastrss)
Compiling memchr v2.4.1
Compiling autocfg v1.0.1
Compiling proc-macro2 v1.0.36
Compiling cfg-if v1.0.0
Compiling libc v0.2.113
Compiling cc v1.0.72
Compiling unicode-xid v0.2.2
Compiling syn v1.0.86
Compiling adler v1.0.2
Compiling gimli v0.26.1
Compiling proc-macro2 v0.4.30
Compiling serde_derive v1.0.134
Compiling rustc-demangle v0.1.21
Compiling unicode-xid v0.1.0
Compiling serde v1.0.134
Compiling syn v0.15.44
Compiling void v1.0.2
Compiling unicode-segmentation v1.8.0
Compiling encoding_rs v0.8.30
Compiling lazy_static v1.4.0
Compiling rustler_sys v2.1.1
Compiling serde_json v1.0.75
Compiling itoa v1.0.1
Compiling quick-error v1.2.3
Compiling ryu v1.0.9
Compiling miniz_oxide v0.4.4
Compiling unreachable v1.0.0
Compiling heck v0.3.3
Compiling backtrace v0.3.63
Compiling addr2line v0.17.0
Compiling object v0.27.1
Compiling quote v1.0.14
Compiling quote v0.6.13
Compiling quick-xml v0.20.0
Compiling rustler_codegen v0.21.1
Compiling failure v0.1.8
Compiling which v2.0.1
Compiling rustler v0.21.1
error: failed to run custom build command for `rustler v0.21.1`
Caused by:
process didn't exit successfully: `../fast_rss/_build/dev/lib/fast_rss/native/fastrss/debug/build/rustler-c05ac9d08e7dc93a/build-script-build` (exit status: 101)
--- stderr
thread 'main' panicked at 'Erlang version 2.16 not handled, please file a a bug report.', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/rustler-0.21.1/build.rs:50:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
== Compilation error in file lib/fast_rss.ex ==
** (RuntimeError) Rust NIF compile error (rustc exit code 101)
(rustler 0.23.0) lib/rustler/compiler.ex:40: Rustler.Compiler.compile_crate/2
lib/fast_rss.ex:8: (module)
lib/fast_rss.ex:6: (module)
Other methods tried
I also tried changing from 0.21 to 0.23 in /native/fastrss/Cargo.toml
and deleting /native/fastrss/Cargo.lock
but still get the same error.
from fast_rss.
@bysja I've updated a few dependencies in my fork to make it compile. It spills a handful of warning during compilation in dev env, but seems to work. Feel free try it out.
from fast_rss.
Thank you for helping me out with this.
Your fork does indeed compile, albeit with some warnings (see below).
I managed to get the dependency working this way by vendoring your fork into my Elixir project. I copied the library to /vendor/fast_rss
in my mix project and added this to mix.exs
:
{:fast_rss, path: "./vendor/fast_rss"}
Compile output:
> mix compile
==> earmark_parser
Compiling 1 file (.yrl)
Compiling 2 files (.xrl)
Compiling 3 files (.erl)
Compiling 32 files (.ex)
Generated earmark_parser app
==> nimble_parsec
Compiling 4 files (.ex)
Generated nimble_parsec app
==> makeup
Compiling 44 files (.ex)
Generated makeup app
==> jason
Compiling 10 files (.ex)
Generated jason app
==> makeup_elixir
Compiling 6 files (.ex)
Generated makeup_elixir app
==> makeup_erlang
Compiling 3 files (.ex)
Generated makeup_erlang app
==> ex_doc
Compiling 26 files (.ex)
Generated ex_doc app
==> toml
Compiling 10 files (.ex)
Generated toml app
==> rustler
Compiling 7 files (.ex)
Generated rustler app
The `:rustler` compiler has been deprecated since v0.22.0 and will be
removed in v1.0.
To remove this warning, please consult the CHANGELOG for v0.22.0.
==> fast_rss
Compiling 1 file (.ex)
Compiling crate fastrss in debug mode (native/fastrss)
Compiling proc-macro2 v1.0.27
Compiling unicode-xid v0.2.2
Compiling syn v1.0.73
Compiling serde_derive v1.0.126
Compiling serde v1.0.126
Compiling rustler_sys v2.1.1
Compiling memchr v2.4.0
Compiling encoding_rs v0.8.28
Compiling unicode-segmentation v1.7.1
Compiling void v1.0.2
Compiling ryu v1.0.5
Compiling cfg-if v1.0.0
Compiling rustler v0.22.2
Compiling lazy_static v1.4.0
Compiling serde_json v1.0.64
Compiling itoa v0.4.7
Compiling quick-error v1.2.3
Compiling unreachable v1.0.0
Compiling heck v0.3.3
Compiling quick-xml v0.20.0
Compiling quote v1.0.9
Compiling rustler_codegen v0.22.2
Compiling rss v1.10.0
Compiling serde-transcode v1.1.0
Compiling serde_rustler v0.1.0 (https://github.com/satoren/serde_rustler.git?branch=rustler_0.22#0273c8af)
Compiling fastrss v0.3.6 ([...]/fast_rss/native/fastrss)
warning: use of deprecated macro `rustler::rustler_export_nifs`: Please use `rustler::init!` instead.
--> src/lib.rs:12:1
|
12 | rustler::rustler_export_nifs! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated macro `::rustler::rustler_export_nifs`: Please use `rustler::init!` instead.
--> src/lib.rs:12:1
|
12 | / rustler::rustler_export_nifs! {
13 | | "Elixir.FastRSS.Native",
14 | | [
15 | | ("parse", 1, parse, SchedulerFlags::DirtyCpu),
16 | | ],
17 | | None
18 | | }
| |_^
|
= note: this warning originates in the macro `rustler::rustler_export_nifs` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: use of deprecated macro `::rustler::rustler_export_nifs`: Please use `rustler::init!` instead.
--> src/lib.rs:12:1
|
12 | / rustler::rustler_export_nifs! {
13 | | "Elixir.FastRSS.Native",
14 | | [
15 | | ("parse", 1, parse, SchedulerFlags::DirtyCpu),
16 | | ],
17 | | None
18 | | }
| |_^
|
= note: this warning originates in the macro `$crate::rustler_export_nifs` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: use of deprecated macro `rustler::rustler_atoms`: Please use `atoms!` instead.
--> src/lib.rs:6:5
|
6 | rustler::rustler_atoms! {
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated macro `::rustler::rustler_atoms`: Please use `atoms!` instead.
--> src/lib.rs:6:5
|
6 | / rustler::rustler_atoms! {
7 | | atom ok;
8 | | atom error;
9 | | }
| |_____^
|
= note: this warning originates in the macro `rustler::rustler_atoms` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: use of deprecated macro `::rustler::rustler_atoms`: Please use `atoms!` instead.
--> src/lib.rs:6:5
|
6 | / rustler::rustler_atoms! {
7 | | atom ok;
8 | | atom error;
9 | | }
| |_____^
|
= note: this warning originates in the macro `$crate::rustler_atoms` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: `fastrss` (lib) generated 9 warnings (3 duplicates)
Finished dev [unoptimized + debuginfo] target(s) in 8.63s
Generated fast_rss app
from fast_rss.
Related Issues (11)
- Add link to the README for the Rust RSS crate HOT 1
- Add `rustler_precompiled` and set up process of pre-compiling the Rust dependency HOT 3
- The precompiled NIF file does not exist in the checksum file HOT 4
- Parsing Atom feeds HOT 6
- Upgrade not supported by this NIF library HOT 2
- Error: the precompiled NIF file does not exist in the checksum file
- could not compile dependency :fast_rss HOT 5
- Move bench Elixir project into fast_rss? HOT 1
- FastRSS can't handle cyrillic symbols HOT 3
- Apple silicon compilation error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast_rss.