The simple directions found all over the internet for installing Core using OPAM no longer work. What is the new way to install and use Core?
I think I tracked the problem down to a message on the ocaml-core mailing list about renaming several dependencies https://groups.google.com/forum/#!topic/ocaml-core/Te6LTiNBO08.
Paired down, the widely published installation instructions amount to two steps after installing opam itself:
$ opam install core
$ cat >> ~/.ocamlinit <<EOF
#use "topfind";;
#thread;;
#camlp4o;;
#require "core.top";;
#require "core.syntax";;
EOF
Following these directions result in an error about the "sexprlib.syntax" package missing when using ocaml
(or corebuild
, utop
, etc).
Failing directions can be found in this widely referenced ebook https://github.com/realworldocaml/book/wiki/Installation-Instructions#setting-up-and-using-utop and are reflected in directions here on Stackoverflow in questions such as: Ocaml utop library paths, Core module
What is the new way to set up Core?
opam install core
no longer seems to be sufficient since it does not pull in the new syntax packages. I am not sure if this is a dependency bug or not.
The recommended ocamlinit settings also seem wrong.
I found that the core 113.24.00 is defective and all the installation instructions on the net as of this writing are out of date.
Users must make the following corrective steps:
#require
references to packages ending in.syntax
from~/.ocamlinit
.corebuild
script without any references to syntax packages as found at https://github.com/janestreet/core/blob/master/corebuild.You may also remove the
#camlp4o;;
line from your.ocamlinit
as this library is no longer required by Core.