unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: pukkamustard <pukkamustard@posteo.net>
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: John Soo <jsoo1@asu.edu>, 46297@debbugs.gnu.org
Subject: bug#46297: nix-service-configuration is missing the default /bin/sh
Date: Thu, 22 Apr 2021 07:30:58 +0000	[thread overview]
Message-ID: <8635viiwcs.fsf@posteo.net> (raw)
In-Reply-To: <874kfy7qkf.fsf@gmail.com>


Oleg Pykhalov <go.wigust@gmail.com> writes:

> It doens't fail without the patch.  Could I ask what issue the
> build-sandbox-paths introduce for you?  Also it would be helpful 
> if you
> provide terminal output with an error you occurred.

Ah, sorry I didn't see that there where system tests.

This is how I ran into the issue (nixpkgs/ folder is a checkout of 
the nixpkgs repo).

```
$ nix-build nixpkgs/ -A ocaml-ng.ocamlPackages_4_11.ocaml

building 
'/nix/store/075nqnnbsgz2frmg5fzhj3ql8lajvgq3-ocaml-4.11.2.tar.xz.drv'...

trying 
http://caml.inria.fr/pub/distrib/ocaml-4.11/ocaml-4.11.2.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time 
  Time  Current
                                 Dload  Upload   Total   Spent 
                                 Left  Speed
100 3418k  100 3418k    0     0  2553k      0  0:00:01  0:00:01 
--:--:-- 2555k
building 
'/nix/store/p4b4shz2alnb2zpiyx44rf7yn5k30m32-ocaml-4.11.2.drv'...
unpacking sources
unpacking source archive 
/nix/store/9harmbwn44004ylalfnvlic4qp5ppvi4-ocaml-4.11.2.tar.xz
source root is ocaml-4.11.2
setting SOURCE_DATE_EPOCH to timestamp 1614163229 of file 
ocaml-4.11.2/yacc/wstr.c
patching sources
configuring
fixing libtool script ./build-aux/ltmain.sh
configure flags: --disable-static -prefix 
/nix/store/gvwnh8wn0ib40fd6k3wa4xf7ja1y17l9-ocaml-4.11.2
/nix/store/bmnhfb10m2s3whl6478dmqhcrkjwk77y-stdenv-linux/setup: 
./configure: /bin/sh: bad interpreter: No such file or directory
builder for 
'/nix/store/p4b4shz2alnb2zpiyx44rf7yn5k30m32-ocaml-4.11.2.drv' 
failed with exit code 126
error: build of 
'/nix/store/p4b4shz2alnb2zpiyx44rf7yn5k30m32-ocaml-4.11.2.drv' 
failed

````

The build succeeds if I do following:

```
$ sudo nix-build nixpkgs/ -A ocaml-ng.ocamlPackages_4_11.ocaml 
--option build-sandbox-paths 
"/bin/sh=//nix/store/0xrjvxvh3wvdbf8pc2850jry1fcx292g-busybox-1.32.1/bin/busybox"
these derivations will be built:
  /nix/store/p4b4shz2alnb2zpiyx44rf7yn5k30m32-ocaml-4.11.2.drv
building 
'/nix/store/p4b4shz2alnb2zpiyx44rf7yn5k30m32-ocaml-4.11.2.drv'...
unpacking sources
unpacking source archive 
/nix/store/9harmbwn44004ylalfnvlic4qp5ppvi4-ocaml-4.11.2.tar.xz
source root is ocaml-4.11.2
setting SOURCE_DATE_EPOCH to timestamp 1614163229 of file 
ocaml-4.11.2/yacc/wstr.c
patching sources
configuring
fixing libtool script ./build-aux/ltmain.sh
configure flags: --disable-static -prefix 
/nix/store/gvwnh8wn0ib40fd6k3wa4xf7ja1y17l9-ocaml-4.11.2
configure: Configuring OCaml version 4.11.2
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for gcc... gcc
checking whether the C compiler works... yes
.
.
.
/nix/store/gvwnh8wn0ib40fd6k3wa4xf7ja1y17l9-ocaml-4.11.2
```

Note that I need to use sudo as otherwise Nix would simply ignore 
my request to override system configurations. And I had to run 
`nix-build -A busybox` to make sure busybox was in the /nix/store.

The build-sandbox-paths I manually supplied seem to be the 
defaults (as stated in documentation linked in John Soo's mail), 
so I assumed that just removing the build-sandbox-path setting 
from the nix.conf would solve the issue. I was a bit sloppy with 
testing it completely...

This might be an upstream issue with how OCaml is built in Nix. I 
think Nix builders should use ${stdenv.shell} instead of /bin/sh 
(https://github.com/NixOS/nixpkgs/issues/183). But maybe good if 
we can fix it in the Guix nix-service as well.

-pukkamustard




  reply	other threads:[~2021-04-22  8:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 16:00 bug#46297: nix-service-configuration is missing the default /bin/sh John Soo
2021-02-04 18:54 ` John Soo
2021-04-21 15:00   ` pukkamustard
2021-04-22  6:59     ` Oleg Pykhalov
2021-04-22  7:30       ` pukkamustard [this message]
2021-04-22 16:50         ` Oleg Pykhalov
2021-04-26  7:21           ` pukkamustard
2021-04-26 17:06             ` Oleg Pykhalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8635viiwcs.fsf@posteo.net \
    --to=pukkamustard@posteo.net \
    --cc=46297@debbugs.gnu.org \
    --cc=go.wigust@gmail.com \
    --cc=jsoo1@asu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).