Compiling error in rust: failed to run custom build command - rust

I don't quite know what I am looking at, I'm quite certain that this is not my fault
PS C:\Users\alexa\Documents\UNIVERSITEIT\2_MASTER\DECISION MAKING FOR BUSINESS\CASE_E\shift_scheduling_code> cargo run
Compiling num-traits v0.2.15
Compiling num-integer v0.1.45
error: failed to run custom build command for `num-traits v0.2.15`
Caused by:
process didn't exit successfully: `C:\Users\alexa\Documents\UNIVERSITEIT\2_MASTER\DECISION MAKING FOR BUSINESS\CASE_E\shift_scheduling_code\target\debug\build\num-traits-0ab924901b158460\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Other("output path is not a writable directory") }', C:\Users\alexa\.cargo\registry\src\github.com-1ecc6299db9ec823\autocfg-1.1.0\src\lib.rs:128:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `num-integer v0.1.45`
Caused by:
process didn't exit successfully: `C:\Users\alexa\Documents\UNIVERSITEIT\2_MASTER\DECISION MAKING FOR BUSINESS\CASE_E\shift_scheduling_code\target\debug\build\num-integer-7dbeca75e83a8205\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: Other("output path is not a writable directory") }', C:\Users\alexa\.cargo\registry\src\github.com-1ecc6299db9ec823\autocfg-1.1.0\src\lib.rs:128:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
PS C:\Users\alexa\Documents\UNIVERSITEIT\2_MASTER\DECISION MAKING FOR BUSINESS\CASE_E\shift_scheduling_code>
I don't really know where to begin solving this problem

Related

wasm-pack install problem - failed to run custom build command for `openssl-sys v0.9.74`

I'm running cargo 1.61.0 on Windows, and I'm trying to install wasm-pack with the following command:
cargo install wasm-pack
I'm getting the following error though:
error: failed to run custom build command for `openssl-sys v0.9.74`
Caused by:
process didn't exit successfully: `C:\Users\X\AppData\Local\Temp\cargo-installYlYKGY\release\build\openssl-sys-d97a6a84756b04f8\build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset
running "perl" "./Configure" "--prefix=C:\\Users\\X\\AppData\\Local\\Temp\\cargo-installYlYKGY\\release\\build\\openssl-sys-69b856177b1e2088\\out\\openssl-build\\install" "--openssldir=SYS$MANAGER:[OPENSSL]" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-engine" "no-asm" "VC-WIN64A"
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }', C:\Users\X\.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-src-111.21.0+1.1.1p\src\lib.rs:488:39
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `wasm-pack v0.10.3`, intermediate artifacts can be found at `C:\Users\X\AppData\Local\Temp\cargo-installYlYKGY`
How do I get past this error?

How to fix Terra Rust Smart Contract OpenSSL Error

I am on windows 11. When i run "cargo install cargo-generate --features vendored-openssl" in cmd or powershell i receive:
error: failed to run custom build command for `openssl-sys v0.9.72`
Caused by:
process didn't exit successfully: `C:\Users\tjblu\AppData\Local\Temp\cargo-installsZBq7g\release\build\openssl-sys-dce3228ef73e702e\build-script-main` (exit code: 101)
\--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset
running "perl" "./Configure" "--prefix=C:\\Users\\tjblu\\AppData\\Local\\Temp\\cargo-installsZBq7g\\release\\build\\openssl-sys-5dd3ef493eeba8e5\\out\\openssl-build\\install" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-engine" "no-asm" "VC-WIN64A"
\--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }', C:\\Users\\tjblu.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\openssl-src-111.18.0+1.1.1n\\src\\lib.rs:477:39
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-generate v0.13.0`, intermediate artifacts can be found at `C:\Users\tjblu\AppData\Local\Temp\cargo-installsZBq7g`
Caused by:
build failed
I've tried so many remedies, please help!
Tried installing perl, choco install openssl. Anything i could find online.
I have found a temporary workaround for this.
These are the steps I took:
Manually downloaded the 'cargo-generate' package from the following link: https://github.com/cargo-generate/cargo-generate/releases
Downloaded 'cargo-generate-v0.13.0-x86_64-pc-windows-msvc.tar.gz'
Extracted the content, and copied 'cargo-generate.exe' to the following Windows local directory path 'C:\Users\[username]\.cargo\bin\'.
Hope this helps for now, also waiting for a better solution.

Why doesn't the rust create openssl-sys compile?

error: failed to run custom build command for `openssl-sys v0.9.72`
Caused by:
process didn't exit successfully: `C:\Users\REBERE~1\AppData\Local\Temp\cargo-installamQyFK\release\build\openssl-sys-612700125c292786\build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset
running "perl" "./Configure" "--prefix=C:\\Users\\REBERE~1\\AppData\\Local\\Temp\\cargo-installamQyFK\\release\\build\\openssl-sys-30b5392f9f091eea\\out\\openssl-build\\install" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-engine" "no-asm" "VC-WIN64A"
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: NotFound, message: "program not found" }', C:\Users\reberezinar\.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-src-111.18.0+1.1.1n\src\lib.rs:477:39
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `wasm-pack v0.10.2`, intermediate artifacts can be found at `C:\Users\REBERE~1\AppData\Local\Temp\cargo-installamQyFK`
Caused by:
build failed
hi, once I have tried to run "cargo install wasm-pack" command, ı have faced the error that has been given below.
OS: 64 bit win10
check if you have OpenSSL already installed.

cargo run throwing openssl error and doesn't compile

Compiling openssl-sys v0.9.61
error: failed to run custom build command for `openssl-sys v0.9.61`
Caused by:
process didn't exit successfully: `C:\Users\mooyb_000\Desktop\Projects\hello-rocket\target\debug\build\openssl-sys-845818f977db5f26\build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }', C:\Users\mooyb_000\.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-src-111.15.0+1.1.1k\src\lib.rs:123:44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
getting this error when trying to do
cargo run
I tried installing this package through vcpkg but it was of no help does someone have the solution

Compiling rust with cpal for raspberry pi

Ok so all I want to do is write an audio application for my raspberry pi. When I compiled a simple "hello world" for raspberry everything worked great but when i introduced cpal as a dependency i got this error after
cargo build --target=armv7-unknown-linux-gnueabihf
error: failed to run custom build command for `alsa-sys v0.1.2`
Caused by:
process didn't exit successfully: `/home/kuba/Projects/effect-box/hello-pi/target/debug/build/alsa-sys-967340f82a5fa569/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Cross compilation detected. Use PKG_CONFIG_ALLOW_CROSS=1 to override"', src/libcore/result.rs:1084:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
warning: build failed, waiting for other jobs to finish...
error: build failed
Its been a week and I got nothing. I feel like I've tried everything.
What couses this error and how can I fix it?
Background info: my os is elementary os (it is based on ubuntu so most things that work on ubuntu should work here too) and the code i'm trying to compile is this:
use cpal::traits::{DeviceTrait, HostTrait};
fn main() {
let host = cpal::default_host();
let device = host
.default_output_device()
.expect("no default output device");
let format = device
.default_output_format()
.expect("failed to get device name");
println!("{:?}", format);
println!("Hello, world!");
}
EDIT:
Thanks to Victor Deleau I added an enviroment variable PKG_CONFIG_ALLOW_CROSS=1. Now I'm getting this message:
error: linking with `cc` failed: exit code: 1
followed by this huge error https://pastebin.com/raw/ghHgpesV

Resources