aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Bug] failed to run custom build command for `cached-framework-packages

Open kenwayliu opened this issue 2 years ago • 2 comments

🐛 Bug

I used this link to build the APtos CLI https://github.com/aptos-labs/aptos-core/blob/main/crates/aptos/README.md,I am getting the following error:

   Compiling executor v0.1.0 (/root/.cargo/git/checkouts/aptos-core-8f3268fcf79e1f38/22fd977/execution/executor)
error: failed to run custom build command for `cached-framework-packages v0.1.0 (/root/.cargo/git/checkouts/aptos-core-8f3268fcf79e1f38/22fd977/aptos-move/framework/cached-packages)`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installvwM4YR/release/build/cached-framework-packages-db3caf20f36a92c6/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=../aptos-framework/sources
  cargo:rerun-if-changed=../move-stdlib/sources
  INCLUDING DEPENDENCY MoveStdlib
  BUILDING AptosFramework
  Checking layout compatibility
  Generating error map
  Generating script builders

  --- stderr
  thread 'main' panicked at 'Failed to run rustfmt on generated code: Os { code: 2, kind: NotFound, message: "No such file or directory" }', aptos-move/framework/src/release.rs:188:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `aptos v0.1.2 (https://github.com/aptos-labs/aptos-core.git?tag=aptos-cli-latest#22fd977c)`, intermediate artifacts can be found at `/tmp/cargo-installvwM4YR`

To reproduce

OS Version

root@instance-1:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04 LTS
Release:        22.04
Codename:       jammy

Execute the following command

sudo apt install build-essential pkg-config openssl libssl-dev libclang-dev
cargo install --git https://github.com/aptos-labs/aptos-core.git aptos --tag aptos-cli-latest

Code snippet to reproduce

# Your code goes here
# Please make sure it does not require any external dependencies

Stack trace/error message

// Paste the output here
   Compiling executor v0.1.0 (/root/.cargo/git/checkouts/aptos-core-8f3268fcf79e1f38/22fd977/execution/executor)
error: failed to run custom build command for `cached-framework-packages v0.1.0 (/root/.cargo/git/checkouts/aptos-core-8f3268fcf79e1f38/22fd977/aptos-move/framework/cached-packages)`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installvwM4YR/release/build/cached-framework-packages-db3caf20f36a92c6/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=../aptos-framework/sources
  cargo:rerun-if-changed=../move-stdlib/sources
  INCLUDING DEPENDENCY MoveStdlib
  BUILDING AptosFramework
  Checking layout compatibility
  Generating error map
  Generating script builders

  --- stderr
  thread 'main' panicked at 'Failed to run rustfmt on generated code: Os { code: 2, kind: NotFound, message: "No such file or directory" }', aptos-move/framework/src/release.rs:188:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `aptos v0.1.2 (https://github.com/aptos-labs/aptos-core.git?tag=aptos-cli-latest#22fd977c)`, intermediate artifacts can be found at `/tmp/cargo-installvwM4YR`

Caused by:
  build failed

Expected Behavior

System information

Please complete the following information:

  • Latest version
  • Ubuntu 22.04 LTS

Additional context

Add any other context about the problem here.

kenwayliu avatar Jul 01 '22 06:07 kenwayliu

Strange, sorry I missed this the last time, but @kenwayliu is this still an issue with the latest version?

gregnazario avatar Jul 25 '22 21:07 gregnazario

We've since removed the aptos-cli-latest tag

gregnazario avatar Jul 25 '22 21:07 gregnazario

Hopefully issue has been resolved, I faintly remember this and think we fixed it.

davidiw avatar Aug 07 '22 23:08 davidiw