Using Opam, I’ve installed utop, core, core_extended, async, cohttp, etc. and configured my .ocamlinit file as shown in the Real World OCaml setup instructions. When I execute utop in a terminal, I receive the the following exception. Does anyone know how to resolve this issue? Thanks.
Findlib has been successfully loaded. Additional directives:
#require “package”;; to load a package
list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates “p,q,…”;; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
Exception:
Invalid_argument
“The ocamltoplevel.cma library from compiler-libs cannot be loaded inside the OCaml toplevel”.
Raised at file “pervasives.ml”, line 33, characters 25-45
Called from file “toplevel/toploop.ml”, line 468, characters 4-128
Called from file “toplevel/topdirs.ml”, line 144, characters 10-51
.ocamlinit:
(* Added by OPAM. *)
let () =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found -> ()
;;
(* ## added by OPAM user-setup for ocamltop / base ## 3ec62baf6f9c219ae06d9814069da862 ## you can edit, but keep this line *)
#use "topfind";;
#thread;;
#require "core.top";;
#require "core.syntax";;
#require "async";;
open Core
(* ## end of OPAM user-setup addition for ocamltop / base ## keep this line *)