Search code examples
ocamlopam

What is OPAM system compiler?


I have 2 compiler versions :

opam switch list -i

4.04.0 C 4.04.0  Official 4.04.0 release
system I system  System compiler (4.02.3)

Questions :

What is the OPAM system compiler?

Is it just another word for "default" compiler ?


Solution

  • Opam itself is written in OCaml and needs a working runtime to create its environment. This is the system compiler. Depending on which of the instructions on the homepage you used, the compiler is installed by your Linux distribution or comes with the binary distribution. It should never be necessary to remove the system compiler, its only use is to compile the OCaml version you actually want to work with. A simple opam switch 4.02.3 (for example) should do the job. In the end, opam will output the instructions on how to modify your bashrc such that the search path contains the OCaml binary you selected.