[Nix-dev] error in unpack-bootstrap-tools.sh

Matei David matei at cs.toronto.edu
Wed Oct 28 17:35:18 CET 2015


On Wed, 28 Oct 2015 16:47:13 +0100
Vladimír Čunát <vcunat at gmail.com> wrote:

> Hi.
> 
> On 10/28/2015 04:17 PM, Matei David wrote:
> > What can I do to fix this or to diagnose it further?
> 
> That's strange, as (1) the bootstrapping seems fine on Hydra
> http://hydra.nixos.org/job/nixpkgs/trunk/stdenvBootstrapTools.x86_64-linux.test
> and (2) I see no ash option in busybox that looks like it could affect
> globbing.
> 
> I wonder if changing "/nix/store" could cause such problems, but I see
> nothing. I assume your "/some-dir" prefix doesn't contain any
> dangerous characters (e.g. spaces)?

Thanks for the reply. In my case, /somedir is just ${HOME} . (But it's
spelled out, I'm not relying on HOME begin defined.)

As I said earlier, I edited unpack-bootstrap-tools.sh to understand
what's going on, here is the diff:
http://pastebin.com/raw.php?i=J9Mk9e58

And here is the output:
http://pastebin.com/raw.php?i=58FMNjjm

From the output, one can see that:
- the script is being sourced by: busybox ash -e (see pstree)
- the destination of the glob (the dynamic linker) exists (see ls |
  grep)
- globbing is not active (see echo)

Strangely, now I see one additional error, about "env" not being
understood:

Unpacking the bootstrap tools...
Patching the bootstrap tools...
/some-dir/nix/store/...-unpack-bootstrap-tools.sh: line 22: env: not
found
/some-dir/nix/store/...-unpack-bootstrap-tools.sh:
line
34: /some-dir/nix/store/...-bootstrap-tools/lib/ld-*so.?:
not found

This last issue is confusing, because when I try it by hand, env works
just fine, so I don't know what to make of it.

$ env -i /some-dir/nix/store/...-busybox ash
BusyBox v1.22.1 () built-in shell (ash)
Enter 'help' for a list of built-in commands.
$ env
PWD=/some-dir/nix-boot

Either way, I don't understand how the original line 14&19 in
unpack-bootstrap-tools.sh are supposed to work when globbing is not
enabled:

14:LD_BINARY=$out/lib/ld-*so.?
19:LD_LIBRARY_PATH=$out/lib $LD_BINARY $out/bin/cp $out/bin/patchelf .


Matei


More information about the nix-dev mailing list