[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#38606] [WIP SMLnj 0/1] Add SMLnj.
From: |
Josselin Poiret |
Subject: |
[bug#38606] [WIP SMLnj 0/1] Add SMLnj. |
Date: |
Tue, 09 Nov 2021 10:03:41 +0000 |
Foo Chuan Wei <chuanwei.foo@hotmail.com> writes:
> The error above occurs because the build process uses nix-install.sml,
> and nix-install.sml uses `OS.Process.system` (in the `unpack` function).
> `OS.Process.system` relies on /bin/sh, but /bin/sh is not present in the
> Guix build environment. "No such file or directory" presumably refers to
> the absence of /bin/sh.
>
> Unfortunately, the fix might require some binary patching. /bin/sh is
> hardcoded in sml.boot.amd64-unix/SMLNJ-BASIS/.cm/amd64-unix/basis-common.cm
> (a binary file from boot.amd64-unix.tgz).
Linking [1] for our IRC discussion about this.
You proposed patching /bin/sh to /tmp/sh, and symlinking /tmp/sh
yourself, did that work?
If not, I can still write a SMLNJ binfile patcher if you feel the need
for it (literals should be pretty easy to patch, see
sml/gc/build-literals.c for their format).
Best,
Josslin Poiret
[1] https://logs.guix.gnu.org/guix/2021-11-08.log#135443