Skip to content

cargo install fails with tmpdir noexec #4350

@fmarier

Description

@fmarier

My /tmp directory is mounted as noexec from within /etc/fstab:

tmpfs    /tmp    tmpfs    size=1024M,noexec,nosuid,nodev    0    0

and when I try to install sccache, I get the following error:

$ cargo install sccache
    Updating registry `https://github.com/rust-lang/crates.io-index`
  Installing sccache v0.2.0
 Downloading hyper v0.11.2
...
   Compiling app_dirs v1.1.1
error: failed to run custom build command for `rayon-core v1.2.1`
could not execute process `/tmp/user/1000/cargo-install.aYBrcIx53fYu/release/build/rayon-core-68aa2a81ce933a70/build-script-build` (never executed)
Build failed, waiting for other jobs to finish...
error: failed to compile `sccache v0.2.0`, intermediate artifacts can be found at `/tmp/user/1000/cargo-install.aYBrcIx53fYu`

Caused by:
  build failed

It would be nice if cargo could either use a different directory to put executables in, or at the very least warn about this limitation and give a clearer error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.Command-installS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions