Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libz-ng-sys v1.1.20 Build error on Windows10 #228

Closed
Joezeo opened this issue Nov 8, 2024 · 1 comment
Closed

libz-ng-sys v1.1.20 Build error on Windows10 #228

Joezeo opened this issue Nov 8, 2024 · 1 comment

Comments

@Joezeo
Copy link

Joezeo commented Nov 8, 2024

I used cargo update to update the project dependencies, and the libz-ng-sys version was upgraded from 1.1.16 to 1.1.20. After that, the following build error occurred. Reverting to version 1.1.16 makes the build process work normally.

Error info 2024-11-08T16:55:07.1961291+08:00 ERROR Flycheck failed to run the following command: CommandHandle { program: "C:\\Users\\user\\.cargo\\bin\\cargo.exe", arguments: ["check", "--workspace", "--message-format=json-diagnostic-rendered-ansi", "--manifest-path", "D:\\workspace\\project\\termio\\Cargo.toml", "--keep-going", "--all-targets"], current_dir: Some("D:\\workspace\\project\\termio") }, error=Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(101))): warning: `C:\Users\user\.cargo\config` is deprecated in favor of `config.toml` note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml` Compiling libz-ng-sys v1.1.20 error: failed to run custom build command for `libz-ng-sys v1.1.20`

Caused by:
process didn't exit successfully: D:\workspace\project\termio\target\debug\build\libz-ng-sys-58b6229362f2a8de\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" "C:\Users\user\.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\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=D:\workspace\project\termio\target\debug\build\libz-ng-sys-82a53b6d42830301\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"
-- Using CMake version 3.24.2
-- ZLIB_HEADER_VERSION: 1.3.1
-- ZLIBNG_HEADER_VERSION: 2.2.2
-- Selecting Windows SDK version 10.0.25206.0 to target Windows 10.0.19045.
-- Arch detected: 'x86_64'
-- Basearch of 'x86_64' has been detected as: 'x86'
-- 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
-- Generating done
-- Build files have been written to: D:/workspace/project/termio/target/debug/build/libz-ng-sys-82a53b6d42830301/out/build
running: "cmake" "--build" "." "--target" "install" "--config" "Debug" "--parallel" "12"
适用于 .NET Framework MSBuild 版本 17.11.9+a69bbaaf5

adler32_c.c

C:\Users\user.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\libz-ng-sys-1.1.20\src\zlib-ng\zbuild.h(1,1): error C2220: 以下警告被视为错误 [D:\workspace\project\termio\target\debug\build\libz-ng-sys-82a53b6d42830301\out\build\zlib.vcxproj]
(编译源文件“C:/Users/user/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/libz-ng-sys-1.1.20/src/zlib-ng/arch/generic/adler32_c.c”)

......

C:\Users\user.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\libz-ng-sys-1.1.20\src\zlib-ng\zbuild.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 [D:\workspace\project\termio\target\debug\build\libz-ng-sys-82a53b6d42830301\out\build\zlib.vcxproj]
(编译源文件“C:/Users/user/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/libz-ng-sys-1.1.20/src/zlib-ng/gzwrite.c”)

正在生成代码...

--- stderr
thread 'main' panicked at C:\Users\user.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\cmake-0.1.51\src/lib.rs:1100:5:

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

build script failed, must exit now
stack backtrace:
0: 0x7ff67355aabd - std::backtrace_rs::backtrace::dbghelp64::trace
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src....\backtrace\src\backtrace\dbghelp64.rs:91
1: 0x7ff67355aabd - std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src....\backtrace\src\backtrace\mod.rs:66
2: 0x7ff67355aabd - std::sys_common::backtrace::_print_fmt
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\sys_common\backtrace.rs:68
3: 0x7ff67355aabd - std::sys_common::backtrace::_print::impl$0::fmt
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\sys_common\backtrace.rs:44
4: 0x7ff673576ae9 - core::fmt::rt::Argument::fmt
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\core\src\fmt\rt.rs:165
5: 0x7ff673576ae9 - core::fmt::write
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\core\src\fmt\mod.rs:1168
6: 0x7ff6735565d1 - std::io::Write::write_fmtstd::sys::pal::windows::stdio::Stderr
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\io\mod.rs:1835
7: 0x7ff67355a896 - std::sys_common::backtrace::print
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\sys_common\backtrace.rs:34
8: 0x7ff67355ccd8 - std::panicking::default_hook::closure$1
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\panicking.rs:265
9: 0x7ff67355c989 - std::panicking::default_hook
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\panicking.rs:292
10: 0x7ff67355d30e - std::panicking::rust_panic_with_hook
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\panicking.rs:793
11: 0x7ff67355d156 - std::panicking::begin_panic_handler::closure$0
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\panicking.rs:667
12: 0x7ff67355b42f - std::sys_common::backtrace::__rust_end_short_backtracestd::panicking::begin_panic_handler::closure_env$0,never$
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\sys_common\backtrace.rs:171
13: 0x7ff67355cd76 - std::panicking::begin_panic_handler
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\panicking.rs:658
14: 0x7ff67357cc64 - core::panicking::panic_fmt
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\core\src\panicking.rs:74
15: 0x7ff6734b0766 - cmake::fail
at C:\Users\user.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\cmake-0.1.51\src\lib.rs:1100
16: 0x7ff6734affb3 - cmake::run
at C:\Users\user.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\cmake-0.1.51\src\lib.rs:1078
17: 0x7ff6734ac4f8 - cmake::Config::build
at C:\Users\user.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\cmake-0.1.51\src\lib.rs:874
18: 0x7ff6734a37ba - build_script_cmake::build_zlib_ng
at C:\Users\user.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\libz-ng-sys-1.1.20\zng\cmake.rs:42
19: 0x7ff6734a42a0 - build_script_cmake::main
at C:\Users\user.cargo\registry\src\mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd\libz-ng-sys-1.1.20\zng\cmake.rs:80
20: 0x7ff6734a137b - core::ops::function::FnOnce::call_once<void ()(),tuple$<> >
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5\library\core\src\ops\function.rs:250
21: 0x7ff6734a100e - core::hint::black_box
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5\library\core\src\hint.rs:338
22: 0x7ff6734a100e - std::sys_common::backtrace::__rust_begin_short_backtrace<void (
)(),tuple$<> >
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5\library\std\src\sys_common\backtrace.rs:155
23: 0x7ff6734a1181 - std::rt::lang_start::closure$0<tuple$<> >
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5\library\std\src\rt.rs:159
24: 0x7ff6735525fe - std::rt::lang_start_internal
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5/library\std\src\rt.rs:141
25: 0x7ff6734a115a - std::rt::lang_start<tuple$<> >
at /rustc/f1586001ace26df7cafeb6534eaf76fb2c5513e5\library\std\src\rt.rs:158
26: 0x7ff6734a4329 - main
27: 0x7ff67357aec8 - invoke_main
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
28: 0x7ff67357aec8 - __scrt_common_main_seh
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
29: 0x7ffbc1897374 - BaseThreadInitThunk
30: 0x7ffbc2c9cc91 - RtlUserThreadStart

@Byron Byron added the duplicate label Nov 8, 2024
@Byron
Copy link
Member

Byron commented Nov 8, 2024

I think this is a duplicate of #225. If there is anything special about your case, please feel free to leave a comment there as well.
Thank you.

@Byron Byron closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants