Master build fails with rustc 1.28.0
The build fails on:
make[2]: Entering directory '/home/jehan/dev/build/librsvg'
cd /home/jehan/dev/src/librsvg/rsvg_internals && \
PKG_CONFIG_ALLOW_CROSS=1 \
PKG_CONFIG='/usr/bin/pkg-config' \
CARGO_TARGET_DIR=/home/jehan/dev/build/librsvg/target \
cargo build --release
Compiling rsvg_internals v0.0.1 (file:///home/jehan/dev/src/librsvg/rsvg_internals)
error[E0658]: access to extern crates through prelude is experimental (see issue #44660)
--> rsvg_internals/src/io.rs:110:26
|
110 | ) -> Result<InputStream, glib::Error> {
| ^^^^
error[E0658]: access to extern crates through prelude is experimental (see issue #44660)
--> rsvg_internals/src/io.rs:117:20
|
117 | return Err(glib::Error::new(RsvgError, "Input file is too short"));
| ^^^^
error[E0658]: access to extern crates through prelude is experimental (see issue #44660)
--> rsvg_internals/src/io.rs:200:42
|
200 | let (content_type, _uncertain) = gio::content_type_guess(uri, &contents);
| ^^^
error[E0658]: access to extern crates through prelude is experimental (see issue #44660)
--> rsvg_internals/src/io.rs:201:25
|
201 | let mime_type = gio::content_type_get_mime_type(&content_type);
| ^^^
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0658`.
error: Could not compile `rsvg_internals`.
To learn more, run the command again with --verbose.
make[2]: *** [Makefile:1902: /home/jehan/dev/build/librsvg/target/release/librsvg_internals.a] Error 101
make[2]: Leaving directory '/home/jehan/dev/build/librsvg'
make[1]: *** [Makefile:1428: all-recursive] Error 1
make[1]: Leaving directory '/home/jehan/dev/build/librsvg'
make: *** [Makefile:927: all] Error 2
I tried to look the issue https://github.com/rust-lang/rust/issues/44660 (which I think it the one they talk about). I also ran rustc --explain E0658
and tried various #![feature(something)]
but they are not clear at all what the "something" is supposed to be or I didn't put it the right place (I am not at all knowledgeable on rust, so I am mostly doing things a bit randomly).
Anyway after a few web search, I am a bit too lazy, sorry. :P
My guess is maybe that you use an earlier version of rust where this experimental feature is not experimental anymore? Mine:
$ rustc --version
rustc 1.28.0
If a newer version of rust is needed for the master branch, maybe you should update the configure.ac
(I will have to update to Fedora 29 soon anyway, they will hopefully have a newer version).