otp icon indicating copy to clipboard operation
otp copied to clipboard

Use llvm-mingw or clang-cl to compile Erlang for Windows 64

Open fire opened this issue 4 years ago • 6 comments

Is your feature request related to a problem? Please describe. I want to compile Erlang for Windows on a Linux machine.

Describe alternatives you've considered There is currently no way to compile Erlang for Windows on Linux.

Additional context I think it is possible to use llvm-mingw or clang-cl on Fedora Linux to compile Erlang.

Has anyone tried?

LINKFLAGS='-Wl,-pdb=' CCFLAGS='-g -gcodeview' allow generating pdbs for the dlls with mingw-llvm

fire avatar Jan 22 '22 03:01 fire

I did some experimentation a couple of years ago and the problem then was that there was no simple way to get access to the headers and dll's needed to compile Erlang/OTP. It would be great if we could cross compile from linux to Winwdows, so if anyone wants to explore this that would be awesome!

garazdawi avatar Jan 24 '22 10:01 garazdawi

Are you able to provide support? Can I can contact you in an interactive channel?

fire avatar Jan 25 '22 17:01 fire

Are you able to provide support?

I'll try to answer any questions that you may have in this issue. I don't know anything about how to cross-compile to windows, but I do know quite a bit about how the Erlang/OTP cross-compile support works.

One large problem I think will be to cross-compile crypto (and wxwidgets if you want that).

garazdawi avatar Jan 26 '22 08:01 garazdawi

Gathering the WSL1 steps to compile Erlang from desktop for a future date.

Reference

https://github.com/elixir-desktop/deployment

fire avatar Jan 26 '22 16:01 fire

Can reference this https://github.com/diodechain/otp/blob/diode/beta/.github/workflows/main.yaml for an otp build.

fire avatar Feb 06 '22 10:02 fire

I wonder if there is a chance of swapping back from WSL1 to something that works in Docker for Windows. It would allow me to easily add Windows support for CI/CD for OTP. Have you tried recovering MSYS2? http://erlang.org/documentation/doc-11.0-rc3/doc/installation_guide/INSTALL-WIN32.html

max-au avatar Feb 20 '22 14:02 max-au