Conversation
Signed-off-by: Rajdeep Malakar <rajdeepm.dev@gmail.com> Adds a recipe for OCaml WITHOUT the Compiler Libraries, which are often unnecessary for everything but Opam. For Opam, we need that, btw.
Signed-off-by: Rajdeep Malakar <rajdeepm.dev@gmail.com>
Signed-off-by: Rajdeep Malakar <rajdeepm.dev@gmail.com>
Signed-off-by: Rajdeep Malakar <rajdeepm.dev@gmail.com>
Signed-off-by: Rajdeep Malakar <rajdeepm.dev@gmail.com>
|
It can't find ocaml. Are you sure there's a bin/ocaml at the end, and it's not a broken symlink? Adding an ls should show it. |
Yep, that's the problem. OCaml has so many binaries, that I just copy-pasted all the bin names, and added a |
`/opt/ocaml.org/v5.1.1+brewing/opt/ocaml.org/v5.1.1+brewing/lib/ocaml/compiler-libs` prefix was getting applied twice
|
Problem was prefix in the build twice: |
|
it looks like some of the bins are probably shellscripts that need surgery for relocatability. |
|
this fixes the file-not-found issue: - run: |
LENGTH=$[$(head -n1 ocaml | wc -c)-1]
NEW_SHEBANG=$(printf "%-${LENGTH}s" "#!/usr/bin/env ocamlrun")
for BIN in $SHEBANGD; do
sed -i "1s|.*|$NEW_SHEBANG|" $BIN
done
working-directory: '{{prefix}}/bin'
env:
SHEBANGD:
- ocaml
- ocamlc.byte
- ocamlcmt
- ocamlcp
- ocamldebug
- ocamldep.byte
- ocamldoc
- ocamllex.byte
- ocamlmklib
- ocamlmktop
- ocamlobjinfo.byte
- ocamlopt.byte
- ocamloptp
- ocamlprofbut it still has relocatability issues. Homebrew's recipe suggests build paths are baked into the output, and https://ocaml.org/docs/arm64-fix suggests the only fix is to match install path to build path. if that's true, then this isn't going to work without potentially massive changes to the underlying binaries. |
Adds a recipe for OCaml WITHOUT the Compiler Libraries, which are often unnecessary for everything but Opam. For Opam, we need that, btw.