Have working installation of OCaml with base and utop installed. However installation of core fails:
▶ opam install core
The following actions will be performed:
- install ppx_string v0.14.0 [required by ppx_jane]
- install ppx_jane v0.14.0 [required by core]
- install base_bigstring v0.14.0 [required by core_kernel]
- install core_kernel v0.14.0 [required by core]
- install timezone v0.14.0 [required by core]
- install core v0.14.0
===== 6 to install =====
Do you want to continue? [Y/n] Y
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[base_bigstring.v0.14.0] found in cache
[core.v0.14.0] found in cache
[core_kernel.v0.14.0] found in cache
[ppx_jane.v0.14.0] found in cache
[ppx_string.v0.14.0] found in cache
[timezone.v0.14.0] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of ppx_string failed at
"/Users/joe/.opam/opam-init/hooks/sandbox.sh build dune build -p ppx_string
-j 3".
#=== ERROR while compiling ppx_string.v0.14.0 =================================#
# context 2.0.7 | macos/x86_64 | ocaml-base-compiler.4.11.0 | https://opam.ocaml.org#09cf053f
# path ~/.opam/4.11.0/.opam-switch/build/ppx_string.v0.14.0
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p ppx_string -j 3
# exit-code 1
# env-file ~/.opam/log/ppx_string-36404-dc6e87.env
# output-file ~/.opam/log/ppx_string-36404-dc6e87.out
### output ###
# [...]
# File "src/ppx_string.ml", line 98, characters 6-32:
# 98 | Stdio.In_channel.with_file loc.loc_start.pos_fname ~f:(fun ic ->
# ^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: Unbound module Stdio
# Hint: Did you mean Stdlib?
# ocamlc src/.ppx_string.objs/byte/ppx_string.{cmo,cmt} (exit 2)
# (cd _build/default && /Users/joe/.opam/4.11.0/bin/ocamlc.opt -w -40 -g -bin-annot -I src/.ppx_string.objs/byte -I /Users/joe/.opam/4.11.0/lib/base -I /Users/joe/.opam/4.11.0/lib/base/base_internalhash_types -I /Users/joe/.opam/4.11.0/lib/base/caml -I /Users/joe/.opam/4.11.0/lib/base/shadow_stdlib -I /Users/joe/.opam/4.11.0/lib/ocaml-compiler-libs/common -I /Users/joe[...]
# File "src/ppx_string.ml", line 98, characters 6-32:
# 98 | Stdio.In_channel.with_file loc.loc_start.pos_fname ~f:(fun ic ->
# ^^^^^^^^^^^^^^^^^^^^^^^^^^
# Error: Unbound module Stdio
# Hint: Did you mean Stdlib?
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build ppx_string v0.14.0
+-
- No changes have been performed
Moreover, I am not sure why the error message includes “Error: Unbound module Stdio” since Opam reports that Stdio is installed.
I have no idea where to begin to fix this. Any help or suggestions would be most welcome.