convco
convco copied to clipboard
Build on windows 2022
Describe the bug Windows build fails in github action using windows latest (2022). see: https://github.com/convco/convco/runs/5385743790
To Reproduce run cargo build on windows-2022
Expected behavior Build the binary for windows
System (please complete the following information):
- OS: windows
- Version: 2022
Additional context
error: failed to run custom build command for `libz-sys v1.1.3`
Error: failed to run custom build command for `libz-sys v1.1.3`
Caused by:
process didn't exit successfully: `D:\a\convco\convco\target\debug\build\libz-sys-3992bd7e2[60](https://github.com/convco/convco/runs/5385743790?check_suite_focus=true#step:4:60)16673\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=LIBZ_SYS_STATIC
cargo:rerun-if-changed=build.rs
CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_x86_64-pc-windows-msvc = None
CMAKE_GENERATOR_x86_64_pc_windows_msvc = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_x86_64-pc-windows-msvc = None
CMAKE_x86_64_pc_windows_msvc = None
HOST_CMAKE = None
CMAKE = None
--- 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\runneradmin\.cargo\registry\src\github.com-1ecc[62](https://github.com/convco/convco/runs/5385743790?check_suite_focus=true#step:4:62)99db9ec823\cmake-0.1.48\src\lib.rs:8[78](https://github.com/convco/convco/runs/5385743790?check_suite_focus=true#step:4:78):25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Warning: error: build failed
Error: The process 'C:\Users\runneradmin\.cargo\bin\cargo.exe' failed with exit code [101](https://github.com/convco/convco/runs/5385743790?check_suite_focus=true#step:4:101)
Building with VS 22 works fine for me.
cargo build first failed for me too, on libz-sys. But after installing cmake it works just fine.
The log I had on error confirms it used VS 22: "-G" "Visual Studio 17 2022"
cmake not found error before installing it
error: failed to run custom build command for `libz-sys v1.1.5`
Caused by:
process didn't exit successfully: `[…]\convco\target\debug\build\libz-sys-92f38fe710ce240e\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=LIBZ_SYS_STATIC
cargo:rerun-if-changed=build.rs
CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
HOST_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_GENERATOR_x86_64-pc-windows-msvc = None
CMAKE_GENERATOR_x86_64_pc_windows_msvc = None
HOST_CMAKE_GENERATOR = None
CMAKE_GENERATOR = None
CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
HOST_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_x86_64-pc-windows-msvc = None
CMAKE_x86_64_pc_windows_msvc = None
HOST_CMAKE = None
CMAKE = None
running: "cmake" "[…]\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\libz-sys-1.1.5\\src/zlib-ng" "-G" "Visual Studio 17 2022" "-Thost=x64" "-Ax64" "-DBUILD_SHARED_LIBS=OFF" "-DZLIB_COMPAT=ON" "-DWITH_GZFILEOP=ON" "-DCMAKE_INSTALL_PREFIX=[…]\\convco\\target\\debug\\build\\libz-sys-3a48058ebc39ead0\\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_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_DEBUG= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=Debug"
--- stderr
thread 'main' panicked at '
failed to execute command: program not found
is `cmake` not installed?
Retried now https://github.com/convco/convco/actions/runs/3123264167/jobs/5065791763 looks working again
closed with d91b92acc071a0f8e4de1400945158edb88b2184