trailofbits / trailofbits/build-wrap
Errors when running `cargo nested check` with `build-wrap`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 37
- Forks
- 5
- Avg merge
- 21m
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with cargo nested check and build-wrap, then inspect the reported readonly database error and the recent build directory layout changes. Trace how the nested workspace reaches target/examples and determine what must change so the command completes without the readonly-database or operation-not-permitted errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100