You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to build with ./cargo-zng build on Windows fails:
ek@Glub MINGW64 ~/source/repos/libz-sys (main)
$ ./cargo-zng build
tar: src\\zlib\adler32.c: Cannot stat: No such file or directory
tar: src\\zlib\trees.c: Cannot stat: No such file or directory
tar: src\\zlib\trees.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\adler32.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\adler32_p.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\acle_intrins.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\adler32_neon.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\arm_features.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\arm_features.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\arm_functions.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\\chunkset_neon.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\\compare256_neon.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\\crc32_acle.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\neon_intrins.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\\slide_hash_armv6.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\arm\\slide_hash_neon.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\generic\adler32_c.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\generic\adler32_fold_c.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\generic\\chunk_permute_table.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\generic\\chunkset_c.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\generic\\compare256_c.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\generic\\crc32_braid_c.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\generic\\crc32_fold_c.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\generic\\generic_functions.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\generic\\slide_hash_c.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\adler32_power8.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\adler32_vmx.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\chunkset_power8.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\compare256_power9.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\crc32_constants.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\crc32_power8.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\fallback_builtins.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\power_features.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\power_features.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\power_functions.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\slide_hash_power8.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\slide_hash_vmx.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\power\\slide_ppc_tpl.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\riscv\adler32_rvv.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\riscv\\chunkset_rvv.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\riscv\\compare256_rvv.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\riscv\riscv_features.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\riscv\riscv_features.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\riscv\riscv_functions.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\riscv\\slide_hash_rvv.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\crc32-vx.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\dfltcc_common.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\dfltcc_deflate.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\dfltcc_deflate.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\dfltcc_detail.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\dfltcc_inflate.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\dfltcc_inflate.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\s390_features.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\s390_features.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\s390\\s390_functions.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\adler32_avx2.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\adler32_avx2_p.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\adler32_avx512.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\adler32_avx512_p.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\adler32_avx512_vnni.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\adler32_sse42.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\adler32_ssse3.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\adler32_ssse3_p.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\chunkset_avx2.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\chunkset_sse2.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\chunkset_ssse3.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\compare256_avx2.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\compare256_sse2.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\crc32_fold_pclmulqdq_tpl.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\crc32_fold_vpclmulqdq_tpl.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\crc32_pclmulqdq.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\crc32_pclmulqdq_tpl.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\crc32_vpclmulqdq.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\slide_hash_avx2.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\slide_hash_sse2.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\x86_features.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\x86_features.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\x86_functions.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch\\x86\\x86_intrins.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\arch_functions.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\fallback-macros.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-aarch64.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-arm.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-armhf.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-llvm-mingw-aarch64.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-llvm-mingw-armv7.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-llvm-mingw-i686.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-llvm-mingw-x86_64.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-mingw-i686.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-mingw-x86_64.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-mips.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-mips64.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-powerpc.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-powerpc64-clang.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-powerpc64-power9.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-powerpc64.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-powerpc64le-clang.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-powerpc64le-power9.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-powerpc64le.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-riscv.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-s390x.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\\cmake\toolchain-sparc64.cmake: Cannot stat: No such file or directory
tar: src\\zlib-ng\fallback_builtins.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\functable.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\functable.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\trees.c: Cannot stat: No such file or directory
tar: src\\zlib-ng\trees.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\trees_emit.h: Cannot stat: No such file or directory
tar: src\\zlib-ng\trees_tbl.h: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
Updating crates.io index
Locking 40 packages to latest compatible versions
Adding bitflags v1.3.2 (latest: v2.6.0)
Adding cfg-if v0.1.10 (latest: v1.0.0)
Adding dirs v2.0.2 (latest: v5.0.1)
Adding dirs-sys v0.3.7 (latest: v0.4.1)
Adding term v0.6.1 (latest: v1.0.0)
Adding wasi v0.11.0+wasi-snapshot-preview1 (latest: v0.13.2+wasi-0.2.1)
Compiling shlex v1.3.0
Compiling libc v0.2.158
Compiling cc v1.1.16
Compiling cmake v0.1.51
Compiling libz-ng-sys v1.1.16 (C:\Users\ek\AppData\Local\Temp\tmp.iaQuENuJLO)
error: failed to run custom build command for `libz-ng-sys v1.1.16 (C:\Users\ek\AppData\Local\Temp\tmp.iaQuENuJLO)`
Caused by:
process didn't exit successfully: `C:\Users\ek\AppData\Local\Temp\tmp.iaQuENuJLO\target\debug\build\libz-ng-sys-d3c602731d9baee3\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\\ek\\AppData\\Local\\Temp\\tmp.iaQuENuJLO\\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\\ek\\AppData\\Local\\Temp\\tmp.iaQuENuJLO\\target\\debug\\build\\libz-ng-sys-5e35a63173c56dd6\\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.30.3
-- ZLIB_HEADER_VERSION: 1.3.1
-- ZLIBNG_HEADER_VERSION: 2.2.1
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.41.34120.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/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 incomplete, errors occurred!
--- stderr
CMake Error at CMakeLists.txt:53 (include):
include could not find requested file:
cmake/fallback-macros.cmake
thread 'main' panicked at C:\Users\ek\.cargo\registry\src\index.crates.io-6f17d22bba15001f\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
I did this in Git Bash, which is an MSYS2-based environment, so that the script and the Unix utilities it uses would be available. But I expect that most ways of running it on Windows would produce this effect, since the problem arises from the treatment of backslashes in the output of cargo package -l. On Windows, cargo is a native Windows program that outputs paths with backslashes as separators.
If no paths will contain literal backslashes on any system, then it should be sufficient to unconditionally translate \ characters into \ by adding a tr step in the pipeline. This fixes the problem for me on Windows; those messages go away and the build succeeds. I'll try to see if breaks anything else and, if not, I'll open a PR. (The cargo-zng script does not appear to be tested on CI.)
Attempting to build with
./cargo-zng build
on Windows fails:I did this in Git Bash, which is an MSYS2-based environment, so that the script and the Unix utilities it uses would be available. But I expect that most ways of running it on Windows would produce this effect, since the problem arises from the treatment of backslashes in the output of
cargo package -l
. On Windows,cargo
is a native Windows program that outputs paths with backslashes as separators.If no paths will contain literal backslashes on any system, then it should be sufficient to unconditionally translate
\
characters into\
by adding atr
step in the pipeline. This fixes the problem for me on Windows; those messages go away and the build succeeds. I'll try to see if breaks anything else and, if not, I'll open a PR. (Thecargo-zng
script does not appear to be tested on CI.)Edit: It seems okay, and I've opened #213.
The text was updated successfully, but these errors were encountered: