jeaye / ncurses-rs

A low-level ncurses wrapper for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build on OS Windows fails with an "cannot delete" error

Vest opened this issue · comments

commented

Hello everyone,

I was trying to build the latest version of the library on my Windows machine (Cygwin), and after I met all dependencies, I have faced an error:

thread 'main' panicked at 'cannot delete C:\work\ncurses-rs\target\debug\build\ncurses-614b448966de1353\out\chtype_size: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', build.rs:111:32
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca\/library\std\src/panicking.rs:495:5
     1: core::panicking::panic_fmt
               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca\/library\core\src/panicking.rs:92:14
     2: core::option::expect_none_failed
               at /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca\/library\core\src/option.rs:1268:5
     3: core::result::Result<T,E>::expect
               at .\C:\Users\user\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src/result.rs:933:23
     4: build_script_build::check_chtype_size
               at .\C:\work\ncurses-rs/build.rs:111:5
     5: build_script_build::main
               at .\C:\work\ncurses-rs/build.rs:59:5
     6: core::ops::function::FnOnce::call_once
               at .\C:\Users\user\.rustup\toolchains\stable-x86_64-pc-windows-gnu\lib/rustlib/src/rust\library\core\src\ops/function.rs:227:5

I am preparing a pull request with a fix.

The issue occurs, because instead of ...\out\chtype_size, the build script should delete ...\out\chtype_size.exe

This is resolved as v5.100.0.