Unable to compile on Ubuntu 20.04/Rust 1.45.0
albemuth opened this issue · 4 comments
albemuth commented
Full backtrace below, not sure what to try:
~ rustc --version
rustc 1.45.0 (5c1f21c3b 2020-07-13)
~ cargo --version
cargo 1.45.0 (744bd1fbb 2020-06-15)
~ RUST_BACKTRACE=full cargo install dijo
Updating crates.io index
Installing dijo v0.2.2
Compiling libc v0.2.73
Compiling proc-macro2 v1.0.19
Compiling unicode-xid v0.2.1
Compiling syn v1.0.35
Compiling autocfg v1.0.0
Compiling cfg-if v0.1.10
Compiling serde_derive v1.0.114
Compiling getrandom v0.1.14
Compiling serde v1.0.114
Compiling log v0.4.11
Compiling fnv v1.0.7
Compiling ident_case v1.0.1
Compiling strsim v0.9.3
Compiling proc-macro-hack v0.5.16
Compiling lazy_static v1.4.0
Compiling cc v1.0.58
Compiling bitflags v1.2.1
Compiling pkg-config v0.3.18
Compiling unicode-width v0.1.8
Compiling arc-swap v0.4.7
Compiling array-macro v1.0.5
Compiling slab v0.4.2
Compiling inventory v0.1.7
Compiling stable_deref_trait v1.2.0
Compiling ryu v1.0.5
Compiling unicode-segmentation v1.6.0
Compiling same-file v1.0.6
Compiling serde_json v1.0.56
Compiling xi-unicode v0.2.1
Compiling lazycell v1.2.1
Compiling ansi_term v0.11.0
Compiling strsim v0.8.0
Compiling itoa v0.4.6
Compiling vec_map v0.8.2
Compiling maplit v1.0.2
Compiling textwrap v0.11.0
Compiling owning_ref v0.4.1
Compiling walkdir v2.3.1
Compiling num-traits v0.2.12
Compiling num-integer v0.1.43
Compiling num-iter v0.1.41
Compiling num-rational v0.3.0
Compiling crossbeam-utils v0.7.2
Compiling quote v1.0.7
Compiling net2 v0.2.34
Compiling signal-hook-registry v1.2.0
Compiling time v0.1.43
Compiling iovec v0.1.4
Compiling inotify-sys v0.1.3
Compiling dirs-sys v0.3.5
Compiling filetime v0.2.10
Compiling term_size v0.3.2
Compiling atty v0.2.14
Compiling signal-hook v0.1.16
Compiling mio v0.6.22
Compiling inotify v0.7.1
Compiling directories v3.0.1
Compiling clap v2.33.1
Compiling const-random-macro v0.1.8
Compiling mio-extras v2.0.6
Compiling num-complex v0.3.0
Compiling crossbeam-channel v0.4.3
Compiling notify v4.0.15
Compiling const-random v0.1.8
Compiling ahash v0.4.4
Compiling ahash v0.3.8
Compiling num v0.3.0
Compiling ncurses v5.99.0
error: failed to run custom build command for `ncurses v5.99.0`
Caused by:
process didn't exit successfully: `/tmp/cargo-installexNGUi/release/build/ncurses-213ba464d1dfd43a/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=NCURSESW5_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=NCURSESW5_STATIC
cargo:rerun-if-env-changed=NCURSESW5_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=NCURSESW_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=NCURSESW_STATIC
cargo:rerun-if-env-changed=NCURSESW_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rustc-link-lib=ncursesw
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-unknown-linux-gnu = None
CC_x86_64_unknown_linux_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-unknown-linux-gnu = None
CFLAGS_x86_64_unknown_linux_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
--- stderr
/tmp/cargo-installexNGUi/release/build/ncurses-ec99669aa43b14be/out/chtype_size.c:6:10: fatal error: ncurses.h: No such file or directory
6 | #include <ncurses.h>
| ^~~~~~~~~~~
compilation terminated.
thread 'main' panicked at 'assertion failed: command.status().expect("compilation failed").success()', /home/albemuth/.cargo/registry/src/github.com-1ecc6299db9ec823/ncurses-5.99.0/build.rs:105:5
stack backtrace:
0: 0x55ea2a813605 - backtrace::backtrace::libunwind::trace::h396c07d2071b43af
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
1: 0x55ea2a813605 - backtrace::backtrace::trace_unsynchronized::h7aa0e4bb23d9c158
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
2: 0x55ea2a813605 - std::sys_common::backtrace::_print_fmt::hd15ac5d4adcd355b
at src/libstd/sys_common/backtrace.rs:78
3: 0x55ea2a813605 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hec5354be8ccc3ecc
at src/libstd/sys_common/backtrace.rs:59
4: 0x55ea2a83684c - core::fmt::write::h3d34909eeb4f225b
at src/libcore/fmt/mod.rs:1076
5: 0x55ea2a810223 - std::io::Write::write_fmt::h1da287b3de55ed16
at src/libstd/io/mod.rs:1537
6: 0x55ea2a815c40 - std::sys_common::backtrace::_print::h4d206838e1ace354
at src/libstd/sys_common/backtrace.rs:62
7: 0x55ea2a815c40 - std::sys_common::backtrace::print::h1f778e9940ee5977
at src/libstd/sys_common/backtrace.rs:49
8: 0x55ea2a815c40 - std::panicking::default_hook::{{closure}}::h704403a56cbf5783
at src/libstd/panicking.rs:198
9: 0x55ea2a81598c - std::panicking::default_hook::ha4567a10dec4ef8d
at src/libstd/panicking.rs:218
10: 0x55ea2a816277 - std::panicking::rust_panic_with_hook::h88a1f16ec8a7bb20
at src/libstd/panicking.rs:486
11: 0x55ea2a7e837e - std::panicking::begin_panic::hf2013973307adb85
12: 0x55ea2a7e79f5 - build_script_build::main::hb2db1b629e9618c2
13: 0x55ea2a7e8413 - std::rt::lang_start::{{closure}}::he558c18c553b7436
14: 0x55ea2a816648 - std::rt::lang_start_internal::{{closure}}::h6d21eebfa4beaf70
at src/libstd/rt.rs:52
15: 0x55ea2a816648 - std::panicking::try::do_call::h560a27b87db38b9c
at src/libstd/panicking.rs:297
16: 0x55ea2a816648 - std::panicking::try::h453d4afd696011f9
at src/libstd/panicking.rs:274
17: 0x55ea2a816648 - std::panic::catch_unwind::h211d02671f23030f
at src/libstd/panic.rs:394
18: 0x55ea2a816648 - std::rt::lang_start_internal::h464df2bbf46c7e7c
at src/libstd/rt.rs:51
19: 0x55ea2a7e7d72 - main
20: 0x7f70150b10b3 - __libc_start_main
21: 0x55ea2a7e518e - _start
22: 0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
error: failed to compile `dijo v0.2.2`, intermediate artifacts can be found at `/tmp/cargo-installexNGUi`
Caused by:
build failed
avierax commented
Try sudo apt-get install libncurses-dev
. This solved the problem for me.
albemuth commented
Worked for me too, thanks!
oppiliappan commented
I should have documented this in the wiki, but you will the run the following on ubuntu:
sudo apt-get update && sudo apt-get install libncurses5-dev libncursesw5-dev
Looks like the pancurses
wasn't really working out for a lot of folks, we might just switch back to termion
(removes the libncurses
dep) and use a feature flag to build for windows.