Repository navigation
wasm-pack build fail #32
Description
error: failed to run custom build command for imagequant-sys v2.12.5
process didn't exit successfully: /Users/huangwutao/work/wx/rust/compress/target/release/build/imagequant-sys-819a3a811686dc69/build-script-build (exit code: 1)
--- stdout
OPT_LEVEL = Some("s")
TARGET = Some("wasm32-unknown-unknown")
HOST = Some("x86_64-apple-darwin")
CC_wasm32-unknown-unknown = None
CC_wasm32_unknown_unknown = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-unknown = None
CFLAGS_wasm32_unknown_unknown = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
cargo:include=/Users/huangwutao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/imagequant-sys-2.12.5
running: "clang" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-std=c99" "-DNDEBUG=1" "-o" "/Users/huangwutao/work/wx/rust/compress/target/wasm32-unknown-unknown/release/build/imagequant-sys-6f6e8e655a58e3b1/out/libimagequant.o" "-c" "libimagequant.c"
cargo:warning=libimagequant.c:9:10: fatal error: 'stdio.h' file not found
cargo:warning=#include <stdio.h>
cargo:warning= ^~~~~~~~~
cargo:warning=1 error generated.
exit code: 1
--- stderr
error occurred: Command "clang" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-std=c99" "-DNDEBUG=1" "-o" "/Users/huangwutao/work/wx/rust/compress/target/wasm32-unknown-unknown/release/build/imagequant-sys-6f6e8e655a58e3b1/out/libimagequant.o" "-c" "libimagequant.c" with args "clang" did not execute successfully (status code exit code: 1).
warning: build failed, waiting for other jobs to finish...
error[E0721]: await is a keyword in the 2018 edition
--> /Users/huangwutao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/wasm-bindgen-backend-0.2.55/src/codegen.rs:454:79
|
454 | wasm_bindgen::__rt::IntoJsResult::into_js_result(#ret.await)
| ^^^^^ help: you can use a raw identifier to stay compatible: r#await
error: aborting due to previous error
For more information about this error, try rustc --explain E0721.
error: Could not compile wasm-bindgen-backend.
Activity
kornelski commentedon Dec 16, 2019
This means either your Rust is too old (run
rustup update), or you haven't addededition = "2018"to allCargo.tomlfiles.kornelski commentedon Dec 16, 2019
As for
fatal error: 'stdio.h' file not found- maybe you need to install llvm or clang with WASM support? It may also be the case that you need newer versions.Taoja commentedon Dec 16, 2019
ok,i will update my rust first, thx
Taoja commentedon Dec 19, 2019
@kornelski
i solution the problem about clang support.
but i got alots of
unknown type nameerror like this:error: failed to run custom build command forimagequant-sys v2.12.5`Caused by:
process didn't exit successfully:
/Users/huangwutao/work/wx/rust/compress/target/release/build/imagequant-sys-34adba6d4e6d8a33/build-script-build(exit code: 1)--- stdout
OPT_LEVEL = Some("s")
TARGET = Some("wasm32-unknown-unknown")
HOST = Some("x86_64-apple-darwin")
CC_wasm32-unknown-unknown = None
CC_wasm32_unknown_unknown = None
TARGET_CC = None
CC = None
CFLAGS_wasm32-unknown-unknown = None
CFLAGS_wasm32_unknown_unknown = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
cargo:include=/Users/huangwutao/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/imagequant-sys-2.12.5
running: "clang" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-std=c99" "-DNDEBUG=1" "-o" "/Users/huangwutao/work/wx/rust/compress/target/wasm32-unknown-unknown/release/build/imagequant-sys-bc036356db92ca34/out/libimagequant.o" "-c" "libimagequant.c"
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:68:
cargo:warning=/usr/include/sys/cdefs.h:784:2: error: Unsupported architecture
cargo:warning=#error Unsupported architecture
cargo:warning= ^
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:71:
cargo:warning=In file included from /usr/include/_types.h:27:
cargo:warning=In file included from /usr/include/sys/_types.h:33:
cargo:warning=/usr/include/machine/_types.h:34:2: error: architecture not supported
cargo:warning=#error architecture not supported
cargo:warning= ^
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:71:
cargo:warning=In file included from /usr/include/_types.h:27:
cargo:warning=/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
cargo:warning=typedef __int64_t __darwin_blkcnt_t; /* total blocks /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t __darwin_blksize_t; / preferred block size /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t __darwin_dev_t; / dev_t /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_gid_t; / [???] process and group IDs /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_id_t; / [XSI] pid_t, uid_t, or gid_t*/
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
cargo:warning=typedef __darwin_natural_t __darwin_mach_port_name_t; / Used by mach /
cargo:warning= ^
cargo:warning=/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint16_t __darwin_mode_t; / [???] Some file attributes /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
cargo:warning=typedef __int64_t __darwin_off_t; / [???] Used for file sizes /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t __darwin_pid_t; / [???] process and group IDs /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_sigset_t; / [???] signal set /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t __darwin_suseconds_t; / [???] microseconds /
cargo:warning= ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_uid_t; / [???] user IDs /
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t __darwin_useconds_t; / [???] microseconds */
cargo:warning= ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:75:
cargo:warning=In file included from /usr/include/sys/_types/_va_list.h:31:
cargo:warning=/usr/include/machine/types.h:37:2: error: architecture not supported
cargo:warning=#error architecture not supported
cargo:warning= ^
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:75:
cargo:warning=/usr/include/sys/_types/_va_list.h:32:9: error: unknown type name '__darwin_va_list'
cargo:warning=typedef __darwin_va_list va_list;
cargo:warning= ^
cargo:warning=In file included from libimagequant.c:9:
cargo:warning=In file included from /usr/include/stdio.h:64:
cargo:warning=In file included from /usr/include/_stdio.h:76:
cargo:warning=/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name '__darwin_size_t'
cargo:warning=typedef __darwin_size_t size_t;
cargo:warning= ^
cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
cargo:warning=20 errors generated.
exit code: 1
--- stderr
error occurred: Command "clang" "-Os" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-std=c99" "-DNDEBUG=1" "-o" "/Users/huangwutao/work/wx/rust/compress/target/wasm32-unknown-unknown/release/build/imagequant-sys-bc036356db92ca34/out/libimagequant.o" "-c" "libimagequant.c" with args "clang" did not execute successfully (status code exit code: 1).`