virterm icon indicating copy to clipboard operation
virterm copied to clipboard

Compilation issue on ubuntu 20.04

Open KantarBruceAdams opened this issue 3 years ago • 3 comments

I am in need of a terminal emulator for testing a curses application - see https://stackoverflow.com/questions/74661549/fake-mock-background-terminal-for-testing-an-ncurses-application

I found virterm via reddit

It does not compile out of the box. I just ran:

apt-get install -y rustc
apt-get install -y cargo
git clone https://github.com/pvolok/virterm.git
cd virterm
./release.sh

I am not a rustacean and know the ecosystem but my guess is you forgot to record/update one of the dependencies somewhere.

error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-unknown-linux-musl` target may not be installed
  = help: consider downloading the target with `rustup target add x86_64-unknown-linux-musl`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

KantarBruceAdams avatar Dec 03 '22 02:12 KantarBruceAdams

The release.sh file is used to create binaries to publish a new version. You can use standard cargo ways to compile or run: cargo build or cargo run.

pvolok avatar Dec 03 '22 17:12 pvolok

Cargo build gives me:

   ....
   Compiling crossterm v0.23.2
   Compiling assert_matches v1.5.0
   Compiling virterm v0.0.1 (/home/brucea/virterm)
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> src/main.rs:1:1
  |
1 | #![feature(async_closure)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^


rustc --version rustc 1.65.0 (897e37553 2022-11-02)

KantarBruceAdams avatar Dec 05 '22 08:12 KantarBruceAdams

It requires nightly rust. You can specify it like this: cargo +nightly build.

But you need to have rust nightly version installed: rustup install nightly.

pvolok avatar Dec 05 '22 12:12 pvolok