I'm a novice to Linux and OCAML. I gather that getting OCaml working on Windows is not straight forward. I found this link:
https://www.cs.umd.edu/class/spring2018/cmsc330/ocamlInstallationGuide.pdf#page=14&zoom=100,0,96
However, I suspect it's some what dated as they refer to 4.04 being the latest OCaml version and there currently is a 4.07. I further suspect that OCaml now requires bwrap
and that is the source of my problems and question.
I stress that I just want to get OCaml working on Windows. If there is a much easier way than using WSL (Windows Subsystem for Linux), I'll happily do that.
When creating a switch with:
opam switch create ocaml-base-compiler.4.07.0,
I get the following error:
bwrap: Creating new namespace failed, likely because the kernel does not support user namespaces. bwrap must be installed setuid on such systems.
I gather I need bwrap and have tried various commands such as:
wget https://mirrors.edge.kernel.org/ubuntu/pool/main/b/bubblewrap/bubblewrap_0.3.1-2_amd64.deb
followed by:
sudo dpkg -i bubblewrap_0.3.1-2_amd64.deb
Installation appeared to go fine but I still get the error. I must admit I don't know what bwrap must be installed setuid on such systems
means.
1) How should I install bwrap?
This site:
https://github.com/projectatomic/bubblewrap/issues/139
seems to indicate it may not be possible to get bwrap working on Windows period: "Flatpak and bubblewrap require Linux. WSL is not Linux, it's Windows pretending to be Linux, and it does not have the full feature-set of a modern Linux kernel. As far as I am aware, it doesn't implement namespaces, so you are out of luck."
2) Can I get OCaml up and running on Windows using WSL or is there a better approach?
Finally, I'm not wedded to Ubuntu. If there is a better/easier distribution to use with WSL for purposes of installing OCAML I have no problems changing!
Thanks, Dave