Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move towards OCaml 5 #9

Open
Simn opened this issue Jan 6, 2024 · 0 comments
Open

Move towards OCaml 5 #9

Simn opened this issue Jan 6, 2024 · 0 comments

Comments

@Simn
Copy link
Member

Simn commented Jan 6, 2024

I would like to use OCaml 5 on Windows and have been looking into making it work. This repository seems like a good place to log some issues I've come across.

opam 2.2

Opam 2.2 is supposed to have improved Windows support, but so far I've not really seen that. My opam repo now ends up in c:\users\simn\AppData\Local\opam, which I'm not sure is right for a mingw-based tool from cygwin. Some libraries have issues with absolute paths no longer starting with / (see below). There also seems to be some conflation between mingw64 and mscv64 which has to be sorted out. Opam 2.2 is still in alpha, so things will hopefully improve. There's also a good change that I'm just doing something wrong.

prims.c

I ran into the issue with prims.c that is mentioned in the readme here, and reported it to opam. In my case I am using Cygwin git, but I was using it from cmd.exe which didn't work. In my case it came from building opam itself, so I'm not sure why the problem came up here.

ocamlbuild

When installing sedlex, it wants to install uchar and that wants to install ocamlbuild. This in turn lead to some problem with stat on a symlink. I have reported that and so far learned that it's not supposed to use ocamlbuild on Windows in the first place, but rather an ocamlbuild+win variant. Why this happens in my setup remains to be seen.

camlp5

Oh man, this thing... I've had all sorts of issues with this library, and by now I can't even install it on 4.09.0 anymore:

�[K[ERROR] The compilation of camlp5 failed at "./configure --prefix C:/cygwin64/home/simn/.opam/4.09.0+mingw64c -libdir C:/cygwin64/home/simn/.opam/4.09.0+mingw64c/lib -mandir
        C:/cygwin64/home/simn/.opam/4.09.0+mingw64c/man".

#=== ERROR while compiling camlp5.8.00.04 =====================================#
# context     2.0.10 | win32/x86_64 | ocaml-variants.4.09.0+mingw64c | git+https://github.com/ocaml/opam-repository.git
# path        ~/.opam/4.09.0+mingw64c/.opam-switch/build/camlp5.8.00.04
# command     ./configure --prefix C:/cygwin64/home/simn/.opam/4.09.0+mingw64c -libdir C:/cygwin64/home/simn/.opam/4.09.0+mingw64c/lib -mandir C:/cygwin64/home/simn/.opam/4.09.0+mingw64c/man
# exit-code   2
# env-file    ~/.opam/log/camlp5-33472-42bb52.env
# output-file ~/.opam/log/camlp5-33472-42bb52.out
### output ###
# The -prefix directory must be absolute.

As mentioned above, I don't know why it's now using c:/cygwin64 instead of / from within cygwin. Advice appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant