electrs icon indicating copy to clipboard operation
electrs copied to clipboard

Build: could not find `iterator` in `signal_hook` and SIGUSR1 not found in scope

Open vostrnad opened this issue 2 years ago • 4 comments

Which command failed? cargo build --locked --release (with or without --no-default-features)

What was the error message?

Error message
error[E0432]: unresolved import `signal_hook::iterator`
 --> src\signals.rs:4:18
  |
4 | use signal_hook::iterator::Signals;
  |                  ^^^^^^^^ could not find `iterator` in `signal_hook`

error[E0425]: cannot find value `SIGUSR1` in this scope
  --> src\signals.rs:59:13
   |
59 |             SIGUSR1, // allow external triggering (e.g. via bitcoind `blocknotify`)
   |             ^^^^^^^ not found in this scope

error: aborting due to 2 previous errors

System OS name and version: Windows 10 rustc 1.48.0 (7eac88abb 2020-11-16) cargo 1.48.0 (65cbdd2dc 2020-10-14)

Compilation Linking: static Cross compilation: no Target architecture: amd64

vostrnad avatar Apr 26 '22 16:04 vostrnad

Thanks for reporting this issue, and sorry for the delayed response! Does this issue reproduces on latest master?

romanz avatar May 21 '23 17:05 romanz

Yes, the error message appears exactly the same.

vostrnad avatar May 21 '23 19:05 vostrnad

I guess it's related to https://docs.rs/signal-hook/latest/signal_hook/iterator/index.html not being supported on Windows.

romanz avatar May 21 '23 20:05 romanz

Maybe we can try to use https://crates.io/crates/ctrlc (which seems to support Windows).

romanz avatar May 21 '23 20:05 romanz