azul: Build fails with VS 2019
I cannot build azul.
Description
When I run cargo build on powershell, my shell displays
error: failed to run custom build command for `harfbuzz-sys v0.3.0 (https://github.com/maps4print/azul-dependencies?rev=380b7e7cba8b728a3fc89fe28952e3b07aa624e7#380b7e7c)`
process didn't exit successfully: `C:\Users\Shogo\Projects\azul\target\debug\build\harfbuzz-sys-edd981c7a9cf27bd\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=HARFBUZZ_SYS_NO_PKG_CONFIG
--- stderr
thread 'main' panicked at '
couldn't determine visual studio generator
if VisualStudio is installed, however, consider running the appropriate vcvars script before building this crate
', C:\Users\Shogo\.cargo\git\checkouts\azul-dependencies-70bb1f94316762f9\380b7e7\cmake-0.1.35\src\lib.rs:687:25
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
With VS 2019’s vcvars64,
error: failed to run custom build command for `harfbuzz-sys v0.3.0 (https://github.com/maps4print/azul-dependencies?rev=380b7e7cba8b728a3fc89fe28952e3b07aa624e7#380b7e7c)`
process didn't exit successfully: `C:\Users\Shogo\Projects\azul\target\debug\build\harfbuzz-sys-edd981c7a9cf27bd\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=HARFBUZZ_SYS_NO_PKG_CONFIG
--- stderr
thread 'main' panicked at '
unsupported or unknown VisualStudio version: 16.0
if another version is installed consider running the appropriate vcvars script before building this crate
', C:\Users\Shogo\.cargo\git\checkouts\azul-dependencies-70bb1f94316762f9\380b7e7\cmake-0.1.35\src\lib.rs:687:25
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
Version / OS
- 
azul version: since 7add48d77f33e517d11df57d0a76366c3c51aa8e 
- 
Operating system: Windows 10 64bit 
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 9
- Comments: 20 (3 by maintainers)
There is a temp way to workaround.
azul-master), and unzip it under your project root folder.azul-master/cargo/azul/Cargo.toml, changeazul-dependencies = { version = "0.1.0", git = "https://github.com/maps4print/azul-dependencies", rev = "..." }toazul-dependencies = { version = "0.1.0", git = "https://github.com/maps4print/azul-dependencies", rev = "b61fe8d931ea5f46fdce05944f5fde8ca4cd6931" }.azul-master/cargo/azul-widgets/Cargo.toml, changeazul-dependencies = { version = "0.1.0", git = "https://github.com/maps4print/azul-dependencies", rev = "..." }toazul-dependencies = { version = "0.1.0", git = "https://github.com/maps4print/azul-dependencies", rev = "b61fe8d931ea5f46fdce05944f5fde8ca4cd6931" }.Cargo.tomlIt does not build on windows with the latest Visual Studio. It does compile on other platforms or on previous versions of Visual Studio.
I do agree it’s not a huge issue.
I am new to Azul and would like to try it out. I hope the fix is coming soon, as for me it is a blocking issue.
Am I reading correctly that the library not building at all is “not a huge issue”? Or perhaps I am misunderstanding
@wycats someone needs to update it, duh. 😉 Haven’t had the time to do that though. Yes, I’ll fix it, it’s on my list, it’s not a huge issue - but I’m currently more concerned with fixing the layout system and fixing segfaults in the OpenGL code. After that’s done I’ll fix the build issues.
The azul-dependencies repo needs to be updated to include cmake-0.1.39 and cc-1.0.36 to recognise VS2019.
waiting for your update 😉
I located cmake.exe for VS2019 in
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\binAfter adding to PATH,cargo buildsucceeded.Does nintha’s method really still work? I forked azul, changed the 2 dependency lines, and changed my dependent project to use my forked version. I can see in my Cargo.lock that I have got the b61f… version but it still fails to build harfbuzz (who needs a text shaper anyway 😉 ). I have tried VS 2019 16.4.2 and now also 16.4.3. Of course I can install (and I probably will) install VS2015 instead, but it is intriguing what is causing this.
edit: I realized I posted this a bit too tired. VS2019 does install cmake, but it did not put it in my PATH. DOH! and after fixing that there is no error building neither with ninthas cargo patch, nor current azul. My code still does not run properly, but that is likely a fault in my code, at least now it builds… sorry for wasting bandwidth…
I’ve this problem… error: failed to run custom build command for
harfbuzz-sys v0.3.0 (https://github.com/maps4print/azul-dependencies?rev=bf2933b9aac43a7003278862772250398e4fa457#bf2933b9)Caused by: process didn’t exit successfully:
C:\Users\Cristian\Documents\Rust\Pfile\target\debug\build\harfbuzz-sys-2784050289f4621a\build-script-build(exit code: 101) — stdout cargo:rerun-if-env-changed=HARFBUZZ_SYS_NO_PKG_CONFIG running: “cmake” “C:\Users\Cristian\.cargo\git\checkouts\azul-dependencies-70bb1f94316762f9\bf2933b\harfbuzz-sys-0.3.0\harfbuzz” “-G” “Visual Studio 16 2019” “-Thost=x64” “-Ax64” “-DCMAKE_INSTALL_PREFIX=C:\Users\Cristian\Documents\Rust\Pfile\target\debug\build\harfbuzz-sys-37d203667a9d0f13\out” “-DCMAKE_C_FLAGS= -nologo -MD -Brepro” “-DCMAKE_C_FLAGS_DEBUG= -nologo -MD -Brepro” “-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro” “-DCMAKE_CXX_FLAGS_DEBUG= -nologo -MD -Brepro” “-DCMAKE_BUILD_TYPE=Debug”— stderr thread ‘main’ panicked at ’ failed to execute command: The specified file could not be found. (os error 2) is
cmakenot installed?build script failed, must exit now’, C:\Users\Cristian.cargo\git\checkouts\azul-dependencies-70bb1f94316762f9\bf2933b\cmake-0.1.40\src\lib.rs:835:5 note: run with
RUST_BACKTRACE=1environment variable to display a backtrace.warning: build failed, waiting for other jobs to finish… error: build failed
I don’t understand why this was closed. It is not fixed yet.
It would have save me 2 hours, as I checked opened issues before trying to fix my installation. I only now checked closed issue to realise that VS2019 is not supported.
You can try the
/unvendor_dependenciesbranch, but that one isn’t compiling yet. I’m in the progress of fixing it, don’t worry.Same here, i hope everything is going well.