rust-lang / rust-lang/libz-sys

1.1.20 failed in cmake stage on windows 10

Open
#229 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted question
Dominant language
Rust
Stars
138
Forks
88
PR merge metrics
No merged PRs in 30d

Description


   Compiling sysinfo v0.31.4
error: failed to run custom build command for `libz-ng-sys v1.1.20`

Caused by:
  process didn't exit successfully: `C:\Users\SHENJA~1.SHE\AppData\Local\Temp\cargo-installxHs1ll\release\build\libz-ng-sys-ac4e4ef559aefff4\build-script-cmake` (exit code: 101)
  --- stdout
  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" "D:\\APPS\\rust\\cargo\\registry\\src\\rsproxy.cn-0dccff568467c15b\\libz-ng-sys-1.1.20\\src/zlib-ng" "-G" "Visual Studio 17 2022" "-Thost=x64" "-Ax64" "-DBUILD_SHARED_LIBS=OFF" "-DZLIB_COMPAT=OFF" "-DZLIB_ENABLE_TESTS=OFF" "-DWITH_GZFILEOP=ON" "-DCMAKE_INSTALL_PREFIX=C:\\Users\\SHENJA~1.SHE\\AppData\\Local\\Temp\\cargo-installxHs1ll\\release\\build\\libz-ng-sys-20cfbbbe2e3f522b\\out" "-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=Release"
  -- Using CMake version 3.30.4
  -- ZLIB_HEADER_VERSION: 1.3.1
  -- ZLIBNG_HEADER_VERSION: 2.2.2
  -- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19045.
  -- The C compiler identification is MSVC 19.41.34123.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: D:/APPS/Microsoft/VisualStudio/2022-community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Arch detected: 'x86_64'
  -- Basearch of 'x86_64' has been detected as: 'x86'
  -- Looking for arm_acle.h
  -- Looking for arm_acle.h - not found
  -- Looking for sys/auxv.h
  -- Looking for sys/auxv.h - not found
  -- Looking for sys/sdt.h
  -- Looking for sys/sdt.h - not found
  -- Looking for unistd.h
  -- Looking for unistd.h - not found
  -- Looking for linux/auxvec.h
  -- Looking for linux/auxvec.h - not found
  -- Looking for sys/types.h
  -- Looking for sys/types.h - found
  -- Looking for stdint.h
  -- Looking for stdint.h - found
  -- Looking for stddef.h
  -- Looking for stddef.h - found
  -- Check size of off64_t
  -- Check size of off64_t - failed
  -- Check size of _off64_t
  -- Check size of _off64_t - failed
  -- Check size of __off64_t
  -- Check size of __off64_t - failed
  -- Looking for fseeko
  -- Looking for fseeko - not found
  -- Looking for strerror
  -- Looking for strerror - found
  -- Looking for posix_memalign
  -- Looking for posix_memalign - not found
  -- Looking for aligned_alloc
  -- Looking for aligned_alloc - not found
  -- Performing Test HAVE_NO_INTERPOSITION
  -- Performing Test HAVE_NO_INTERPOSITION - Failed
  -- Performing Test HAVE_ATTRIBUTE_VISIBILITY_HIDDEN
  -- Performing Test HAVE_ATTRIBUTE_VISIBILITY_HIDDEN - Failed
  -- Performing Test HAVE_ATTRIBUTE_VISIBILITY_INTERNAL
  -- Performing Test HAVE_ATTRIBUTE_VISIBILITY_INTERNAL - Failed
  -- Performing Test HAVE_ATTRIBUTE_ALIGNED
  -- Performing Test HAVE_ATTRIBUTE_ALIGNED - Failed
  -- Performing Test HAVE_BUILTIN_ASSUME_ALIGNED
  -- Performing Test HAVE_BUILTIN_ASSUME_ALIGNED - Success
  -- Performing Test HAVE_BUILTIN_CTZ
  -- Performing Test HAVE_BUILTIN_CTZ - Failed
  -- Performing Test HAVE_BUILTIN_CTZLL
  -- Performing Test HAVE_BUILTIN_CTZLL - Failed
  -- Performing Test HAVE_PTRDIFF_T
  -- Performing Test HAVE_PTRDIFF_T - Success
  -- Performing Test HAVE_XSAVE_INTRIN
  -- Performing Test HAVE_XSAVE_INTRIN - Success
  -- Performing Test HAVE_SSE2_INTRIN
  -- Performing Test HAVE_SSE2_INTRIN - Success
  -- Performing Test HAVE_SSSE3_INTRIN
  -- Performing Test HAVE_SSSE3_INTRIN - Success
  -- Performing Test HAVE_SSE42_INTRIN
  -- Performing Test HAVE_SSE42_INTRIN - Success
  -- Performing Test HAVE_PCLMULQDQ_INTRIN
  -- Performing Test HAVE_PCLMULQDQ_INTRIN - Success
  -- Performing Test HAVE_AVX2_INTRIN
  -- Performing Test HAVE_AVX2_INTRIN - Success
  -- Performing Test HAVE_AVX512_INTRIN
  -- Performing Test HAVE_AVX512_INTRIN - Success
  -- Performing Test HAVE_AVX512VNNI_INTRIN
  -- Performing Test HAVE_AVX512VNNI_INTRIN - Success
  -- Performing Test HAVE_VPCLMULQDQ_INTRIN
  -- Performing Test HAVE_VPCLMULQDQ_INTRIN - Success
  -- Architecture-specific source files: arch/x86/x86_features.c;arch/x86/chunkset_sse2.c;arch/x86/compare256_sse2.c;arch/x86/slide_hash_sse2.c;arch/x86/adler32_ssse3.c;arch/x86/chunkset_ssse3.c;arch/x86/adler32_sse42.c;arch/x86/crc32_pclmulqdq.c;arch/x86/slide_hash_avx2.c;arch/x86/chunkset_avx2.c;arch/x86/compare256_avx2.c;arch/x86/adler32_avx2.c;arch/x86/adler32_avx512.c;arch/x86/adler32_avx512_vnni.c;arch/x86/crc32_vpclmulqdq.c
  -- The following features have been enabled:

   * XSAVE, Support XSAVE intrinsics using ""
   * SSSE3_ADLER32, Support SSSE3-accelerated adler32, using ""
   * SSE42_CRC, Support SSE4.2 optimized adler32 hash generation, using ""
   * PCLMUL_CRC, Support CRC hash generation using PCLMULQDQ, using " "
   * AVX2_SLIDEHASH, Support AVX2 optimized slide_hash, using "/arch:AVX2"
   * AVX2_CHUNKSET, Support AVX2 optimized chunkset, using "/arch:AVX2"
   * AVX2_COMPARE256, Support AVX2 optimized compare256, using "/arch:AVX2"
   * AVX2_ADLER32, Support AVX2-accelerated adler32, using "/arch:AVX2"
   * AVX512_ADLER32, Support AVX512-accelerated adler32, using "/arch:AVX512"
   * AVX512VNNI_ADLER32, Support AVX512VNNI adler32, using "/arch:AVX512"
   * VPCLMUL_CRC, Support CRC hash generation using VPCLMULQDQ, using "  /arch:AVX512"
   * WITH_GZFILEOP, Compile with support for gzFile related functions
   * ZLIBNG_ENABLE_TESTS, Test zlib-ng specific API
   * WITH_SANITIZER, Enable sanitizer support
   * WITH_GTEST, Build gtest_zlib
   * WITH_OPTIM, Build with optimisation
   * WITH_NEW_STRATEGIES, Use new strategies
   * WITH_RUNTIME_CPU_DETECTION, Build with runtime CPU detection
   * WITH_AVX2, Build with AVX2
   * WITH_AVX512, Build with AVX512
   * WITH_AVX512VNNI, Build with AVX512 VNNI
   * WITH_SSE2, Build with SSE2
   * WITH_SSSE3, Build with SSSE3
   * WITH_SSE42, Build with SSE42
   * WITH_PCLMULQDQ, Build with PCLMULQDQ
   * WITH_VPCLMULQDQ, Build with VPCLMULQDQ

  -- The following features have been disabled:

   * ZLIB_SYMBOL_PREFIX, Publicly exported symbols DO NOT have a custom prefix
   * ZLIB_COMPAT, Compile with zlib compatible API
   * ZLIB_ENABLE_TESTS, Build test binaries
   * WITH_FUZZERS, Build test/fuzz
   * WITH_BENCHMARKS, Build test/benchmarks
   * WITH_BENCHMARK_APPS, Build application benchmarks
   * WITH_NATIVE_INSTRUCTIONS, Instruct the compiler to use the full instruction set on this host (gcc/clang -march=native)
   * WITH_MAINTAINER_WARNINGS, Build with project maintainer warnings
   * WITH_CODE_COVERAGE, Enable code coverage reporting
   * WITH_INFLATE_STRICT, Build with strict inflate distance checking
   * WITH_INFLATE_ALLOW_INVALID_DIST, Build with zero fill for inflate invalid distances
   * INSTALL_UTILS, Copy minigzip and minideflate during install

  -- Configuring done (56.9s)
  -- Generating done (0.1s)
  -- Build files have been written to: C:/Users/shenjack.SHENJACK-5600X/AppData/Local/Temp/cargo-installxHs1ll/release/build/libz-ng-sys-20cfbbbe2e3f522b/out/build
  running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--parallel" "16"
  适用于 .NET Framework MSBuild 版本 17.11.9+a69bbaaf5

    1>Checking Build System
    Building Custom Rule D:/APPS/rust/cargo/registry/src/rsproxy.cn-0dccff568467c15b/libz-ng-sys-1.1.20/src/zlib-ng/CMakeLists.txt
    adler32_c.c
  D:\APPS\rust\cargo\registry\src\rsproxy.cn-0dccff568467c15b\libz-ng-sys-1.1.20\src\zlib-ng\zbuild.h(1,1): error C2220: 以下警告被视为错误 [C:\Users\shenjack.SHENJACK-5600X\AppData\Local\Temp\cargo-installxHs1ll\release\build\libz-ng-sys-20cfbbbe2e3f522b\out\build\zlib.vcxproj]
    (编译源文件“D:/APPS/rust/cargo/registry/src/rsproxy.cn-0dccff568467c15b/libz-ng-sys-1.1.20/src/zlib-ng/arch/generic/adler32_c.c”)

about a few hundred lines

    (编译源文件“gzread.c”)

  D:\APPS\rust\cargo\registry\src\rsproxy.cn-0dccff568467c15b\libz-ng-sys-1.1.20\src\zlib-ng\zbuild.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [C:\Users\shenjack.SHENJACK-5600X\AppData\Local\Temp\cargo-installxHs1ll\release\build\libz-ng-sys-20cfbbbe2e3f522b\out\build\zlib.vcxproj]
    (编译源文件“gzread.c”)

    gzwrite.c
  D:\APPS\rust\cargo\registry\src\rsproxy.cn-0dccff568467c15b\libz-ng-sys-1.1.20\src\zlib-ng\zbuild.h(1,1): error C2220: 以下警告被视为错误 [C:\Users\shenjack.SHENJACK-5600X\AppData\Local\Temp\cargo-installxHs1ll\release\build\libz-ng-sys-20cfbbbe2e3f522b\out\build\zlib.vcxproj]
    (编译源文件“D:/APPS/rust/cargo/registry/src/rsproxy.cn-0dccff568467c15b/libz-ng-sys-1.1.20/src/zlib-ng/gzwrite.c”)

  D:\APPS\rust\cargo\registry\src\rsproxy.cn-0dccff568467c15b\libz-ng-sys-1.1.20\src\zlib-ng\zbuild.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [C:\Users\shenjack.SHENJACK-5600X\AppData\Local\Temp\cargo-installxHs1ll\release\build\libz-ng-sys-20cfbbbe2e3f522b\out\build\zlib.vcxproj]
    (编译源文件“D:/APPS/rust/cargo/registry/src/rsproxy.cn-0dccff568467c15b/libz-ng-sys-1.1.20/src/zlib-ng/gzwrite.c”)

    正在生成代码...

  --- stderr
  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_ASM_FLAGS
      CMAKE_ASM_FLAGS_RELEASE
      CMAKE_BUILD_TYPE
      CMAKE_CXX_FLAGS
      CMAKE_CXX_FLAGS_RELEASE


  thread 'main' panicked at D:\APPS\rust\cargo\registry\src\rsproxy.cn-0dccff568467c15b\cmake-0.1.51\src/lib.rs:1100:5:

  command did not execute successfully, got: exit code: 1

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to compile `gitoxide v0.38.0`, intermediate artifacts can be found at `C:\Users\SHENJA~1.SHE\AppData\Local\Temp\cargo-installxHs1ll`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Windows 10 build with MSVC and CMake, then inspect src/zlib-ng/CMakeLists.txt and zbuild.h in libz-ng-sys 1.1.20. Focus on the reported C4819 warning being treated as an error during the install target. Done means the libz-ng-sys build completes successfully in this environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, rust
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.