ActivityWatch / aw-watcher-window-wayland

Window and AFK watcher for some Wayland compositors
Mozilla Public License 2.0
60 stars 14 forks source link

How to build #1

Closed tivvit closed 4 years ago

tivvit commented 4 years ago

Hi I wanted to try this project but I struggle with the compilation

RUST_BACKTRACE=1 cargo build --release                                                                                         
   Compiling aw-watcher-window-wayland v0.1.0 (/home/tivvit/git/aw-watcher-window-wayland)
   Compiling wayland-client v0.24.0
   Compiling tokio-tcp v0.1.3
   Compiling tokio-threadpool v0.1.16
error: failed to run custom build command for `aw-watcher-window-wayland v0.1.0 (/home/tivvit/git/aw-watcher-window-wayland)`

Caused by:
  process didn't exit successfully: `/home/tivvit/git/aw-watcher-window-wayland/target/release/build/aw-watcher-window-wayland-aee07b0acb80b021/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/libcore/result.rs:1165:5
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:61
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1028
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:65
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:50
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:188
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:205
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:464
  11: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:373
  12: rust_begin_unwind
             at src/libstd/panicking.rs:302
  13: core::panicking::panic_fmt
             at src/libcore/panicking.rs:139
  14: core::result::unwrap_failed
             at src/libcore/result.rs:1165
  15: wayland_scanner::generate_code
  16: build_script_build::main
  17: std::rt::lang_start::{{closure}}
  18: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:48
  19: std::panicking::try::do_call
             at src/libstd/panicking.rs:287
  20: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:83
  21: std::panicking::try
             at src/libstd/panicking.rs:265
  22: std::panic::catch_unwind
             at src/libstd/panic.rs:396
  23: std::rt::lang_start_internal
             at src/libstd/rt.rs:47
  24: main
  25: __libc_start_main
  26: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
rustc -V
rustc 1.40.0-nightly (87cbf0a54 2019-11-01)

It is trying to read some file but where it should be located?

Thanks

johan-bjareholt commented 4 years ago

Seems like you are the first user that is not me, because apparently it was completely broken. Should be fixed in this commit https://github.com/ActivityWatch/aw-watcher-window-wayland/commit/19d8d9fb174ff28e2e2dbfcbf0e18c685da65dbe

The issue was simple, there is generated wayland bindings which are generated into src/protocols but the protocols directory didn't exist unless you create it manually (which I have done before). So I simply fixed so the code generating the bindings creates that directory if it doesn't exist.

johan-bjareholt commented 4 years ago

Thanks for the report!

If you have any more questions feel free to ask!