Problem
Trying to run cargo check with Cargo's master branch (which uses the new build dir layout by default) on Linux ends with this:
Caused by:
could not execute process `/home/kobzol/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name build_script_build --edition=2021 /home/kobzol/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.186/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=190 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C codegen-units=16 -C debuginfo=1 -C split-debuginfo=unpacked --cfg 'feature="default"' --cfg 'feature="extra_traits"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("align", "const-extern-fn", "default", "extra_traits", "rustc-dep-of-std", "rustc-std-workspace-core", "std", "use_std"))' -C metadata=1a7a9d600c1a693c --out-dir /projects/personal/rust/zed/target/debug/build/libc/228bac5962996f05/out -L dependency=/projects/personal/rust/zed/target/debug/build/libc/228bac5962996f05/out --cap-lints allow -C symbol-mangling-version=v0 --cfg tokio_unstable` (never executed)
Caused by:
Argument list too long (os error 7)
error: could not compile `once_cell` (lib)
There are hundreds of such errors. I'm not sure why it gives this specific error, because the printed command doesn't seem very long.
Compiling projects with less dependencies (e.g. bors) works fine.
Steps
git clone https://github.com/zed-industries/zed
cargo check (using nightly rustc and master Cargo)
Possible Solution(s)
No response
Notes
No response
Version
./cargo-baseline version --verbose
cargo 1.98.0 (83acc2ea9 2026-07-03)
release: 1.98.0
commit-hash: 83acc2ea93e13544f66db275c518ed76607ec37e
commit-date: 2026-07-03
host: x86_64-unknown-linux-gnu
libgit2: 1.9.4 (sys:0.21.0 vendored)
libcurl: 8.5.0 (sys:0.4.90+curl-8.21.0 system ssl:OpenSSL/3.0.13)
os: Ubuntu 24.4.0 (noble) [64-bit]
The real commit is 28fa7f2a3d8cbc62256aaf0d8464f9ecc96248ff though.
Problem
Trying to run
cargo checkwith Cargo'smasterbranch (which uses the new build dir layout by default) on Linux ends with this:There are hundreds of such errors. I'm not sure why it gives this specific error, because the printed command doesn't seem very long.
Compiling projects with less dependencies (e.g.
bors) works fine.Steps
git clone https://github.com/zed-industries/zedcargo check(usingnightlyrustc andmasterCargo)Possible Solution(s)
No response
Notes
No response
Version
The real commit is
28fa7f2a3d8cbc62256aaf0d8464f9ecc96248ffthough.