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

Build issue; permission denied to open file #127

Open
reposefulGrass opened this issue Apr 12, 2017 · 4 comments
Open

Build issue; permission denied to open file #127

reposefulGrass opened this issue Apr 12, 2017 · 4 comments

Comments

@reposefulGrass
Copy link

Trying out the simple hello world example.

I added ncurses to my dependencies and just ran it. This is the result:

cargo build
   Compiling ncurses v5.85.0
error: failed to run custom build command for `ncurses v5.85.0`
process didn't exit successfully: `C:\~~~\rust\example\target\debug\build\ncurses-35f9ffa7ff1eeb80\build-script-build` (exit code: 101)
--- stdout
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-pc-windows-msvc")
HOST = Some("x86_64-pc-windows-msvc")
TARGET = Some("x86_64-pc-windows-msvc")
TARGET = Some("x86_64-pc-windows-msvc")
HOST = Some("x86_64-pc-windows-msvc")
CC_x86_64-pc-windows-msvc = None
CC_x86_64_pc_windows_msvc = None
HOST_CC = None
CC = None
TARGET = Some("x86_64-pc-windows-msvc")
HOST = Some("x86_64-pc-windows-msvc")
CFLAGS_x86_64-pc-windows-msvc = None
CFLAGS_x86_64_pc_windows_msvc = None
HOST_CFLAGS = None
CFLAGS = None
PROFILE = Some("debug")
chtype_size.c
c1: fatal error C1083: Cannot open source file: 'C:\~~~\rust\example\target\debug\build\ncurses-b821ee5513798319\out\chtype_size.c': Permission denied

--- stderr
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
thread 'main' panicked at 'C:\~~~\rust\example\target\debug\build\ncurses-b821ee5513798319\out\chtype_size failed: Error { repr: Os { code: 2, message: "The system cannot find the file specified." } }', C:\bot\slave\stable-dist-rustc-win-msvc-64\build\src\libcore\result.rs:868
@reposefulGrass
Copy link
Author

message: "The system cannot find the file specified."

The file is definitely there. chtype_size.c that is. If you guys need anthing else, ask. I have no clue whats going on but i'll dig around for a fix.

@rolandphung
Copy link

rolandphung commented Jul 5, 2017

This is due to attempting to compile cursive with ncurses on windows. To avoid this, add default-features=false option for cursive dependency and add pancurses-backend to cursive features. It was casually mentioned in the Backends wiki page.

@AnthonyMansour
Copy link

This error is because ncurses doesn't support Windows.
Use pancurses instead, which supports Unix and Windows, by adding the following to Cargo.toml.

[dependencies.cursive]
version = "0.12"
default-features = false
features = ["pancurses-backend"]

@edsqjr
Copy link

edsqjr commented Mar 29, 2024

For those on Ubuntu, make sure you've installed ncurses build libraries:
sudo apt-get install libncurses5-dev libncursesw5-dev

More info (from cursive repo): https://github.com/gyscos/cursive/wiki/Install-ncurses

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

4 participants