Hello,
I’m a Windows 10 user and I want to code in OCaml with Emacs.
But I have some issues:
I have installed Ubuntu via the Microsoft Store in order to have the WSL.
I followed some tutorial and I am sure that I have the 4.08.1 OCaml build installed, but I can’t upgrade it because I get some error message each time :
I have the latest version of Emacs installed with the Tuareg mode, but I couldn’t evaluate my code.
I’ve been told I didn’t add the directory of ocaml to the path. But what directory do I have to add? I can’t manage to find an “ocaml.exe” or something like that even though I can code with OCaml on Ubuntu. I suspect the fact that I installed binary files for Linux and not for Windows, as it is written on the OCaml installation page for Windows.
I am aware that I could I use some VM shenanigans, but I really don’t want that.
Have you run opam init? (Normally, you don’t need to run opam install ocaml, and normally you’d do something along the lines of opam switch create 4.13.1 instead)
Have you installed bubblewrap and m4? (Based on the opam output, I suspect that bubblewrap in already installed, but try running sudo apt install bubblewrap m4 if you haven’t).
For the 4.08.1 build, what was that installation method?
-Yes (checked on the PowerShell)
-Yes (unzipped something that I installed via the Ocaml website)
-No I’m not, I will look into it
-Yes (I get the same error with opam switch create 4.13.1)
-I didn’t thought so but apparently I did.
-And I have no idea, maybe it was something I installed that was needed for somethig else.
Upgrading Ubuntu to WSL 2 will fix the bwrap errors if you don’t want to reinit. Not sure if it’s a supported use case, but I’ve run opam with sandboxing under WSL2. IIRC, you have to run PowerShell with administrative privileges and run wsl --set-version Ubuntu 2.
I tried but it didn’t work at first. Now that I’ve done some more work, I have WSL2.
But opam switch create 4.13.1 stille doesn’t work, as on the screen.