Mark H Weaver <[email protected]> writes:

> Robert Vollmert <[email protected]> writes:
>
>> So this is pretty bizarre, and I haven’t managed to cut it down
>> to a smaller example yet, but it seems pretty clear that something
>> is broken:
>>
>> $ guix build -K some-package
>> -> error, referencing /tmp/guix-build-puzzledb-frontend-20190625-git.drv-0
>> note: keeping build directory 
>> `/tmp/guix-build-puzzledb-frontend-20190625-git.drv-0’
>> $ guix build -K some-package
>> -> same error, again referencing 
>> /tmp/guix-build-puzzledb-frontend-20190625-git.drv-0
>> note: keeping build directory 
>> `/tmp/guix-build-puzzledb-frontend-20190625-git.drv-1’
>
> This is known behavior, and intentional.  The build is done within a
> container, and the directory name within the container is canonicalized.

FYI, here's the relevant commit that added this behavior:

--8<---------------cut here---------------start------------->8---
commit cb9601029ea164b86bdf997f7160d494c15d344b
Author: Eelco Dolstra <[email protected]>
Date:   Wed Dec 2 14:59:07 2015 +0100

    daemon: Use deterministic $TMPDIR in chroot.
    
    Rather than using $<host-TMPDIR>/nix-build-<drvname>-<number>, the
    temporary directory is now always /tmp/nix-build-<drvname>-0. This
    improves bitwise-exact reproducibility for builds that store $TMPDIR
    in their build output. (Of course, those should still be fixed...)
    
    * nix/libstore/build.cc (DerivationGoal)[tmpDirInSandbox]: New field.
    (DerivationGoal::startBuilder): Initialize 'useChroot' earlier.  Compute
    'tmpDirInSandbox', and use it when populating 'dirsInChroot'.
    * doc/guix.texi (Build Environment Setup): Document it.
    
    Co-authored-by: Ludovic Courtès <[email protected]>
--8<---------------cut here---------------end--------------->8---

       Mark



Reply via email to