Skip to content

Fails when used in Nix derivation #108

@dpc

Description

@dpc

I'm trying to run cargo hfuzz inside a Nix derivation, which is using crane.

       >   make: Leaving directory '/nix/store/q7yhjb6cs5193z84z46g137439alr7sh-cargo-package-honggfuzz-0.
5.55/honggfuzz'
       >
       >   --- stderr
       >   warning: Skipping impure flag -mtune=native because NIX_ENFORCE_NO_NATIVE is set
       >   error: unable to open output file 'cmdline.o': 'Permission denied'
       >   1 error generated.
       >   make: *** [Makefile:263: cmdline.o] Error 1
       >
       >   thread 'main' panicked at /nix/store/79ag7g79jji3s8xyv2blygvcvl3xppkz-vendor-cargo-deps/c19b7c6
f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/honggfuzz-0.5.55/build.rs:49:5:
       >   assertion failed: status.success()

AFAICT, make invocation is trying to create temporary files in the source directory, which is vendored read-only in Nix. It should probably use some OUT_DIR's subdir instead which is meant to be writtable.

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