Skip to content
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

Cannot build on release v0.27.0 and master #1931

Closed
thedevbirb opened this issue Jun 2, 2024 · 3 comments · Fixed by #1932
Closed

Cannot build on release v0.27.0 and master #1931

thedevbirb opened this issue Jun 2, 2024 · 3 comments · Fixed by #1932
Assignees

Comments

@thedevbirb
Copy link

As title says I'm trying to build the project using the guide in the readme, but it fails both on the release v0.27.0 and on master at the latest commit 5db3e19.

Some general info:

  • OS/CPU: MacOS Sonoma 14.5, M3 Pro CPU
  • cmake version: 3.29.2
  • rustc/cargo version: 1.78.0

This is the output I'm getting from running cargo xtask build:

On v0.27.0,

warning: `/Users/birb/oss/FuelLabs_fuel-core/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
   Compiling fuel-core-poa v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/crates/services/consensus_module/poa)
   Compiling fuel-core-importer v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/crates/services/importer)
   Compiling fuel-core-txpool v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/crates/services/txpool)
error: trait `ShouldBeUnique` is never used
   --> crates/services/importer/src/importer.rs:477:7
    |
477 | trait ShouldBeUnique {
    |       ^^^^^^^^^^^^^^
    |
note: the lint level is defined here
   --> crates/services/importer/src/lib.rs:4:9
    |
4   | #![deny(warnings)]
    |         ^^^^^^^^
    = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`

error: could not compile `fuel-core-importer` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: method `tx_id` is never used
  --> crates/services/txpool/src/containers/sort.rs:55:8
   |
48 | pub trait SortableKey: Ord {
   |           ----------- method in this trait
...
55 |     fn tx_id(&self) -> &TxId;
   |        ^^^^^
   |
note: the lint level is defined here
  --> crates/services/txpool/src/lib.rs:4:9
   |
4  | #![deny(warnings)]
   |         ^^^^^^^^
   = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`

error: method `acquire` is never used
   --> crates/services/txpool/src/service/update_sender.rs:119:8
    |
114 | trait Permits {
    |       ------- method in this trait
...
119 |     fn acquire(self: Arc<Self>) -> Pin<Box<dyn Future<Output = Permit> + Send + Sync>>;
    |        ^^^^^^^

error: could not compile `fuel-core-txpool` (lib) due to 2 previous errors

On 5db3e19 (master),

warning: `/Users/birb/oss/FuelLabs_fuel-core/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.23s
     Running `target/debug/xtask build`
warning: `/Users/birb/oss/FuelLabs_fuel-core/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
   Compiling fuel-core-upgradable-executor v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/crates/services/upgradable-executor)
   Compiling fuel-core-client v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/crates/client)
   Compiling fuel-core-e2e-client v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/bin/e2e-test-client)
   Compiling fuel-core-client-bin v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/bin/fuel-core-client)
error: failed to run custom build command for `fuel-core-upgradable-executor v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/crates/services/upgradable-executor)`

Caused by:
  process didn't exit successfully: `/Users/birb/oss/FuelLabs_fuel-core/target/debug/build/fuel-core-upgradable-executor-c7a0f92946faa9b7/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs

  --- stderr
  thread 'main' panicked at crates/services/upgradable-executor/build.rs:83:17:
  Got an error status during compiling WASM executor:
  Output {
      status: ExitStatus(
          unix_wait_status(
              25856,
          ),
      ),
      stdout: "",
      stderr: "warning: `/Users/birb/oss/FuelLabs_fuel-core/.cargo/config` is deprecated in favor of `config.toml`\nnote: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`\nwarning: `/Users/birb/oss/FuelLabs_fuel-core/.cargo/config` is deprecated in favor of `config.toml`\nnote: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`\n  Installing fuel-core-wasm-executor v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/crates/services/upgradable-executor/wasm-executor)\n    Updating crates.io index\n   Compiling subtle v2.5.0\n   Compiling const-oid v0.9.6\n   Compiling rand_core v0.6.4\n   Compiling cfg-if v1.0.0\n   Compiling base16ct v0.2.0\n   Compiling typenum v1.17.0\n   Compiling once_cell v1.19.0\n   Compiling rustversion v1.0.17\n   Compiling rustc_version v0.4.0\n   Compiling syn v1.0.109\n   Compiling zeroize v1.8.1\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: could not compile `cfg-if` (lib) due to 1 previous error\nerror: could not compile `rand_core` (lib) due to 1 previous error\nerror: could not compile `base16ct` (lib) due to 1 previous error\nerror[E0463]: can't find crate for `std`\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\nerror: could not compile `once_cell` (lib) due to 1 previous error\nerror: could not compile `typenum` (lib) due to 1 previous error\nerror: could not compile `zeroize` (lib) due to 1 previous error\nerror: failed to compile `fuel-core-wasm-executor v0.27.0 (/Users/birb/oss/FuelLabs_fuel-core/crates/services/upgradable-executor/wasm-executor)`, intermediate artifacts can be found at `/Users/birb/oss/FuelLabs_fuel-core/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...
Error: "cargo build failed"

Is there something else I need to setup on my part in order to build properly? Thanks for the help!

@xgreenx
Copy link
Collaborator

xgreenx commented Jun 2, 2024

You need to use rust 1.75 and the wasm-unknown-unknown target should be installed

@thedevbirb
Copy link
Author

thedevbirb commented Jun 3, 2024

You need to use rust 1.75 and the wasm-unknown-unknown target should be installed

Thanks for the reply, it works! What do you think of adding this small rust-toolchain.toml file

[toolchain]
channel = "1.75.0"
target = ["wasm32-unknown-unknown"]

and a small section in the README to make sure the wasm32-unknown-unknown target is installed via rustup? I'd happily make a PR for it if you want.

@thedevbirb thedevbirb changed the title Cannot build on release v0.27.0 and master on MacOS Cannot build on release v0.27.0 and master Jun 3, 2024
@Dentosal
Copy link
Member

Dentosal commented Jun 3, 2024

@thedevbirb #1932 should do this. Thanks for the report again.

xgreenx pushed a commit that referenced this issue Jun 3, 2024
Closes #1931

### Before requesting review
- [x] I have reviewed the code myself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants