D
Deleted member 62382
Guest
I'm trying to build Deno (a javascript runtime built in rust) from source on FreeBSD 12.1. They only provide binaries for windows, macOS and Linux.<br>
The compilation failed at rusty_v8, which is require to compile Deno.<br>
I then try to compile directly from the rusty_v8 repository.
I've followed the instructions from the github repository:
- installed glib-2.56.3_7,1.
- installed python2.7 and create a symlink to "python" since it's required to have python and python2.7 binary is "python2".
I then ran
Detail of the error:
I'm fairly new in the UNIX / FreeBSD world and I have no experience with Rust. I doubt it's an issue with Rust by itself, since I tried to compile the same source code
Could someone provide me some hints about what the problem could be? Or even some ressources which would help me understand why I can't compile this code?
The compilation failed at rusty_v8, which is require to compile Deno.<br>
I then try to compile directly from the rusty_v8 repository.
I've followed the instructions from the github repository:
- installed glib-2.56.3_7,1.
- installed python2.7 and create a symlink to "python" since it's required to have python and python2.7 binary is "python2".
I then ran
cargo build
and everything compiles until I get this error:
Code:
Compiling rusty_v8 v0.5.0 (/root/rusty_v8)
Running `CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_HOMEPAGE= CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=5 CARGO_PKG_NAME=rusty_v8 CARGO_PKG_REPOSITORY='https://github.com/denoland/rusty_v8' CARGO_PKG_AUTHORS='the Deno authors' CARGO_PKG_DESCRIPTION='Rust bindings to V8' CARGO_MANIFEST_DIR=/root/rusty_v8 CARGO=/usr/local/bin/cargo LD_LIBRARY_PATH='/root/rusty_v8/target/debug/deps:/usr/local/lib' CARGO_PKG_VERSION_PRE= CARGO_PKG_VERSION=0.5.0 rustc --crate-name build_script_build --edition=2018 build.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=719d54043908067c -C extra-filename=-719d54043908067c --out-dir /root/rusty_v8/target/debug/build/rusty_v8-719d54043908067c -C incremental=/root/rusty_v8/target/debug/incremental -L dependency=/root/rusty_v8/target/debug/deps --extern cargo_gn=/root/rusty_v8/target/debug/deps/libcargo_gn-b31804f02f0a6a61.rlib --extern which=/root/rusty_v8/target/debug/deps/libwhich-e5ce3a8d7f279796.rlib -L native=/root/rusty_v8/target/debug/build/backtrace-sys-2d9c9cf21034351a/out`
error[E0308]: mismatched types
--> build.rs:117:18
|
117 | fn platform() -> &'static str {
| -------- ^^^^^^^^^^^^ expected `&str`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.
error: could not compile `rusty_v8`.
Detail of the error:
Code:
This error occurs when the compiler was unable to infer the concrete type of a
variable. It can occur for several cases, the most common of which is a
mismatch in the expected type that the compiler inferred for a variable's
initializing expression, and the actual type explicitly assigned to the
variable.
For example:
```
let x: i32 = "I am not a number!";
// ~~~ ~~~~~~~~~~~~~~~~~~~~
// | |
// | initializing expression;
// | compiler infers type `&str`
// |
// type `i32` assigned to variable `x`
I'm fairly new in the UNIX / FreeBSD world and I have no experience with Rust. I doubt it's an issue with Rust by itself, since I tried to compile the same source code
Could someone provide me some hints about what the problem could be? Or even some ressources which would help me understand why I can't compile this code?