Skip to content

wasm-pack build error #11

Closed
Closed
@ilp64

Description

@ilp64

Hi.

I got following error when running wasm-pack build --scope xxx . Could you please give me some tips?

......
cargo:warning=In file included from vendor/jcmainct.c:17:
cargo:warning=In file included from /Users/ma/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/mozjpeg-sys-0.10.5/vendor/jinclude.h:42:
cargo:warning=In file included from /usr/include/stdlib.h:66:
cargo:warning=In file included from /usr/include/sys/wait.h:109:
cargo:warning=In file included from /usr/include/sys/signal.h:150:
cargo:warning=In file included from /usr/include/sys/_types/_sigaltstack.h:40:
cargo:warning=/usr/include/machine/types.h:37:2: error: architecture not supported
cargo:warning=#error architecture not supported
cargo:warning= ^
cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
cargo:warning=20 errors generated.
exit code: 1
cargo:warning=20 errors generated.
exit code: 1
cargo:warning=20 errors generated.
exit code: 1

--- stderr


error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "/Users/ma/CLionProjects/jpegcompressor/target/wasm32-unknown-unknown/release/build/mozjpeg-sys-d9ed3fe7b39facb5/out/include" "-I" "/Users/ma/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/mozjpeg-sys-0.10.5/vendor" "-o" "/Users/ma/CLionProjects/jpegcompressor/target/wasm32-unknown-unknown/release/build/mozjpeg-sys-d9ed3fe7b39facb5/out/vendor/jcapimin.o" "-c" "vendor/jcapimin.c" with args "clang" did not execute successfully (status code exit code: 1).



Error: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit code: 101
  full command: "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"

system infomation

macOS Catalina 10.15.4

clang infomation

Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin19.4.0
Thread model: posi

rustc infomation

rustc 1.43.1 (8d69840ab 2020-05-04)

Cargo.toml

[package]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = "0.2.64"
mozjpeg = { version = "0.8.19", default-features = false }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions