garrigue / lablgtk

LablGTK 2 and 3: an interface to the GIMP Tool Kit
https://garrigue.github.io/lablgtk
Other
90 stars 40 forks source link

Windows Dune Build #52

Open ejgallego opened 5 years ago

ejgallego commented 5 years ago

I am opening this issue to track:

First question is what should the right windows environment be, we got some interesting comments here: https://discuss.ocaml.org/t/preferred-ocaml-windows-environments-mainly-for-continuous-integration/3299/3 but I am not sure I fully understand all the nuances here. See also https://github.com/ocaml/ocaml-ci-scripts/issues/284

I tried to setup up Travis, however my knowledge of windows is too limited and the Travis windows environment is too bare-bones for me to know how to do it.

Regarding the Windows Dune build @MSoegtropIMC has commented:

I would say the issue is the option "-Wl,-luuid" in \build\lablgtk-3.0.beta4\_build\default\src\clink-gtk+-3.0.sexp. I think the option should be either "-ldopt "-link \"-Wl,-s\"" or just "-link -Wl,-s" so that flexlink forwards it to the system linker (see my comments in the lablgtk2 build in an old makecoq_mingw.sh). But the sexp file is auto generated on each build and I couldn't find out which magic leads to the effect that these options are in there. I searched the lablgtk and dune sources for uuid without success. So I don't know what to change in order to change these options.

XVilka commented 5 years ago

Travis for Windows is not very stable and convenient. If you need Windows I recommend to use either AppVeyor or Azure Pipelines.

ejgallego commented 5 years ago

@XVilka thanks, indeed our standard these days is Azure, however I wanted to see if I could use this as an excuse to try Travis on Windows [which is very convenient for small projects already on Travis, as in particular I find the Azure setup pretty cumbersome]

In fact I've failed to setup cygwin or anything that works so far :)

What kind of problems have you found?

XVilka commented 5 years ago

Biggest problems in my case were:

ejgallego commented 5 years ago

Thanks @XVilka ; we'll consider Azure again then.

MSoegtropIMC commented 5 years ago

Let me see if I can get a MinGW 64 Windows build running on Azure.

ejgallego commented 5 years ago

Let me see if I can get a MinGW 64 Windows build running on Azure.

Wonderful, thanks @MSoegtropIMC !

XVilka commented 4 years ago

Maybe GitHub Actions can be setup for building? Since essentially it is Azure with better GitHub integration.

MSoegtropIMC commented 4 years ago

I guess I first need to sort out the Cygwin issues on Azure - sorry that I had so little time for this the past months. Or is this fixed meanwhile? Or let's put the question in another way: has someone made a successful build with dune on Cygwin on Azure already? Or without cygwin (dune shouldn't need a bash but then Coq itself is only a small part of the story).

ejgallego commented 4 years ago

Hi @MSoegtropIMC , indeed we will use GitHub actions which basically are Azure. Gtk is supported by windows package managers so I don't expect a lot of trouble.

MSoegtropIMC commented 4 years ago

@ejgallego : ok, I will give it a try over the weekend.

ejgallego commented 4 years ago

See this @MSoegtropIMC https://discuss.ocaml.org/t/github-actions-for-ocaml-opam-now-available/4745

[also this may be of interest https://discuss.ocaml.org/t/how-viable-is-delivering-binaries-linked-to-cygwin-to-windows-customers/4775 ]