timdubbins / tap

An audio player for the terminal with fuzzy-finder.
MIT License
35 stars 2 forks source link

Failure to build - cannot find <ncurses.h> #6

Closed Andonome closed 1 year ago

Andonome commented 1 year ago

I've run RUST_BACKTRACE=1 cargo install --path . to install, but get the following error:

  /home/ghost/Projects/tap/target/release/build/ncurses-655630ba6bec2a2c/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/ghost/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ncurses-5.101.0/build.rs:105:5
  stack backtrace:
     0: rust_begin_unwind
     1: core::panicking::panic_fmt
     2: core::panicking::panic
     3: build_script_build::check_chtype_size
     4: build_script_build::main
     5: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `tap v0.4.7 (/home/ghost/Projects/tap)`, intermediate artifacts can be found at `/home/ghost/Projects/tap/target`.

I've installed the ncurses package (ncurses-6.4_2), but this didn't help.

NB: I have no idea how rust works, I'm just following the error message, so feel free to close the issue if I'm just missing something simple.

timdubbins commented 1 year ago

Hi, thanks for raising this issue.

It looks like the ncurses header file either doesn't exist or it's not linked to. Can you try installing the ncurses-devel package, then running cargo clean from within the project directory. This might fix this issue

Andonome commented 1 year ago

This works! Thanks.