paritytech / paritytech/subxt

`subxt-signer` with feature "ecdsa" does not compile to `no-std` right now.

Open
#1,478 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
489
Forks
293
Avg merge
18h 35m
Merged PRs (30d)
3

Description

If the ecdsa features is enabled in subxt-signer which pulls in the secp256k1 crate, there is some C source code that does not want to compile via cargo build --target thumbv7em-none-eabi


error: failed to run custom build command for `secp256k1-sys v0.9.2`

Caused by:
  process didn't exit successfully: `/home/tadeo/code/subxt/testing/no-std-tests/target/debug/build/secp256k1-sys-6ae4a38afd356447/build-script-build` (exit status: 1)
  --- stdout
  TARGET = Some("thumbv7em-none-eabi")
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-unknown-linux-gnu")
  cargo:rerun-if-env-changed=CC_thumbv7em-none-eabi
  CC_thumbv7em-none-eabi = None
  cargo:rerun-if-env-changed=CC_thumbv7em_none_eabi
  CC_thumbv7em_none_eabi = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  RUSTC_LINKER = None
  cargo:rerun-if-env-changed=CROSS_COMPILE
  CROSS_COMPILE = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=Compiler version doesn't include clang or GCC: "arm-none-eabi-gcc" "--version"
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("dsp,mclass,thumb-mode,thumb2,v5te,v6,v6k,v6t2,v7")
  cargo:rerun-if-env-changed=CFLAGS_thumbv7em-none-eabi
  CFLAGS_thumbv7em-none-eabi = None
  cargo:rerun-if-env-changed=CFLAGS_thumbv7em_none_eabi
  CFLAGS_thumbv7em_none_eabi = 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_thumbv7em-none-eabi
  CC_thumbv7em-none-eabi = None
  cargo:rerun-if-env-changed=CC_thumbv7em_none_eabi
  CC_thumbv7em_none_eabi = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  RUSTC_LINKER = None
  cargo:rerun-if-env-changed=CROSS_COMPILE
  CROSS_COMPILE = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=Compiler version doesn't include clang or GCC: "arm-none-eabi-gcc" "--version"
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("dsp,mclass,thumb-mode,thumb2,v5te,v6,v6k,v6t2,v7")
  cargo:rerun-if-env-changed=CFLAGS_thumbv7em-none-eabi
  CFLAGS_thumbv7em-none-eabi = None
  cargo:rerun-if-env-changed=CFLAGS_thumbv7em_none_eabi
  CFLAGS_thumbv7em_none_eabi = 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_thumbv7em-none-eabi
  CC_thumbv7em-none-eabi = None
  cargo:rerun-if-env-changed=CC_thumbv7em_none_eabi
  CC_thumbv7em_none_eabi = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  RUSTC_LINKER = None
  cargo:rerun-if-env-changed=CROSS_COMPILE
  CROSS_COMPILE = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:warning=Compiler version doesn't include clang or GCC: "arm-none-eabi-gcc" "--version"
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("dsp,mclass,thumb-mode,thumb2,v5te,v6,v6k,v6t2,v7")
  cargo:rerun-if-env-changed=CFLAGS_thumbv7em-none-eabi
  CFLAGS_thumbv7em-none-eabi = None
  cargo:rerun-if-env-changed=CFLAGS_thumbv7em_none_eabi
  CFLAGS_thumbv7em_none_eabi = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:warning=depend/secp256k1/contrib/lax_der_parsing.c:7:10: fatal error: string.h: No such file or directory
  cargo:warning=    7 | #include <string.h>
  cargo:warning=      |          ^~~~~~~~~~
  cargo:warning=compilation terminated.
  cargo:warning=In file included from depend/secp256k1/src/util.h:13,
  cargo:warning=                 from depend/secp256k1/src/field.h:10,
  cargo:warning=                 from depend/secp256k1/src/group.h:10,
  cargo:warning=                 from depend/secp256k1/src/precomputed_ecmult_gen.c:3:
  cargo:warning=/usr/lib/gcc/arm-none-eabi/13.2.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
  cargo:warning=    9 | # include_next <stdint.h>
  cargo:warning=      |                ^~~~~~~~~~
  cargo:warning=compilation terminated.

  --- stderr


  error occurred: Command "arm-none-eabi-gcc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-fno-omit-frame-pointer" "-mthumb" "-march=armv7e-m" "-I" "depend/secp256k1/" "-I" "depend/secp256k1/include" "-I" "depend/secp256k1/src" "-I" "wasm/wasm-sysroot" "-Wall" "-Wextra" "-Wno-unused-function" "-Wno-unused-parameter" "-DSECP256K1_API=" "-DENABLE_MODULE_ECDH=1" "-DENABLE_MODULE_SCHNORRSIG=1" "-DENABLE_MODULE_EXTRAKEYS=1" "-DENABLE_MODULE_ELLSWIFT=1" "-Dprintf(...)=" "-DECMULT_GEN_PREC_BITS=4" "-DECMULT_WINDOW_SIZE=15" "-DUSE_EXTERNAL_DEFAULT_CALLBACKS=1" "-DENABLE_MODULE_RECOVERY=1" "-o" "/home/tadeo/code/subxt/testing/no-std-tests/target/thumbv7em-none-eabi/debug/build/secp256k1-sys-74715f18bcbdb71a/out/c928380082b86401-precomputed_ecmult_gen.o" "-c" "depend/secp256k1/src/precomputed_ecmult_gen.c" with args "arm-none-eabi-gcc" did not execute successfully (status code exit status: 1).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in testing/no-std-tests and reproduce the issue with cargo build --target thumbv7em-none-eabi while enabling subxt-signer's ecdsa feature. Inspect the secp256k1-sys build output and dependency path shown in the failure. Done means the no-std target builds successfully with ecdsa enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.