bin_prot icon indicating copy to clipboard operation
bin_prot copied to clipboard

Installation failure on NixOS

Open RyanGibb opened this issue 1 year ago • 2 comments

dune build -p bin_prot -j 7
File "xen/dune", lines 1-6, characters 0-111:
1 | (rule
2 |  (targets cflags.sexp)
3 |  (deps
4 |   (:first_dep cflags.sh))
5 |  (action
6 |   (bash "./%{first_dep} > %{targets}")))
(cd _build/default/xen && /nix/store/p5441mp6wwpdh65qamaixvd092cwr45h-bash-interactive-5.2p26/bin/bash -e -u -o pipefail -c './cflags.sh > cflags.sexp')
/nix/store/p5441mp6wwpdh65qamaixvd092cwr45h-bash-interactive-5.2p26/bin/bash: line 1: ./cflags.sh: cannot execute: required file not found

A fix is to change the shebang from #!/bin/bash to the portable #!/usr/bin/env bash in cflags.sh as in https://github.com/janestreet/bin_prot/issues/26. It looks like https://github.com/janestreet/bin_prot/pull/29 would also fix this.

RyanGibb avatar Jul 23 '24 09:07 RyanGibb

Should be fixed by https://github.com/janestreet/bin_prot/pull/29 (when that lands, in the next release of this package)

aalekseyev avatar Jul 25 '24 13:07 aalekseyev

For anyone else struggling with this, you can pin the package to the commit as a quick fix:

opam pin add bin_prot git+https://github.com/janestreet/bin_prot.git#ddbf7bde22ff464882d749fea2b9cdfa59a7e268

HPRIOR avatar Mar 23 '25 20:03 HPRIOR