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

Dream tutorial failing on Windows Opam 2.2.0~beta with cygwin due to linking issue #339

Open
sophie-xhonneux opened this issue Aug 30, 2024 · 2 comments

Comments

@sophie-xhonneux
Copy link

sophie-xhonneux commented Aug 30, 2024

I try to run the first tutorial of dream on Windows and it fails to build with dune with the following error:

3 |  (name main)
           ^^^^
/bin/bash: C:UsersnameAppDataLocalTempbuild_33ef3c_dunelongcmd71db52: No such file or directory
** Fatal error: Error during linking

File "caml_startup", line 1:
Error: Error during linking (exit code 2)

my opam switch looks as follows:

→  webtutorial  arch-x86_64.1,ocaml-base-compiler.5.1.0,ocaml-options-vanilla.1,system-mingw.1  ocaml-base-compiler = 5.1.0 | ocaml-system = 5.1.0

I installed Ocaml on windows by following https://opam.ocaml.org/blog/opam-2-2-0-windows/

@maxRN
Copy link
Contributor

maxRN commented Aug 31, 2024

Can you try with version 2.2.1? https://opam.ocaml.org/blog/opam-2-2-1/ I know there have been some bug fixes there, not sure if those address this specific issue, but it might be worth a shot.

@sophie-xhonneux
Copy link
Author

I managed to resolve the issue by installing cygwin separately (rather than managed through opam) and making sure it's path came before C:\Windows\System32\base.exe.

I think it's the same issue as described here https://discuss.ocaml.org/t/windows-compiler-support-in-opam-2-2-0-beta2/14648/22

Basically the command gets too long eventually and flexdll relies on the bash.exe see also ocaml/flexdll#138

Not a great solution, but good enough for now :)

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

No branches or pull requests

3 participants