[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'build-use-chroot = true' leads to 'ERROR: In procedure system*: No
From: |
Ludovic Courtès |
Subject: |
Re: 'build-use-chroot = true' leads to 'ERROR: In procedure system*: No such file or directory' |
Date: |
Sun, 16 Dec 2012 17:46:36 +0100 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) |
Hi Nikita,
Nikita Karetnikov <address@hidden> skribis:
> I'm getting the same error with the following command:
>
> # ./pre-inst-env guix-daemon --build-users-group=nixbld -C 0
[...]
>> An option is to replace /bin/sh by the statically-linked Bash that’s in
>> distro/packages/bootstrap/*-linux/bash
>
> Same error.
OK. Can you copy/paste the actual error, because I’m losing track. ;-)
>> Another one, which I think we’ll do, is to change gnu-build-system.scm
>> to either run (system* "/path/to/our/bash" "./configure" ...), or call
>> ‘patch-shebangs’ on ‘configure’.
>
> I don't know how to change the former, but I've tried the latter.
>
> gnu-build-system.scm:
>
> (phases set-paths unpack patch patch-shebangs configure build check
> install strip)
>
> AFAICT, it changed the build order, but the same error appeared
> anyway.
I actually made this change I had in mind in commit d008415, in the
‘core-updates’ branch.
Currently many packages can be built in ‘core-updates’ in a chroot
without /bin. The only thing remaining to be fixed is execv* in glibc:
http://sourceware.org/ml/libc-alpha/2012-12/msg00311.html .
>> But more importantly, /bin/sh is likely to be a dynamically-linked
>> executable, linked against stuff from /lib, which is not in
>> ‘build-chroot-dirs’. Thus, it won’t run in the chroot.
>
> The following works.
>
> nix.conf:
>
> build-users-group = nixbld
> build-use-chroot = true
> build-chroot-dirs = /dev /proc /bin /lib
>
> Does it make sense? Will it help to catch impurities?
(Note that guix-daemon does *not* read nix.conf.)
Adding /bin and /lib means that many binaries beyond /bin/sh are leaked
into the build environment, which is workable, but not great.
If we can manage to build in chroots without /bin at all, that’ll be best.
If we cannot, then we’ll have to do that.
> ?: 0 [system* "test/run"]
>
> ERROR: In procedure system*:
> ERROR: In procedure system*: No such file or directory
Again that’s because /bin/sh is either missing from the chroot, or it’s
there but it’s a symlink whose target is missing, or it’s a
dynamically-linked binary and some of its requirements are missing.
Just try ‘ldd /bin/sh’. Everything listed there should be in the chroot.
> ('attr' builds fine on x86_64. [1])
[...]
> [1] http://hydra.nixos.org/job/gnu/guix-distro-master/attr-2.4.46
That’s because hydra.nixos.org runs NixOS; on NixOS /bin/sh is a symlink
to /nix/store/xxx-bash/bin/sh, and the chroot is setup with all the
dependencies of that path added to ‘build-chroot-dirs’.
Thanks,
Ludo’.