Skip to content

Errors when running cargo nested check with build-wrap #232

Description

@smoelius

Recently, I started seeing the following from cargo nested check:

error: failed to run custom build command for `dylint_examples v5.0.0 (.../gh/trailofbits/dylint2/examples)`

Caused by:
  process didn't exit successfully: `.../gh/trailofbits/dylint2/target/debug/build/dylint_examples-98ebb42824e01e7b/build-script-build` (exit status: 1)
  --- stdout
  cargo::rerun-if-changed=.../gh/trailofbits/dylint2/target/debug/build/dylint_examples-251cb2b989650014/out/nested_workspace.timestamp

  --- stderr
  expanded `BUILD_WRAP_CMD`: [
      "sandbox-exec",
      "-f",
      "/var/folders/gg/wz1k6rpd665gwffsvl7gx2580000gn/T/.tmpbOCFur",
      ".../gh/trailofbits/dylint2/target/debug/build/dylint_examples-98ebb42824e01e7b/.tmpeK17SY",
  ]
  <<< .../gh/trailofbits/dylint2/examples/general
  warning: failed to save last-use data
  This may prevent cargo from accurately tracking what is being used in its global cache. This information is used for automatically removing unused data in the cache.

  attempt to write a readonly database

  Caused by:
    Error code 8: attempt to write a readonly database
  error: Operation not permitted (os error 1) at path ".../gh/trailofbits/dylint2/examples/general/../../target/examplesx8IPJd"
  >>> .../gh/trailofbits/dylint2/examples/general

  thread 'main' (267823336) panicked at .../.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nested_workspace-0.7.4/src/lib.rs:111:14:
  called `Result::unwrap()` on an `Err` value: command failed: cd ".../gh/trailofbits/dylint2/examples/general" && env -u CARGO -u RUSTC -u RUSTUP_TOOLCHAIN NESTED_WORKSPACE_REENTRANCY_GUARD_dylint_examples="1" "cargo" "check" "-vv" "--offline" "--workspace"
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  Error: command failed: "sandbox-exec" "-f" "/var/folders/gg/wz1k6rpd665gwffsvl7gx2580000gn/T/.tmpbOCFur" ".../gh/trailofbits/dylint2/target/debug/build/dylint_examples-98ebb42824e01e7b/.tmpeK17SY"
warning: build failed, waiting for other jobs to finish...
Error: command failed: env -u CARGO -u RUSTC -u RUSTUP_TOOLCHAIN "cargo" "check" "--offline"

According to Claude, the attempt to write a readonly database is the error, and everything before that is just noise.

Also, Claude says this is likely tied to recent build directory layout changes.

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