bmitch / relogio

Terminal clock in Rust
MIT License
3 stars 2 forks source link

Run error in ubuntu #21

Closed boundless-forest closed 5 years ago

boundless-forest commented 5 years ago

Info

Is this crate works well in ubuntu? Some errors occurs.

$ cargo build

warning: dependency (pancurses) specified without providing a local path, Git repository, or version to use. This will be considered an error in future versions
warning: unused manifest key: dependencies.pancurses.pancurses
   Compiling autocfg v0.1.5
   Compiling pkg-config v0.3.15
   Compiling cc v1.0.38
   Compiling libc v0.2.60
   Compiling log v0.4.8
   Compiling cfg-if v0.1.9
   Compiling num-traits v0.2.8
   Compiling num-integer v0.1.41
   Compiling ncurses v5.99.0
   Compiling time v0.1.42
error: failed to run custom build command for `ncurses v5.99.0`

Caused by:
  process didn't exit successfully: `/home/wpf/working/github/ouwenkg/relogio/target/debug/build/ncurses-56e543e9e39a1bef/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rustc-link-lib=ncursesw
OPT_LEVEL = Some("0")
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("true")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")

--- stderr
/home/wpf/working/github/ouwenkg/relogio/target/debug/build/ncurses-e9f23ce5bc6e48ff/out/chtype_size.c:6:10: fatal error: ncurses.h: No such file or directory
 #include <ncurses.h>
          ^~~~~~~~~~~
compilation terminated.
thread 'main' panicked at 'assertion failed: command.status().expect("compilation failed").success()', /home/wpf/.cargo/registry/src/github.com-1ecc6299db9ec823/ncurses-5.99.0/build.rs:105: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

Env

rustc version: rustc 1.36.0 (a53f9df32 2019-07-03) ubuntu version: 18.04

bmitch commented 5 years ago

@ouwenkg Yep I run it on Ubuntu. It looks like your problem is that you are missing a requirement for pancurses:

See https://github.com/ihalila/pancurses#requirements

ncurses-rs links with the native ncurses library so that needs to be installed so that the linker can find it.

Hope this helps!