atanunq / viu

Terminal image viewer with native support for iTerm and Kitty
MIT License
2.53k stars 56 forks source link

Can't install from source in debian 10 #69

Closed theist closed 3 years ago

theist commented 3 years ago

Following the readme, whit debian 10 default installation of cargo:

$ cd viu/
viu master ✔
{2.7.1} ✔ 09:07:12 $ cargo install --path .
  Installing viu v1.3.0 (/home/carlos/viu)
    Updating crates.io index
  Downloaded crossterm v0.19.0
  Downloaded viuer v0.4.0
  Downloaded console v0.14.1
   Compiling autocfg v1.0.1
   Compiling libc v0.2.91
   Compiling cfg-if v1.0.0
[... some successful packages ....]
   Compiling crossbeam-deque v0.8.0
   Compiling rand_chacha v0.3.0
   Compiling crossterm v0.19.0
error: attributes are not yet allowed on `if` expressions
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/crossterm-0.19.0/src/command.rs:123:9
    |
123 |         #[cfg(windows)]
    |         ^^^^^^^^^^^^^^^

error: aborting due to previous error

error: could not compile `crossterm`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `viu v1.3.0 (/home/carlos/viu)`, intermediate artifacts can be found at `/home/carlos/viu/target`

Caused by:
  build failed

Maybe is an issue in crossterm but I'm new to rust ecosystem

Versions:

$ cargo -V
cargo 1.42.1
$ rustc -V
rustc 1.41.1
theist commented 3 years ago

Precompiled binary in releases does not work either:

$ ./viu 
./viu: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./viu)
atanunq commented 3 years ago

Thank you for trying viu! I managed to compile the project starting with Rust v1.43. It was indeed caused by crossterm but I cannot find the minimum required version in their readme. Please consider upgrading, rustup is really useful in these cases.

The libc issue is tracked in #68

Feel free to reopen if you think something should be done on viu's side