我在尝试在我的机器上安装 rust-wasm 时遇到错误,它可能与 相关gcc
,是否有其他人遇到此问题,还是只有我一个人遇到此问题?我尝试在其他地方搜索它,但找不到任何东西!
The following warnings were emitted during compilation:
warning: bzip2-1.0.8/blocksort.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
warning:
warning:
error: failed to run custom build command for `bzip2-sys v0.1.11+1.0.8`
Caused by:
process didn't exit successfully: `C:\Users\My Name\AppData\Local\Temp\cargo-installvhphOY\release\build\bzip2-sys-d16923996b9f6c2a\build-script-build` (exit code: 1)
--- stdout
TARGET = Some("x86_64-pc-windows-gnu")
OPT_LEVEL = Some("3")
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")
running: "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-I" "bzip2-1.0.8" "-D_WIN32" "-DBZ_EXPORT" "-D_FILE_OFFSET_BITS=64" "-DBZ_NO_STDIO" "-o" "C:\\Users\\My Name\\AppData\\Local\\Temp\\cargo-installvhphOY\\release\\build\\bzip2-sys-6cdbad4f0a3b6446\\out\\lib\\bzip2-1.0.8/blocksort.o" "-c" "bzip2-1.0.8/blocksort.c"
cargo:warning=bzip2-1.0.8/blocksort.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
cargo:warning=
cargo:warning=
exit code: 1
--- stderr
error occurred: Command "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-I" "bzip2-1.0.8" "-D_WIN32" "-DBZ_EXPORT" "-D_FILE_OFFSET_BITS=64" "-DBZ_NO_STDIO" "-o" "C:\\Users\\My Name\\AppData\\Local\\Temp\\cargo-installvhphOY\\release\\build\\bzip2-sys-6cdbad4f0a3b6446\\out\\lib\\bzip2-1.0.8/blocksort.o" "-c" "bzip2-1.0.8/blocksort.c" with args "gcc.exe" did not execute successfully (status code exit code: 1).
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:
warning: src/zlib/adler32.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
warning: /* adler32.c -- compute the Adler-32 checksum of a data stream
warning:
error: failed to compile `wasm-pack v0.10.2`, intermediate artifacts can be found at `C:\Users\My Name\AppData\Local\Temp\cargo-installvhphOY`
Caused by:
build failed
罪魁祸首?
我知道这个问题与我的环境有关,我认为这gcc
是罪魁祸首。根据日志,发生错误的部分在这里:
error occurred: Command "gcc.exe" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-I" "bzip2-1.0.8" "-D_WIN32" "-
DBZ_EXPORT" "-D_FILE_OFFSET_BITS=64" "-DBZ_NO_STDIO" "-o" "C:\\Users\\My Name\\AppData\\Local\\Temp\\cargo-installvhphOY\\release\\build\\bzip2-sys-6cdbad4f0a3b6446\\out\\lib\\bzip2-1.0.8/blocksort.o" "-c" "bzip2-1.0.8/blocksort.c" with
args "gcc.exe" did not execute successfully (status code exit code: 1).
TL;博士
我遇到了库bzip2-sys v0.1.11+1.0.8
试图构建的错误(可能与 GCC 相关)。
wasm-pack 版本:v0.10.2
rustc 版本:v1.56.1
gcc 版本:v6.3.0