Hello! Newbie here interested in learning OCaml. When trying to do the setup for Windows as described here OCaml on Windows · OCaml Documentation, I get this error:
Any help would be greatly appreciated. I’ve also posted to Stack Overflow.
Thank you!
(I’m aiming to learn along the advent-of-code challenges)
Edit:
I solved the issue. There was a problem with an incorrect gcc version being prioritised in the PATH. Identifying the correct version and adding it to path, superseding the incorrect version (I removed the wrong version), solved it for me!
This makes me very happy - have fun, and I hope you get to stay using OCaml on Windows!
This sounds like a bug, given that you were clearly using opam’s internally managed Cygwin installation. Can you share the PATH to gcc which was causing the problem and possibly what software package had installed it?
I’m sorry - I’d missed your original Discuss post! This isn’t quite the same issue, as the failure here is within a package build. For pragmatic reaons, Cygwin’s bin directory is made available while packages are being compiled (or you wouldn’t compile OCaml!), but the idea is that once the packages are built, one is at least trying to use native Windows.
Unfortunately, adding Cygwin’s bin directory to PATH is not trivial - but the full explanation of why is the opam PR of mine you referenced.
That’s great, thanks - out of curiosity, did you re-try the opam installation in between removing Strawberry Perl and adding C:\Users\axele\AppData\Local\opam\.cygwin\root\bin to PATH (i.e. from what you remember you did, was the second step definitely necessary?)