I'm running Windows 10 with Ubuntu 18.04.2 LTS on Windows Subsystem for Linux (WSL)
I can cargo run my project fine (with other crates) but when I add deno = "0.30.1" to Cargo.toml [dependencies] and try a cargo run I get:
edit: Actually it seems it was deno_core = "0.30.1"
sudo apt install libglib2.0-dev python
rouan@DESKTOP-VKQTLDG:~/deno_mongodb$ cargo run
Updating crates.io index
Downloaded deno v0.30.1
Downloaded pin-project-lite v0.1.4
Downloaded pin-project v0.4.7
Downloaded hyper-rustls v0.19.1
Downloaded pin-project-internal v0.4.7
Downloaded deno_core v0.30.1
Downloaded tokio v0.2.10
Downloaded deno_typescript v0.30.1
Downloaded rusty_v8 v0.1.0
Compiling syn v1.0.14
Compiling futures-core v0.3.1
Compiling proc-macro-nested v0.1.3
Compiling futures-sink v0.3.1
Compiling futures-task v0.3.1
Compiling futures-io v0.3.1
Compiling pin-utils v0.1.0-alpha.4
Compiling bytes v0.5.3
Compiling pin-project-lite v0.1.4
Compiling arc-swap v0.4.4
Compiling cargo_gn v0.0.15
Compiling crc32fast v1.2.0
Compiling httparse v1.3.4
Compiling try-lock v0.2.2
Compiling adler32 v1.0.4
Compiling downcast-rs v1.1.1
Compiling winapi-build v0.1.1
Compiling tower-service v0.3.0
Compiling nix v0.14.1
Compiling unicode-width v0.1.7
Compiling encoding_rs v0.8.22
Compiling openssl-probe v0.1.2
Compiling mime v0.3.16
Compiling void v1.0.2
Compiling dtoa v0.4.4
Compiling winapi v0.2.8
Compiling utf8parse v0.1.1
Compiling remove_dir_all v0.5.2
Compiling vec_map v0.8.1
Compiling unicode-segmentation v1.6.0
Compiling strsim v0.8.0
Compiling vlq v0.5.1
Compiling ansi_term v0.11.0
Compiling termcolor v1.1.0
Compiling brotli-sys v0.3.2
Compiling sys-info v0.5.8
Compiling unicase v2.6.0
Compiling futures-channel v0.3.1
Compiling miniz_oxide v0.3.5
Compiling http v0.2.0
Compiling textwrap v0.11.0
Compiling kernel32-sys v0.2.2
Compiling signal-hook-registry v1.2.0
Compiling dirs-sys v0.3.4
Compiling rand v0.4.6
Compiling atty v0.2.14
Compiling want v0.3.0
Compiling flate2 v1.0.13
Compiling clap v2.33.0
Compiling dirs v2.0.2
Compiling http-body v0.3.1
Compiling source-map-mappings v0.5.0
Compiling webpki-roots v0.17.0
Compiling ct-logs v0.6.0
Compiling dlopen_derive v0.1.4
Compiling async-compression v0.2.0
Compiling rustls-native-certs v0.1.0
Compiling rustyline v5.0.6
Compiling tempfile v3.1.0
Compiling utime v0.2.1
Compiling mime_guess v2.0.1
Compiling synstructure v0.12.3
Compiling syn-mid v0.4.0
Compiling dlopen v0.1.8
Compiling proc-macro-hack v0.5.11
Compiling serde_derive v1.0.104
Compiling failure_derive v0.1.6
Compiling rustversion v1.0.1
Compiling tokio-macros v0.2.3
Compiling pin-project-internal v0.4.7
Compiling serde_with_macros v1.1.0
Compiling brotli2 v0.3.2
Compiling tokio v0.2.10
Compiling futures-macro v0.3.1
Compiling proc-macro-error v0.4.5
Compiling err-derive v0.2.2
Compiling proc-macro-error-attr v0.4.5
Compiling failure v0.1.6
Compiling which v3.1.0
Compiling trust-dns-proto v0.8.0
Compiling pin-project v0.4.7
Compiling rusty_v8 v0.1.0
Compiling futures-util v0.3.1
Compiling trust-dns-resolver v0.12.0
error: failed to run custom build command for `rusty_v8 v0.1.0`
Caused by:
process didn't exit successfully: `/home/rouan/deno_mongodb/target/debug/build/rusty_v8-7485872aa5f4e335/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'gn_ninja_binaries.py download failed: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
RUST_BACKTRACE=1 and running cargo run again gives me:
rouan@DESKTOP-VKQTLDG:~/deno_mongodb$ export RUST_BACKTRACE=1
rouan@DESKTOP-VKQTLDG:~/deno_mongodb$ cargo run
Compiling serde v1.0.104
Compiling tokio-util v0.2.0
Compiling tokio-rustls v0.12.2
Compiling futures-executor v0.3.1
Compiling rusty_v8 v0.1.0
Compiling err-derive v0.2.2
error: failed to run custom build command for `rusty_v8 v0.1.0`
Caused by:
process didn't exit successfully: `/home/rouan/deno_mongodb/target/debug/build/rusty_v8-7485872aa5f4e335/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'gn_ninja_binaries.py download failed: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1165:5
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:77
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:61
4: core::fmt::write
at src/libcore/fmt/mod.rs:1028
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1412
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:65
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:50
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:188
9: std::panicking::default_hook
at src/libstd/panicking.rs:205
10: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:464
11: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:373
12: rust_begin_unwind
at src/libstd/panicking.rs:302
13: core::panicking::panic_fmt
at src/libcore/panicking.rs:139
14: core::result::unwrap_failed
at src/libcore/result.rs:1165
15: core::result::Result<T,E>::expect
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/result.rs:960
16: build_script_build::download_gn_ninja_binaries
at ./build.rs:121
17: build_script_build::build_v8
at ./build.rs:50
18: build_script_build::main
at ./build.rs:27
19: std::rt::lang_start::{{closure}}
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
20: std::rt::lang_start_internal::{{closure}}
at src/libstd/rt.rs:48
21: std::panicking::try::do_call
at src/libstd/panicking.rs:287
22: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:78
23: std::panicking::try
at src/libstd/panicking.rs:265
24: std::panic::catch_unwind
at src/libstd/panic.rs:396
25: std::rt::lang_start_internal
at src/libstd/rt.rs:47
26: std::rt::lang_start
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
27: main
28: __libc_start_main
29: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
rouan@DESKTOP-VKQTLDG:~/deno_mongodb$
version:
rustc 1.40.0 (73528e339 2019-12-16)
note
I asked on the gitter.im channel and @bartlomieju said it looks like a bug. Thanks for your response!
@rvdende See https://deno.land/std/manual.md#prerequisites
The issue is most likely that you're missing libglib2.0-dev. I'm also on WSL :)
@nayeemrmn thanks for pointing out the dev requirements. Actually I did need to install:
sudo apt install libglib2.0-dev python
It was actually python that was missing causing the issue!
closing issue.
Maybe we should update the manual with this information?
@ry I agree. Where would make the most sense? I hit this issue because I'm trying to build a plugin.. not develop on deno itself. That's why I missed the build from source tips on python and libglib2.0-dev.
It would be nice to have a section on how to make a deno module that loads a rust plugin and specifically on when you need the deno_core crate.
edit: Actually best would be to recommend to the user to install python and libglib2.0-dev when this error occurs. Is that possible?
Does Cargo not have a way of specifying system dependencies of a package? That's what needed. I don't think the manual should go into further detail about what's only needed for the CLI crate and what's needed for core.
Most helpful comment
Maybe we should update the manual with this information?