Hi,

Nikita Karetnikov <nik...@karetnikov.org> skribis:

>> Wild guess: you’re building outside of a chroot, and Perl’s configure
>> found /usr/lib/libgdbm.so, so it decided to link against it, which
>> didn’t work because our linker doesn’t look for libraries there.
>
>> Can you confirm?
>
>> Solution: add “build-use-chroot = true” in nix.conf.
>
> Everything I tried failed.
>
> First attempt:
>
> # cat /usr/local/etc/nix/nix.conf
> build-users-group = nixbld
> build-use-chroot = true
>
> # ./pre-inst-env guix-build -K                \
>       -e '(@ (gnu packages make-bootstrap) %bootstrap-tarballs)'  \
>       --system=mips64el-linux
>
> [...]
>
> @ build-started /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv 
> /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 mips64el-linux 
> /nix/var/log/nix/drvs/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv.bz2
> build error: mounting /proc: No such file or directory

This is weird.  Is it nix-daemon?  Which version?

> Second:
>
> # cat /usr/local/etc/nix/nix.conf
> build-users-group = nixbld
> build-use-chroot = true
> build-chroot-dirs = /dev /proc
>
> @ build-started /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv 
> /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 mips64el-linux 
> /nix/var/log/nix/drvs/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv.bz2
> building /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1
> unpacking sources
> unpacking source archive 
> /nix/store/ics0cri221a5lnym4a92xsyv02qis003-patch-2.6.1.tar.gz
> source root is patch-2.6.1
> patching sources
> configuring
> configure flags: 
> --prefix=/nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1  
> /nix/store/71xcmhyizrp7n0xl596waid5fijckchm-stdenv-linux-boot/setup: 
> ./configure: /bin/sh: bad interpreter: No such file or directory

As you’ve surely guessed ;-), the chroot lacks /bin/sh, hence the error.
Here, you’re building Patch from Nixpkgs, and Nixpkgs requires /bin/sh.

Now, I thought you had successfully built Nixpkgs’s stdenv, and had even
started building Perl from Guix, no?  In that case, I don’t see why
Nixpkgs’s Patch is being rebuilt here.

> Third:
>
> # cat /usr/local/etc/nix/nix.conf
> build-users-group = nixbld
> build-use-chroot = true
> build-chroot-dirs = /dev /proc /bin
>
> @ build-started /nix/store/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv 
> /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1 mips64el-linux 
> /nix/var/log/nix/drvs/1qladfk4nppn4bgq6v6agy69r4pwgy9w-patch-2.6.1.drv.bz2
> building /nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1
> unpacking sources
> unpacking source archive 
> /nix/store/ics0cri221a5lnym4a92xsyv02qis003-patch-2.6.1.tar.gz
> source root is patch-2.6.1
> patching sources
> configuring
> configure flags: 
> --prefix=/nix/store/sbgh5q8blbf0nd3w81qpzy47plmrphzp-patch-2.6.1  
> /nix/store/71xcmhyizrp7n0xl596waid5fijckchm-stdenv-linux-boot/setup: 
> ./configure: /bin/sh: bad interpreter: No such file or directory

Here /bin/sh is dynamically linked, hence the failure.

> I'll try to build statically-linked Bash.  Then I'll place it in
> '/bin/sh' and try again.  (This worked on i686.)

OK.

Ludo’.

Reply via email to