Giter VIP home page Giter VIP logo

Comments (4)

r-medina avatar r-medina commented on July 30, 2024

on inspecting this a lot more, it looks like https://github.com/rust-bitcoin/rust-secp256k1 doesn't have a wasm32-uknown-unknown target

in [~/src/github.com/rust-bitcoin/rust-secp256k1][master]
->% cargo build --target wasm32-unknown-unknown
   Compiling secp256k1-sys v0.4.2 (/Users/ricky/src/github.com/rust-bitcoin/rust-secp256k1/secp256k1-sys)
The following warnings were emitted during compilation:

warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-unknown"'
warning: 1 error generated.

error: failed to run custom build command for `secp256k1-sys v0.4.2 (/Users/ricky/src/github.com/rust-bitcoin/rust-secp256k1/secp256k1-sys)`

Caused by:
  process didn't exit successfully: `/Users/ricky/src/github.com/rust-bitcoin/rust-secp256k1/target/debug/build/secp256k1-sys-863ff8230fa81c6a/build-script-build` (exit status: 1)
  --- stdout
  TARGET = Some("wasm32-unknown-unknown")
  OPT_LEVEL = Some("0")
  HOST = Some("aarch64-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("true")
  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
  running: "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/rust-bitcoin/rust-secp256k1/target/wasm32-unknown-unknown/debug/build/secp256k1-sys-6e7627796444507b/out/depend/secp256k1/contrib/lax_der_parsing.o" "-c" "depend/secp256k1/contrib/lax_der_parsing.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" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=wasm32-unknown-unknown" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm-sysroot" "-Wall" "-Wextra" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DUSE_NUM_NONE=1" "-DUSE_FIELD_INV_BUILTIN=1" "-DUSE_SCALAR_INV_BUILTIN=1" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-o" "/Users/ricky/src/github.com/rust-bitcoin/rust-secp256k1/target/wasm32-unknown-unknown/debug/build/secp256k1-sys-6e7627796444507b/out/depend/secp256k1/contrib/lax_der_parsing.o" "-c" "depend/secp256k1/contrib/lax_der_parsing.c" with args "clang" did not execute successfully (status code exit status: 1).

but it builds fine with default target of aarch64-apple-darwin

from interbtc.

r-medina avatar r-medina commented on July 30, 2024

seemed to make progress by avoiding clang altogether

->% CC="zig cc" cargo check -p interlay-runtime-parachain
   Compiling interlay-runtime-parachain v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/parachain/runtime/interlay)
error: failed to run custom build command for `interlay-runtime-parachain v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/parachain/runtime/interlay)`

Caused by:
  process didn't exit successfully: `/Users/ricky/src/github.com/interlay/interbtc/target/debug/build/interlay-runtime-parachain-f464557f4f6fbb55/build-script-build` (exit status: 1)
  --- stdout
  Information that should be included in a bug report.
  Executing build command: "/Users/ricky/.rustup/toolchains/nightly-2022-02-08-aarch64-apple-darwin/bin/cargo" "rustc" "--target=wasm32-unknown-unknown" "--manifest-path=/Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/Cargo.toml" "--color=always" "--release"
  Using rustc version: rustc 1.60.0-nightly (734368a20 2022-02-07)


  --- stderr
     Compiling interbtc-primitives v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/primitives)
     Compiling pallet-scheduler v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
     Compiling pallet-utility v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
     Compiling pallet-sudo v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
     Compiling pallet-membership v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
     Compiling pallet-multisig v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
     Compiling pallet-collective v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
     Compiling democracy v1.2.0 (/Users/ricky/src/github.com/interlay/interbtc/crates/democracy)
     Compiling pallet-society v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.16#4aeb95f7)
     Compiling orml-tokens v0.4.1-dev (https://github.com/open-web3-stack/open-runtime-module-library?rev=63b32194e7b9aff6a6350d2d4434525de4eec7c1#63b32194)
  error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `panic_impl`.
    |
    = note: the lang item is first defined in crate `std` (which `secp256k1` depends on)
    = note: first definition in `std` loaded from /Users/ricky/.rustup/toolchains/nightly-2022-02-08-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-915a200461e5579a.rlib
    = note: second definition in `sp_io` loaded from /Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/deps/libsp_io-b32b37203fd09159.rmeta

  error: duplicate lang item in crate `sp_io` (which `sp_application_crypto` depends on): `oom`.
    |
    = note: the lang item is first defined in crate `std` (which `secp256k1` depends on)
    = note: first definition in `std` loaded from /Users/ricky/.rustup/toolchains/nightly-2022-02-08-aarch64-apple-darwin/lib/rustlib/wasm32-unknown-unknown/lib/libstd-915a200461e5579a.rlib
    = note: second definition in `sp_io` loaded from /Users/ricky/src/github.com/interlay/interbtc/target/debug/wbuild/interlay-runtime-parachain/target/wasm32-unknown-unknown/release/deps/libsp_io-b32b37203fd09159.rmeta

     Compiling cumulus-primitives-core v0.1.0 (https://github.com/paritytech/cumulus?branch=polkadot-v0.9.16#86f76c56)
  error: could not compile `interbtc-primitives` due to 2 previous errors
  warning: build failed, waiting for other jobs to finish...
  error: build failed

from interbtc.

r-medina avatar r-medina commented on July 30, 2024

draft PR of getting it to build

#506

from interbtc.

r-medina avatar r-medina commented on July 30, 2024

for some reason it might be working on master again - going to close

from interbtc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.