GNU bug report logs - #25242
Cannot build source derivations with a custom TMPDIR

Previous Next

Package: guix;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Wed, 21 Dec 2016 08:23:02 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: bug-guix <at> gnu.org
Subject: Re: Cannot build source derivations with a custom TMPDIR
Date: Wed, 21 Dec 2016 03:54:21 -0500
[Message part 1 (text/plain, inline)]
On Wed, Dec 21, 2016 at 03:22:40AM -0500, Leo Famulari wrote:
> I ran the guix-daemon with strace, and I see these relevant lines:
> 
> 15337 [pid 30675] mkdir("/home/leo/tmp/guix-build/guix-build-nmap-7.40.tar.bz2.drv-0", 0700) = 0
> 15338 [pid 30675] getegid()                   = 0
> 15339 [pid 30675] chown("/home/leo/tmp/guix-build/guix-build-nmap-7.40.tar.bz2.drv-0", -1, 0) = 0

I believe this corresponds to the use of createTempDir() at
nix/libstore/build.cc:1718. The path of the new directory is saved in
the tmpDir variable.

> 15438 [pid 30693] chdir("/tmp/guix-build-nmap-7.40.tar.bz2.drv-0") = -1 ENOENT (No such file or directory)

And then later, at nix/libstore/build.cc:2204, we do this:

2204         if (chdir(tmpDirInSandbox.c_str()) == -1)
2205             throw SysError(format("changing into `%1%'") % tmpDir);

It tries to change to the wrong directory (the new "out of band"
downloader doesn't use a chroot, IIUC), and then prints a misleading
error message. This explains the discrepancy between what we see in
strace and on stderr.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 8 years and 146 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.