Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win64 build notes #143

Open
davehorner opened this issue Sep 14, 2023 · 1 comment
Open

win64 build notes #143

davehorner opened this issue Sep 14, 2023 · 1 comment

Comments

@davehorner
Copy link

davehorner commented Sep 14, 2023

I'm not sure when --all was an option for cargo, but --all is not an option today.

c:\working\rust\termusic>make run
cargo run --all
error: unexpected argument '--all' found

  tip: a similar argument exists: '--all-features'

Usage: cargo run --all-features [args]...

For more information, try '--help'.
make: *** [Makefile:13: run] Error 1

just a warning but resolver isn't set. I'm not sure if this affects results but I tried with both.

warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest

building the client requires proctoc installed, this dependency could be mentioned in the README.

cargo run --bin termusic
   Compiling tracing-core v0.1.31
   Compiling rusqlite v0.29.0
   Compiling termusic-playback v0.7.11 (C:\working\rust\termusic\playback)
   Compiling clap_derive v4.3.2
error: failed to run custom build command for `termusic-playback v0.7.11 (C:\working\rust\termusic\playback)`

Caused by:
  process didn't exit successfully: `c:\working\rust\termusic\target\debug\build\termusic-playback-19d5aca331980564\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-changed=proto/player.proto
  cargo:rerun-if-changed=proto

  --- stderr
  thread 'main' panicked at C:\Users\dhorner\.cargo\registry\src\index.crates.io-6f17d22bba15001f\prost-build-0.11.9\src\lib.rs:1457:10:
  Could not find `protoc` installation and this build crate cannot proceed without
      this knowledge. If `protoc` is installed and this crate had trouble finding
      it, you can set the `PROTOC` environment variable with the specific path to your
      installed `protoc` binary.You can download it from https://github.com/protocolbuffers/protobuf/releases or from your package manager.

  For more information: https://docs.rs/prost-build/#sourcing-protoc

resolved this error doing:

choco install protoc

The server panics with "Windows media controls require an HWND in MediaControlsOptions."

c:\working\rust\termusic>cargo run --bin termusic-server
   Compiling strsim v0.10.0
   Compiling ctrlc v3.4.0
   Compiling darling_core v0.14.4
   Compiling darling_macro v0.14.4
   Compiling darling v0.14.4
   Compiling derive_builder_core v0.12.0
   Compiling derive_builder_macro v0.12.0
   Compiling derive_builder v0.12.0
   Compiling atom_syndication v0.12.1
   Compiling rss v2.0.4
   Compiling termusic-lib v0.7.11 (C:\working\rust\termusic\lib)
   Compiling termusic-playback v0.7.11 (C:\working\rust\termusic\playback)
   Compiling termusic-server v0.7.11 (C:\working\rust\termusic\server)
    Finished dev [unoptimized + debuginfo] target(s) in 42.74s
     Running `target\debug\termusic-server.exe`
thread 'tokio-runtime-worker' panicked at C:\Users\dhorner\.cargo\registry\src\index.crates.io-6f17d22bba15001f\souvlaki-0.6.1\src\platform\windows\mod.rs:51:14:
Windows media controls require an HWND in MediaControlsOptions.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It continues to run after the panic, and when sent ctrl-c went zombie non-responsive on me. taskkill wouldn't kill without a /f.

thread 'ctrl-c' panicked at server\src/server.rs:35:14:
Could not send signal on channel.: SendError { .. }

but it is still hanging on.

c:\working\rust\termusic>cargo run --bin termusic
    Finished dev [unoptimized + debuginfo] target(s) in 0.81s
     Running `target\debug\termusic.exe`
Server process ID: 18804
thread 'main' panicked at C:\Users\dhorner\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-1.29.1\src\runtime\blocking\shutdown.rs:51:21: Cannot drop a runtime in a context where blocking is not allowed. This happens when a runtime is dropped from within an asynchronous context.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\termusic.exe` (exit code: 101)

the server is still running.

Error: tonic::transport::Error(Transport, hyper::Error(Listen, Os { code: 10048, kind: AddrInUse, message: "Only one usage of each socket address (protocol/network address/port) is normally permitted." }))

Going to have to reboot as I'm unsure where this process is waiting around. anyone have success in windows? I will give it another go when I get around to rebooting. lol

@hasezoey
Copy link
Contributor

I'm not sure when --all was an option for cargo, but --all is not an option today.

it is marked deprecated and --workspace should be used instead (it is a alias to that, but likely will not be removed anytime soon) and according to cargo's changelog the --all should exist since 1.39

just a warning but resolver isn't set. I'm not sure if this affects results but I tried with both.

this warning should be harmless and has been fixed with #156

thread 'tokio-runtime-worker' panicked at C:\Users\dhorner.cargo\registry\src\index.crates.io-6f17d22bba15001f\souvlaki-0.6.1\src\platform\windows\mod.rs:51:14:
Windows media controls require an HWND in MediaControlsOptions.

this had issue #93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants