PistonDevelopers / conrod

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

Install: build fails for lack of cmake #1258

Open brackleian opened 5 years ago

brackleian commented 5 years ago

Trying to install on Windows 10 platform. Cloned successfully, ran cargo build, failed with this output:

error: failed to run custom build command for `shaderc v0.3.16`
process didn't exit successfully: `C:\...\conrod\target\debug\build\shaderc-b05d9795e43860a7\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at '
couldn't find required command: "cmake"

Perhaps a mention in the installation requirements doc, and a hint as to how to install cmake?

mitchmindtree commented 5 years ago

Thanks for the issue @brackleian!

Just for the record, this is only a requirement for the conrod_vulkano backend which requires shaderc to compile GLSL to SPIR-V at compile time.

Zizaz commented 5 years ago

Hello, got somehow the same problem,

so i'm trying to build example from git, on windows 10 too so i install cmake on windows, good need python, install python, good, then got this error

C:\Users\cleme\Desktop\conrod\conrod>cargo build
    Compiling shaderc v0.3.16
error: failed to run custom build command for `shaderc v0.3.16`
process didn't exit successfully: `C:\Users\cleme\Desktop\conrod\conrod\target\debug\build\shaderc-de3a1ebc166d1336\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1
build script failed, must exit now', 
C:\Users\cleme\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.37\src\lib.rs:813:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

hope it helps somehow

nasso commented 5 years ago

Hello, got somehow the same problem,

so i'm trying to build example from git, on windows 10 too so i install cmake on windows, good need python, install python, good, then got this error

C:\Users\cleme\Desktop\conrod\conrod>cargo build
    Compiling shaderc v0.3.16
error: failed to run custom build command for `shaderc v0.3.16`
process didn't exit successfully: `C:\Users\cleme\Desktop\conrod\conrod\target\debug\build\shaderc-de3a1ebc166d1336\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1
build script failed, must exit now', 
C:\Users\cleme\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.37\src\lib.rs:813:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

hope it helps somehow

Got the same issue, fixed it by installing Ninja too (I also had to install CMake, and had Python and git already installed).

See the shaderc-rs' setup guide (though I didn't have to install MSYS2, probably because I already have mingw installed, and in the PATH).

In the end, shaderc took a while to compile but ended up successfully doing so.

Zizaz commented 5 years ago

indeed it worked, just be sure to delete CMake directory and CMakeCache file in build directory in shaderc build directory or else ninja will give you another error

nasso commented 5 years ago

Oh yeah, I just deleted the entire target folder to force cargo to re-build everything. Though all of this sounds more like an issue with shaderc itself than conrod

jspashett commented 5 years ago

Thanks for the issue @brackleian!

Just for the record, this is only a requirement for the conrod_vulkano backend which requires shaderc to compile GLSL to SPIR-V at compile time.

How would you not build conrod_vulkano to avoid this?

lucidBrot commented 4 years ago

I also stumbled upon this issue. Ninja is missing:

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

Caused by:
  process didn't exit successfully: `C:\Users\me\Downloads\conrod\target\debug\build\shaderc-sys-1191be3a25052ed4\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: "ninja"

', C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\shaderc-sys-0.6.1\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

simply deleting the vulkano example dir and removing it from the conrod/Cargo.toml helps, I think