Closed okmanideep closed 3 months ago
Describe the bug cargo install timer_core is failing on windows
cargo install timer_core
To Reproduce Run cargo install timer_core on windows with 1.75.0 cargo version
Expected behavior Installation should succeed
Command output
Updating crates.io index Downloaded timer_core v0.6.0 Downloaded 1 crate (39.8 KB) in 0.63s Installing timer_core v0.6.0 Updating crates.io index Downloaded anstyle v1.0.4 Downloaded clap_derive v4.4.7 Downloaded cpal v0.15.2 Downloaded ogg v0.8.0 Downloaded tailcall-impl v0.1.6 Downloaded tailcall v0.1.6 Downloaded rodio v0.17.3 Downloaded lewton v0.10.2 Downloaded symphonia-metadata v0.5.3 Downloaded symphonia-core v0.5.3 Downloaded symphonia v0.5.3 Downloaded hound v3.5.1 Downloaded symphonia-bundle-mp3 v0.5.3 Downloaded dasp_sample v0.11.0 Downloaded crossterm v0.27.0 Downloaded claxon v0.4.3 Downloaded windows v0.46.0 Downloaded windows-targets v0.52.0 Downloaded tinyvec v1.6.0 Downloaded syn v2.0.45 Downloaded tinyvec_macros v0.1.1 Downloaded regex-automata v0.4.3 Downloaded windows_x86_64_msvc v0.52.0 Downloaded windows-sys v0.52.0 Downloaded time v0.3.31 Downloaded libc v0.2.151 Downloaded heck v0.4.1 Downloaded anstyle-query v1.0.2 Downloaded anstream v0.6.5 Downloaded windows_x86_64_msvc v0.48.5 Downloaded windows_x86_64_msvc v0.42.2 Downloaded winapi v0.3.9 Downloaded encoding_rs v0.8.33 Downloaded colorchoice v1.0.0 Downloaded clap_lex v0.6.0 Downloaded bitflags v2.4.1 Downloaded bitflags v1.3.2 Downloaded syn v1.0.109 Downloaded regex-syntax v0.8.2 Downloaded clap_builder v4.4.12 Downloaded windows-targets v0.48.5 Downloaded windows-targets v0.42.2 Downloaded utf8parse v0.2.1 Downloaded unicode-ident v1.0.12 Downloaded time-macros v0.2.16 Downloaded time-core v0.1.2 Downloaded strsim v0.10.0 Downloaded smallvec v1.11.2 Downloaded signal-hook-registry v1.4.1 Downloaded signal-hook v0.3.17 Downloaded serde v1.0.193 Downloaded scopeguard v1.2.0 Downloaded regex v1.10.2 Downloaded quote v1.0.34 Downloaded proc-macro2 v1.0.74 Downloaded powerfmt v0.2.0 Downloaded parking_lot_core v0.9.9 Downloaded nix v0.27.1 Downloaded lock_api v0.4.11 Downloaded deranged v0.3.11 Downloaded crossterm_winapi v0.9.1 Downloaded anstyle-wincon v3.0.2 Downloaded parking_lot v0.12.1 Downloaded once_cell v1.19.0 Downloaded memchr v2.7.1 Downloaded log v0.4.20 Downloaded lazy_static v1.4.0 Downloaded itoa v1.0.10 Downloaded glob v0.3.1 Downloaded clap v4.4.12 Downloaded cfg-if v1.0.0 Downloaded byteorder v1.5.0 Downloaded bytemuck v1.14.0 Downloaded autocfg v1.1.0 Downloaded arrayvec v0.7.4 Downloaded anstyle-parse v0.2.3 Downloaded aho-corasick v1.1.2 Downloaded 77 crates (24.2 MB) in 4.72s (largest was `windows` at 11.7 MB) Compiling cfg-if v1.0.0 Compiling windows_x86_64_msvc v0.52.0 Compiling proc-macro2 v1.0.74 Compiling unicode-ident v1.0.12 Compiling windows_x86_64_msvc v0.48.5 Compiling autocfg v1.1.0 Compiling parking_lot_core v0.9.9 Compiling windows_x86_64_msvc v0.42.2 Compiling smallvec v1.11.2 Compiling bitflags v1.3.2 Compiling scopeguard v1.2.0 Compiling log v0.4.20 Compiling lazy_static v1.4.0 Compiling arrayvec v0.7.4 Compiling libc v0.2.151 Compiling bytemuck v1.14.0 Compiling encoding_rs v0.8.33 Compiling syn v1.0.109 Compiling symphonia-core v0.5.3 Compiling anstyle v1.0.4 Compiling utf8parse v0.2.1 Compiling winapi v0.3.9 Compiling lock_api v0.4.11 Compiling anstyle-parse v0.2.3 Compiling tinyvec_macros v0.1.1 Compiling memchr v2.7.1 Compiling cpal v0.15.2 Compiling windows-targets v0.52.0 Compiling windows-targets v0.48.5 Compiling windows-targets v0.42.2 Compiling colorchoice v1.0.0 Compiling windows-sys v0.52.0 Compiling byteorder v1.5.0 Compiling windows v0.46.0 Compiling tinyvec v1.6.0 Compiling once_cell v1.19.0 Compiling parking_lot v0.12.1 Compiling quote v1.0.34 Compiling symphonia-metadata v0.5.3 Compiling syn v2.0.45 Compiling anstyle-wincon v3.0.2 Compiling anstyle-query v1.0.2 Compiling anstream v0.6.5 Compiling symphonia-bundle-mp3 v0.5.3 Compiling aho-corasick v1.1.2 Compiling ogg v0.8.0 Compiling regex-syntax v0.8.2 Compiling dasp_sample v0.11.0 Compiling signal-hook v0.3.17 Compiling heck v0.4.1 Compiling strsim v0.10.0 Compiling bitflags v2.4.1 Compiling powerfmt v0.2.0 Compiling clap_lex v0.6.0 Compiling deranged v0.3.11 Compiling clap_builder v4.4.12 Compiling crossterm_winapi v0.9.1 Compiling lewton v0.10.2 Compiling regex-automata v0.4.3 Compiling symphonia v0.5.3 Compiling signal-hook-registry v1.4.1 Compiling time-core v0.1.2 Compiling hound v3.5.1 Compiling itoa v1.0.10 Compiling claxon v0.4.3 Compiling time v0.3.31 Compiling clap_derive v4.4.7 Compiling crossterm v0.27.0 Compiling tailcall-impl v0.1.6 Compiling regex v1.10.2 Compiling nix v0.27.1 Compiling glob v0.3.1 Compiling clap v4.4.12 Compiling tailcall v0.1.6 Compiling rodio v0.17.3 Compiling timer_core v0.6.0 error[E0433]: failed to resolve: could not find `unix` in `os` --> C:\Users\okman\.cargo\registry\src\index.crates.io-6f17d22bba15001f\timer_core-0.6.0\src\beep.rs:7:14 | 7 | use std::os::unix::io::AsRawFd; | ^^^^ could not find `unix` in `os` error[E0432]: unresolved import `nix::ioctl_write_int_bad` --> C:\Users\okman\.cargo\registry\src\index.crates.io-6f17d22bba15001f\timer_core-0.6.0\src\beep.rs:15:5 | 15 | use nix::ioctl_write_int_bad; | ^^^^^^^^^^^^^^^^^^^^^^^^ no `ioctl_write_int_bad` in the root error: cannot determine resolution for the macro `ioctl_write_int_bad` --> C:\Users\okman\.cargo\registry\src\index.crates.io-6f17d22bba15001f\timer_core-0.6.0\src\beep.rs:47:1 | 47 | ioctl_write_int_bad!(kiocsound, KIOCSOUND); | ^^^^^^^^^^^^^^^^^^^ | = note: import resolution is stuck, try simplifying macro imports error[E0412]: cannot find type `Result` in crate `nix` --> C:\Users\okman\.cargo\registry\src\index.crates.io-6f17d22bba15001f\timer_core-0.6.0\src\beep.rs:62:45 | 62 | beep: fn(dev: &File, freq: i32) -> nix::Result<()>, | ^^^^^^ not found in `nix` | help: consider importing one of these items | 1 + use clap::error::Result; | 1 + use core::fmt::Result; | 1 + use core::result::Result; | 1 + use crate::Result; | and 6 other candidates help: if you import `Result`, refer to it directly | 62 - beep: fn(dev: &File, freq: i32) -> nix::Result<()>, 62 + beep: fn(dev: &File, freq: i32) -> Result<()>, | error[E0412]: cannot find type `Result` in crate `nix` --> C:\Users\okman\.cargo\registry\src\index.crates.io-6f17d22bba15001f\timer_core-0.6.0\src\beep.rs:66:43 | 66 | pub fn beep(&self, freq: i32) -> nix::Result<()> { | ^^^^^^ not found in `nix` | help: consider importing one of these items | 1 + use clap::error::Result; | 1 + use core::fmt::Result; | 1 + use core::result::Result; | 1 + use crate::Result; | and 6 other candidates help: if you import `Result`, refer to it directly | 66 - pub fn beep(&self, freq: i32) -> nix::Result<()> { 66 + pub fn beep(&self, freq: i32) -> Result<()> { | error[E0412]: cannot find type `Result` in crate `nix` --> C:\Users\okman\.cargo\registry\src\index.crates.io-6f17d22bba15001f\timer_core-0.6.0\src\beep.rs:85:50 | 85 | fn driver_console(dev: &File, freq: i32) -> nix::Result<()> { | ^^^^^^ not found in `nix` | help: consider importing one of these items | 1 + use clap::error::Result; | 1 + use core::fmt::Result; | 1 + use core::result::Result; | 1 + use crate::Result; | and 6 other candidates help: if you import `Result`, refer to it directly | 85 - fn driver_console(dev: &File, freq: i32) -> nix::Result<()> { 85 + fn driver_console(dev: &File, freq: i32) -> Result<()> { | error[E0599]: no method named `as_raw_fd` found for reference `&File` in the current scope --> C:\Users\okman\.cargo\registry\src\index.crates.io-6f17d22bba15001f\timer_core-0.6.0\src\beep.rs:89:23 | 89 | kiocsound(dev.as_raw_fd(), period_in_clock_cycles as i32)?; | ^^^^^^^^^ method not found in `&File` error[E0425]: cannot find function `kiocsound` in this scope --> C:\Users\okman\.cargo\registry\src\index.crates.io-6f17d22bba15001f\timer_core-0.6.0\src\beep.rs:89:9 | 23 | const KIOCSOUND: u64 = 0x4B2F; | ------------------------------ similarly named constant `KIOCSOUND` defined here ... 89 | kiocsound(dev.as_raw_fd(), period_in_clock_cycles as i32)?; | ^^^^^^^^^ help: a constant with a similar name exists: `KIOCSOUND` Some errors have detailed explanations: E0412, E0425, E0432, E0433, E0599. For more information about an error, try `rustc --explain E0412`. error: could not compile `timer_core` (lib) due to 8 previous errors warning: build failed, waiting for other jobs to finish... error: failed to compile `timer_core v0.6.0`, intermediate artifacts can be found at `C:\Users\okman\AppData\Local\Temp\cargo-installQRyIdj`. To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Additional context Shell - nu OS - Windows 11 - 22H2
Hello @okmanideep, Windows is not supported but I'm open to PRs.
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Describe the bug
cargo install timer_core
is failing on windowsTo Reproduce Run
cargo install timer_core
on windows with 1.75.0 cargo versionExpected behavior Installation should succeed
Command output
Additional context Shell - nu OS - Windows 11 - 22H2