[Unison-hackers] Unison 2.48 won't build in Cygwin

Andrew Schulman andrex at utexas.edu
Fri Jun 5 11:55:35 EDT 2015


> Windows build instructions for Unison 2.48.3:
> * Install the Protz version of OCaml. (
> http://protz.github.io/ocaml-installer/)
>     - If planning cross-platform use, be warned that apps built using OCaml
> 4.01 and 4.02 are binary incompatible!
> * Start a Cygwin shell (even when not linking against the Cygwin DLL).
> * Update PATH so that the Protz /bin dir is first.
> * 'cd' into the Unison source directory.
> * Edit Makefile.OCaml to use "-Fo" instead of "/Fo".
> * export OSARCH=win32
> * make clean && make UISTYLE=text STATIC=false
>     - Need STATIC=false because STATIC=true passes unrecognized "-static"
> argument to OCaml's 'flexdll'.
> * Upon link error, change the failed 'ocamlopt' command line as follows,
> and run manually:
>     - REMOVE this trailing part:  -cclib "-link [...].res" shell32.lib
>     - FIX .obj filenames:  change ".obj" to ".o" and remove any DIR/
> prefixes from those files

Thanks very much.  I'm not familiar with the Protz version of OCaml, and it's
better if I can use the version that comes with Cygwin.  But your instructions
gave me the idea to start fooling around with OSARCH, and I found the following
solution:  Just run

    make UISTYLE=text OSARCH=Cygwin

With that 2.48.3 builds OOTB in Cygwin - no patches are required.  There's no
code in Makefile.OCaml for OSARCH=Cygwin, so what that ends up doing is just
building Unison as a generic Unix build, which turns out to work perfectly.

Thanks for your help!
Andrew



More information about the Unison-hackers mailing list