2

我正在尝试安装游戏引擎sheep_cliAmethyst.rs我已经x86_64-8.1.0-posix-seh-rt_v6-rev0安装了 MinGW。也许目标是错误的?

error: failed to run custom build command for `cloudflare-zlib-sys v0.2.0`

Caused by:
  process didn't exit successfully: `C:\Users\user\AppData\Local\Temp\cargo-installMN5vHV\release\build\cloudflare-zlib-sys-eda63c9230465ae7\build-script-build` (exit code: 1)
--- stdout
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-pc-windows-gnu = None
CFLAGS_x86_64_pc_windows_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:include=C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cloudflare-zlib-sys-0.2.0\vendor
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-pc-windows-gnu = None
CFLAGS_x86_64_pc_windows_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
CFLAGS_x86_64-pc-windows-gnu = None
CFLAGS_x86_64_pc_windows_gnu = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "C:\\Users\\user\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\cloudflare-zlib-sys-0.2.0\\vendor" "-mpclmul" "-msse4.2" "-msse4.2" "-DHAVE_OFF64_T=1" "-D_LARGEFILE64_SOURCE=
1" "-DHAVE_UNISTD_H=1" "-DHAS_PCLMUL" "-DHAS_SSE42" "-DHAVE_HIDDEN=1" "-o" "C:\\Users\\user\\AppData\\Local\\Temp\\cargo-installMN5vHV\\release\\build\\cloudflare-zlib-sys-399f3ab9f80722f4\\out\\crc32-pclmul_asm.o" "-c" "C:\\Users\\user\\.cargo\\registry\\src\\gith
ub.com-1ecc6299db9ec823\\cloudflare-zlib-sys-0.2.0\\vendor\\contrib/amd64/crc32-pclmul_asm.S"
cargo:warning=C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cloudflare-zlib-sys-0.2.0\vendor\contrib/amd64/crc32-pclmul_asm.S: Assembler messages:
cargo:warning=C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cloudflare-zlib-sys-0.2.0\vendor\contrib/amd64/crc32-pclmul_asm.S:125: Error: unknown pseudo-op: `.hidden'
cargo:warning=C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cloudflare-zlib-sys-0.2.0\vendor\contrib/amd64/crc32-pclmul_asm.S:125: Warning: .type pseudo-op used outside of .def/.endef: ignored.
cargo:warning=C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cloudflare-zlib-sys-0.2.0\vendor\contrib/amd64/crc32-pclmul_asm.S:125: Error: junk at end of line, first unrecognized character is `c'
cargo:warning=C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cloudflare-zlib-sys-0.2.0\vendor\contrib/amd64/crc32-pclmul_asm.S:266: Warning: .size pseudo-op used outside of .def/.endef: ignored.
cargo:warning=C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cloudflare-zlib-sys-0.2.0\vendor\contrib/amd64/crc32-pclmul_asm.S:266: Error: junk at end of line, first unrecognized character is `c'
exit code: 1

--- stderr


error occurred: Command "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "C:\\Users\\user\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\cloudflare-zlib-sys-0.2.0\\vendor" "-mpclmul" "-msse4.2" "-msse4.2" "-DHAVE_OFF64_T=1" "-D_LARG
EFILE64_SOURCE=1" "-DHAVE_UNISTD_H=1" "-DHAS_PCLMUL" "-DHAS_SSE42" "-DHAVE_HIDDEN=1" "-o" "C:\\Users\\user\\AppData\\Local\\Temp\\cargo-installMN5vHV\\release\\build\\cloudflare-zlib-sys-399f3ab9f80722f4\\out\\crc32-pclmul_asm.o" "-c" "C:\\Users\\user\\.cargo\\regi
stry\\src\\github.com-1ecc6299db9ec823\\cloudflare-zlib-sys-0.2.0\\vendor\\contrib/amd64/crc32-pclmul_asm.S" with args "gcc.exe" did not execute successfully (status code exit code: 1).



warning: build failed, waiting for other jobs to finish...
error: failed to compile `sheep_cli v0.3.0`, intermediate artifacts can be found at `C:\Users\user\AppData\Local\Temp\cargo-installMN5vHV`

Caused by:
  build failed
4

1 回答 1

1

该板条箱有您在使用 Rust MinGW 工具链构建时显示的构建问题,但如果您使用 MSVC 工具链,它编译得很好,这需要Visual Studio C++ 构建工具(或最新版本的 Visual Studio)。

要安装最新的稳定 MSVC 工具链,请使用以下命令:

rustup toolchain install stable-msvc

然后,将其设置为所有 Rust 项目的默认工具链:

rustup default stable-msvc

有关 Rust 工具链的 MSVC 和 MinGW 风格的更多信息,您可以查看官方文档

更新:板条箱的 0.3.0 版cloudflare-zlib-sys修复了 Windows MinGW 构建,因此如果您使用的是该板条箱的最新版本,则不再需要此解决方法。

于 2020-10-23T12:23:34.260 回答