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

Dune can't compile on a ocaml-variants.4.14.1+msvc64c variant #5806

Closed
F-Loyer opened this issue Jan 26, 2024 · 5 comments
Closed

Dune can't compile on a ocaml-variants.4.14.1+msvc64c variant #5806

F-Loyer opened this issue Jan 26, 2024 · 5 comments

Comments

@F-Loyer
Copy link

F-Loyer commented Jan 26, 2024

Dune can't compile on a ocaml-variants.4.14.1+msvc64c switch.

# ocamlc -output-complete-exe -w -24 -g -o .duneboot.exe -I boot unix.cma boot/libs.ml boot/duneboot.ml
# link: missing operand
# Try 'link --help' for more information.
# link: extra operand « /libpath:C:/Users/frede/AppData/Local/opam/4.14.1+msvc64c/lib/ocaml »
# Try 'link --help' for more information.
# ** Fatal error: Error during linking

In fact, any program can't be compiled by ocamlc -output-complete-exe which trigger a wrong MSVC link command. ocamlc without -output-complete-exe is ok.

I am using Microsoft Studio Community 2022.

@kit-ty-kate
Copy link
Member

I’m not sure what opam (the tool) can do here. Could you open a ticket on dune or/and the compiler (4.14 is still maintained as it is an LTS) instead?

@F-Loyer
Copy link
Author

F-Loyer commented Jan 26, 2024

Ok, a new ticket is opened. ocaml/ocaml#12944

@kit-ty-kate
Copy link
Member

Looking at the answer there, could you show what the output of opam env --switch=4.14.1+msvc64c is?

@F-Loyer
Copy link
Author

F-Loyer commented Feb 24, 2024

The issue can be closed.

It deals with a conflict between the linker link from MSVC and the Cygwin linkcommand. One just have to make sure the acurate PATH is used when using MSVC.

@F-Loyer F-Loyer closed this as completed Feb 24, 2024
@kit-ty-kate
Copy link
Member

Sorry for the lack of update, just to note that this should be fixed by #5832 slotted for the next beta

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

2 participants