-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
secp256k1-sys v0.9.0 does not support wasm32-unknown-unknown, how to fix this problem? #667
Comments
We build |
I get similiar issues, am able to compile with wasm-pack but I can't use it for basic things like running
|
Could #663 be backported? |
Looks like we don't need to backport, we could just do a 0.9.1 release. #663 is the only change since 0.9.0 which affects secp256k1-sys. @tcharding could you do that? If I do it I need to wait for somebody else to ACK it. |
Can do, no sweat. |
In my app, I try to compile rust-bitcoin to wasm32, when I execute "cargo build --target wasm32-unknown-unknown --release", the following error happens, it looks like secp256k1-sys v0.9.0 does not support wasm32-unknown-unknown。
How to fix this problem?
failed to run custom build command for
secp256k1-sys v0.9.0
Caused by:
process didn't exit successfully:
/Users/xx/Code/github.com/oasisprotocol/examples/ecdsa-sign/target/release/build/secp256k1-sys-23a86f4ecd821b98/build-script-build
(exit status: 1)--- stdout
TARGET = Some("wasm32-unknown-unknown")
OPT_LEVEL = Some("3")
HOST = Some("aarch64-apple-darwin")
cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
CC_wasm32-unknown-unknown = None
cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
CC_wasm32_unknown_unknown = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
CFLAGS_wasm32-unknown-unknown = None
cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
CFLAGS_wasm32_unknown_unknown = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CC_wasm32-unknown-unknown
CC_wasm32-unknown-unknown = None
cargo:rerun-if-env-changed=CC_wasm32_unknown_unknown
CC_wasm32_unknown_unknown = None
cargo:rerun-if-env-changed=TARGET_CC
TARGET_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
cargo:rerun-if-env-changed=CFLAGS_wasm32-unknown-unknown
CFLAGS_wasm32-unknown-unknown = None
cargo:rerun-if-env-changed=CFLAGS_wasm32_unknown_unknown
CFLAGS_wasm32_unknown_unknown = None
cargo:rerun-if-env-changed=TARGET_CFLAGS
TARGET_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DENABLE_MODULE_ELLSWIFT=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/Users/xxx/Code/github.com/oasisprotocol/examples/ecdsa-sign/target/wasm32-unknown-unknown/release/build/secp256k1-sys-4b34e21c2f7ea071/out/wasm/wasm.o" "-c" "wasm/wasm.c"
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
cargo:warning=1 error generated.
exit status: 1
running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DENABLE_MODULE_ELLSWIFT=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/Users/xxx/Code/github.com/oasisprotocol/examples/ecdsa-sign/target/wasm32-unknown-unknown/release/build/secp256k1-sys-4b34e21c2f7ea071/out/wasm/wasm.o" "-c" "wasm/wasm.c"
cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
cargo:warning=1 error generated.
exit status: 1
--- stderr
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DENABLE_MODULE_ELLSWIFT=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/Users/xxx/Code/github.com/oasisprotocol/examples/ecdsa-sign/target/wasm32-unknown-unknown/release/build/secp256k1-sys-4b34e21c2f7ea071/out/wasm/wasm.o" "-c" "wasm/wasm.c" with args "clang" did not execute successfully (status code exit status: 1).
error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DENABLE_MODULE_ELLSWIFT=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/Users/xxx/Code/github.com/oasisprotocol/examples/ecdsa-sign/target/wasm32-unknown-unknown/release/build/secp256k1-sys-4b34e21c2f7ea071/out/wasm/wasm.o" "-c" "wasm/wasm.c" with args "clang" did not execute successfully (status code exit status: 1).
The text was updated successfully, but these errors were encountered: