Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
生成cloudflare-zlib-sys.rs时gcc.exe失败_Gcc_Rust_Zlib_Mingw W64_Amethyst - Fatal编程技术网

生成cloudflare-zlib-sys.rs时gcc.exe失败

生成cloudflare-zlib-sys.rs时gcc.exe失败,gcc,rust,zlib,mingw-w64,amethyst,Gcc,Rust,Zlib,Mingw W64,Amethyst,我正在尝试为Amethyst.rs游戏引擎安装sheep\u cli。 我已经安装了x86\u 64-8.1.0-posix-seh-rt\u v6-rev0MinGW。也许目标错了 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\c

我正在尝试为
Amethyst.rs
游戏引擎安装
sheep\u cli
。 我已经安装了
x86\u 64-8.1.0-posix-seh-rt\u 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

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

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

rustup工具链安装稳定的msvc
然后,将其设置为所有Rust项目的默认工具链:

rustup默认稳定msvc
有关Rust工具链的MSVC和MinGW风格的更多信息,您可以查看


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

通过linux迁移解决了此问题。