darkrenaissance/darkfi

How to run IRCD in headless environment?

eum2o opened this issue · 2 comments

eum2o commented

Environment

Problem
I try to install the IRC daemon following the guide on https://darkrenaissance.github.io/darkfi/misc/ircd.html. The command make BINS=ircd fails. This is the output:

RUSTFLAGS="" cargo build --all-features --release --package zkas
   Compiling typenum v1.15.0
   Compiling openssl-sys v0.9.75
   Compiling ring v0.16.20
   Compiling rustls v0.20.6
   Compiling serde_derive v1.0.144
   Compiling ctor v0.1.23
   Compiling thiserror-impl v1.0.34
   Compiling futures-macro v0.3.24
   Compiling openssl-macros v0.1.0
   Compiling async-attributes v1.1.2
   Compiling darkfi-derive-internal v0.3.0 (/mnt/c/dev/git/darkfi/src/util/derive-internal)
   Compiling structopt-toml-derive v0.5.1
   Compiling async-trait v0.1.57
   Compiling proc-macro-error v1.0.4
   Compiling openssl v0.10.41
   Compiling native-tls v0.2.10
   Compiling generic-array v0.14.6
   Compiling structopt-derive v0.4.18
   Compiling clap_derive v3.2.18
   Compiling webpki v0.22.0
   Compiling sct v0.7.0
   Compiling rcgen v0.9.3
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.3
   Compiling digest v0.10.3
   Compiling sha-1 v0.10.0
   Compiling blake3 v1.3.1
   Compiling value-bag v1.0.0-alpha.9
   Compiling log v0.4.17
   Compiling polling v2.3.0
   Compiling kv-log-macro v1.0.7
   Compiling simplelog v0.12.0
   Compiling async-io v1.9.0
   Compiling async-global-executor v2.3.0
   Compiling async-net v1.7.0
   Compiling async-process v1.5.0
   Compiling async-std v1.12.0
   Compiling smol v1.2.5
   Compiling futures-util v0.3.24
   Compiling futures-rustls v0.22.2
   Compiling futures-executor v0.3.24
   Compiling structopt v0.3.26
   Compiling thiserror v1.0.34
   Compiling futures v0.3.24
   Compiling fast-socks5 v0.4.3
   Compiling clap v3.2.20
   Compiling serde v1.0.144
   Compiling semver v1.0.13
   Compiling serde_json v1.0.85
   Compiling camino v1.1.1
   Compiling cargo-platform v0.1.2
   Compiling toml v0.5.9
   Compiling url v2.2.2
   Compiling bincode v2.0.0-rc.1
   Compiling tungstenite v0.17.3
   Compiling async-native-tls v0.4.0
   Compiling cargo_metadata v0.14.2
   Compiling proc-macro-crate v1.2.1
   Compiling darkfi-derive v0.3.0 (/mnt/c/dev/git/darkfi/src/util/derive)
   Compiling async-tungstenite v0.17.2
   Compiling skeptic v0.13.7
   Compiling structopt-toml v0.5.1
   Compiling darkfi v0.3.0 (/mnt/c/dev/git/darkfi)
error[E0599]: the method `as_display` exists for reference `&std::io::ErrorKind`, but its trait bounds were not satisfied
   --> src/error.rs:265:13
    |
265 |       #[error("IO error: {0}")]
    |               ^^^^^^^^^^^^^^^ method cannot be called on `&std::io::ErrorKind` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `std::io::ErrorKind: std::fmt::Display`
            which is required by `&std::io::ErrorKind: DisplayAsDisplay`

For more information about this error, try `rustc --explain E0599`.
error: could not compile `darkfi` due to previous error
make: *** [Makefile:36: zkas] Error 101

I assume that there's a problem with my WSL not having a display. Is there a workaround or fix for this? Or is it simply not possible for now to build and run the IRCD in WSL/a headless Linux environment?

It's possible, but you should first update your Rust compiler. Try using the latest stable version (1.64.0).

eum2o commented

Thanks, @parazyd. This fixed my problem.

I removed cargo installed with apt and re-installed it as described on https://doc.rust-lang.org/cargo/getting-started/installation.html. Now, with cargo v1.64.0 I can build the IRCD. 👍