Error: failed to run custom build command for `fuel-core-upgradable-executor v0.36.0`

Commands: cargo test

The error:

error: failed to run custom build command for `fuel-core-upgradable-executor v0.36.0`

Caused by:
  process didn't exit successfully: `/home/donkey/Desktop/Donkeyswapv1/contracts/target/debug/build/fuel-core-upgradable-executor-c0e0f3895449afbf/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs

  --- stderr
  thread 'main' panicked at /home/donkey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fuel-core-upgradable-executor-0.36.0/build.rs:90:17:
  Got an error status during compiling WASM executor: 
  Output {
      status: ExitStatus(
          unix_wait_status(
              25856,
          ),
      ),
      stdout: "",
      stderr: "    Updating crates.io index\n  Installing fuel-core-wasm-executor v0.36.0\n    Updating crates.io index\n    Updating crates.io index\n Downloading crates ...\n  Downloaded fuel-asm v0.57.0\n  Downloaded autocfg v1.3.0\n  Downloaded fuel-tx v0.57.0\n  Downloaded wasm-bindgen-macro v0.2.93\n  Downloaded wasm-bindgen-shared v0.2.93\n  Downloaded wasm-bindgen v0.2.93\n  Downloaded toml_edit v0.22.21\n  Downloaded once_cell v1.19.0\n  Downloaded k256 v0.13.3\n  Downloaded winnow v0.6.18\n  Downloaded gimli v0.31.0\n  Downloaded syn v2.0.77\n  Downloaded object v0.36.4\n  Downloaded fuel-vm v0.57.0\n  Downloaded serde_with v3.9.0\n  Downloaded js-sys v0.3.70\n  Downloaded libc v0.2.158\n  Downloaded fuel-derive v0.57.0\n  Downloaded fuel-types v0.57.0\n  Downloaded fuel-storage v0.57.0\n  Downloaded fuel-merkle v0.57.0\n  Downloaded fuel-crypto v0.57.0\n  Downloaded wasm-bindgen-macro-support v0.2.93\n  Downloaded wasm-bindgen-backend v0.2.93\n  Downloaded serde_with_macros v3.9.0\n  Downloaded indexmap v2.5.0\n  Downloaded async-trait v0.1.82\n  Downloaded addr2line v0.24.1\n   Compiling proc-macro2 v1.0.86\n   Compiling unicode-ident v1.0.13\n   Compiling version_check v0.9.5\n   Compiling typenum v1.17.0\n   Compiling subtle v2.6.1\n   Compiling const-oid v0.9.6\nerror[E0463]: can't find crate for `core`\n  |\n  = note: the `wasm32-unknown-unknown` target may not be installed\n  = help: consider downloading the target with `rustup target add wasm32-unknown-unknown`\n\nFor more information about this error, try `rustc --explain E0463`.\nerror: could not compile `subtle` (lib) due to 1 previous error\nwarning: build failed, waiting for other jobs to finish...\nerror: could not compile `const-oid` (lib) due to 1 previous error\nerror: failed to compile `fuel-core-wasm-executor v0.36.0`, intermediate artifacts can be found at `/home/donkey/Desktop/Donkeyswapv1/contracts/target/debug/fuel-core-upgradable-executor-cache`.\nTo reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.\n",
  }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish.

> Blockquote

Can you please share the output for the fuelup-show and the code repo or a gist for the code throwing the error?

1 Like

you are probably using the fuel-core-lib feature. Can you try adding the wasm target with rustup target add wasm32-unknown-unknown and then try to build again.

1 Like

Hi is that package outdated?
I did run forc build.

This is my fuelup show

Default host: x86_64-unknown-linux-gnu
fuelup home: /home/donkey/.fuelup

Installed toolchains
--------------------
latest-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
nightly-2024-05-28-x86_64-unknown-linux-gnu
testnet-x86_64-unknown-linux-gnu

active toolchain
----------------
latest-x86_64-unknown-linux-gnu (default)
  forc : 0.65.2
    - forc-client
      - forc-deploy : 0.65.2
      - forc-run : 0.65.2
    - forc-crypto : 0.65.2
    - forc-debug : 0.65.2
    - forc-doc : 0.65.2
    - forc-fmt : 0.65.2
    - forc-lsp : 0.65.2
    - forc-tx : 0.65.2
    - forc-wallet : 0.10.0
  fuel-core : 0.37.1
  fuel-core-keygen : 0.37.1

fuels versions
--------------
forc : 0.66.6
forc-wallet : 0.66.6

I have this issue instead after performing what you state:

cargo test
   Compiling test-utils v0.0.0 (/home/home/Desktop/test/contracts/test-utils)
error: malformed `abi`. Did you use `forc` to create it?:  missing field `type` at line 157 column 9
 --> test-utils/src/interface.rs:9:15
  |
9 |         abi = "contract/AMM-contract/out/debug/AMM-contract-abi.json"

I’m writing a rust file to deploy contract, I noticed that the ABI using the current version for typescript typegen is completely different for Rust. Hence how do we deploy the contract using rust?

which version of fuels-rs are you using ? I would recommend using the latest version 0.66.9

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.