Subject: bug#25089: Can't build source derivations with Guix 0.11.0-4.1f41

From: Leo Famulari <[email-masked]>
Date: Fri, 2 Dec 2016 03:10:08 -0500

I'm having trouble building source code derivations using the latest
guix development snapshot, 0.11.0-4.1f41. I don't seem to have any
trouble building packages themselves.

I'm using Guix on a foreign distro (Debian).

I think the problem is in the daemon because it doesn't manifest just
because I've switched to a profile with the 0.11.0-4.1f41 snapshot; I
have to use that version of the daemon to see the problem.

It fails like this:

------
$ guix build hello --source --check
@ build-started /gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv - x86_64-linux /var/log/guix/drvs/xv//9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv.bz2
warning: failed to install locale: Invalid argument

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
>From http://ftpmirror.gnu.org/hello/hello-2.10.tar.gz...
following redirection to `http://mirrors.ibiblio.org/pub/mirrors/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
following redirection to `http://mirrors.ibiblio.org/gnu/ftp/gnu/hello/hello-2.10.tar.gz'...
ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
>From ftp://ftp.cs.tu-berlin.de/pub/gnu/hello/hello-2.10.tar.gz...
ERROR: In procedure connect*: Connection timed out

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
>From ftp://ftp.funet.fi/pub/mirrors/ftp.gnu.org/gnu/hello/hello-2.10.tar.gz...
ERROR: Throw to key `ftp-error' with args `(#<input-output: socket 11> "PASV" 425 "You cannot use PASV on IPv6 connections. Use EPSV instead.\r")'.

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
>From http://ftp.gnu.org/pub/gnu/hello/hello-2.10.tar.gz...
ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
>From http://mirror.hydra.gnu.org/file/hello-2.10.tar.gz/sha256/0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i...
ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
>From http://tarballs.nixos.org/sha256/0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i...
following redirection to `http://tarballs.nixos.org/sha512/e301d785135c52575a8b4c35994c0316f8d366451f604eb5e74c1f907077502aebd5a1a32cd1e26cd7ca32c22f4de5623a335f8ae7e735ac977420df664f01de'...
ERROR: In procedure open-file: Permission denied: "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz"
failed to download "/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz" from "mirror://gnu/hello/hello-2.10.tar.gz"
builder for `/gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv' failed to produce output path `/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz'
@ build-failed /gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv - 1 builder for `/gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv' failed to produce output path `/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz'
guix build: error: build failed: build of `/gnu/store/xv9vdk2dijx6nnl8hsawffwfnfmm5vny-hello-2.10.tar.gz.drv' failed
------

This file /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
already exists in my store.

If I set $TMPDIR to something besides the default, it fails like this:

------
$ guix build hello --source --check
guix build: error: build failed: while setting up the build environment: changing into `/home/leo/tmp/guix-build/guix-build-hello-2.10.tar.gz.drv-0': No such file or directory
------

The previous Guix snapshot, 0.11.0-3.7ca3, works as expected:

------
$ guix build hello --source --check
@ build-started /gnu/store/gx0nbs6krwawz0z4ljy2nc8lrnxzmx7g-hello-2.10.tar.gz.drv - x86_64-linux /var/log/guix/drvs/gx//0nbs6krwawz0z4ljy2nc8lrnxzmx7g-hello-2.10.tar.gz.drv.bz2

Starting download of /gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
>From http://ftpmirror.gnu.org/hello/hello-2.10.tar.gz...
following redirection to `http://mirror.clarkson.edu/gnu/hello/hello-2.10.tar.gz'...
 ...10.tar.gz  709KiB               2.2MiB/s 00:00 [####################] 100.0%
/gnu/store/hbdalsf5lpf01x4dcknwx6xbn6n5km6k-hello-2.10.tar.gz
------