PistonDevelopers / conrod

An easy-to-use, 2D GUI library written entirely in Rust.
Other
3.35k stars 296 forks source link

error: failed to run custom build command for `shaderc-sys v0.6.2` #1350

Open austern opened 4 years ago

austern commented 4 years ago

Cloned the repository with "git clone https://github.com/PistonDevelopers/conrod.git". Current HEAD commit ID is 0c61e49afba22964a9479c371c7aaca3ab96ca67.

I switched to conrod directory and ran "cargo build --release". The build failed with the following error:

error: failed to run custom build command for shaderc-sys v0.6.2

Caused by: process didn't exit successfully: /Users/austern/src/conrod/target/debug/build/shaderc-sys-f341b3d5cd06cebe/build-script-build (exit code: 101) --- stdout cargo:warning=System installed library not found. Falling back to build from source

--- stderr thread 'main' panicked at '

couldn't find required command: "cmake"

', /Users/austern/.cargo/registry/src/github.com-1ecc6299db9ec823/shaderc-sys-0.6.2/build/cmd_finder.rs:50:13 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

warning: build failed, waiting for other jobs to finish... error: build failed

My system is macOS Mojave 10.14.6. I'm using Rust version 1.43.1.

Filius-Patris commented 4 years ago

Try installing cmake using Homebrew:

brew install cmake

Worked for me, MacOS 10.15.6

alvinhochun commented 4 years ago

Running cargo build on the top-level workspace builds all the projects, which is probably not what you want. FWIW conrod_vulkano requires some external dependencies to build (probably including cmake) but you can ignore it for most cases.

If you want to run an example in release build, just run cargo run --example all_winit_glium --release.

Filius-Patris commented 4 years ago

Sure, but the guide suggests otherwhise.

Your argument is fair, so I'll recommend updating the docs? I'll just setup a PR real quick to continue this discussion over there.

alvinhochun commented 4 years ago

Sure. If you're making a PR for this, just delete the whole steps 3 and 4 as they are really not needed.

A-Mackey commented 2 years ago

I was able to fix this issue by installing the Vulkan SDK to my computer then restarting. The docs for shaderc mentions that it uses these SDK's so make sure you have one installed onto your computer.

artayasa commented 5 months ago

The docs for shaderc mentions that it uses these SDK's

This need to instal shaderc sir?? I still confiusd and too hard instal it on win11 always error