Skip to content

Compilation fails when PVQ program references polkadot-sdk dependency #73

@mise42

Description

@mise42

Some data structures' definitions utilized in PVQ programs may originate from external dependencies. For instance, AssetId can be an XCM Location, whose definition resides in the external dependency polkadot-sdk/staging-xcm. However, compilation fails when specifying the build target ../vendor/polkavm/crates/polkavm-linker/riscv32emac-unknown-none-polkavm.json.

 cargo:warning=depend/secp256k1/contrib/lax_der_parsing.c:7:10: fatal error: 'string.h' file not found
  cargo:warning=    7 | #include <string.h>
  cargo:warning=      |          ^~~~~~~~~~
  cargo:warning=1 error generated.
  cargo:warning=error: unable to create target: 'No available targets are compatible with triple "riscv32-unknown-none-polkavm"'
  cargo:warning=1 error generated.

Current workaround: Introducing an opaque data structure for direct args passing.
Future work: Investigate the root cause of the failure, as the polkadot-sdk claims it can be compiled to the riscv architecture, according to paritytech/polkadot-sdk#6704.

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