Browse Source

Add some notes about setting up OCaml.

Andy Li 6 years ago
parent
commit
5810932c00
1 changed files with 5 additions and 1 deletions
  1. 5 1
      extra/BUILDING.md

+ 5 - 1
extra/BUILDING.md

@@ -16,7 +16,11 @@ The Haxe compiler is written in OCaml, so you have to set up an OCaml developmen
 
 To install OPAM on Unix (e.g. Mac, Linux) systems, follow the [instruction given by OPAM](https://opam.ocaml.org/doc/Install.html). On Windows, we recommend using the [Cygwin/MinGW-based OPAM environment provided by fdopen](https://fdopen.github.io/opam-repository-mingw/installation/), choose the 64-bit versions of everything.
 
-The Haxe compiler requires OCaml version 4.02 or higher.
+The Haxe compiler requires OCaml version 4.02 or higher. Since some of the OCaml libraries Haxe depends on were uploaded in the OPAM 2 format, you should use OPAM 2.x instead of OPAM 1.x.
+
+In case you messed up the OPAM installation, you can uninstall OPAM and remove `~/.opam`, which contains the OCaml switches (OCaml compilers and libraries), and start over.
+
+Also note that since OPAM 2 on Linux will try to use bubblewrap, which uses Linux user namespaces, which might not be available on environments like Docker or Windows Subsystem for Linux (WSL). In case of encountering related errors, use `--disable-sandboxing` during `opam init`.
 
 ## Installing dependencies