[opam-devel] OPAM on Windows (1.3 Roadmap)

Anil Madhavapeddy anil at recoil.org
Sun Nov 2 20:52:50 GMT 2014


On 2 Nov 2014, at 20:48, David Allsopp <david.allsopp at metastack.com> wrote:
> 
> My experience (based on my own installation of around 45 or so OCaml and
> OCaml-related packages) is that building for Windows usually just involves
> overriding some lazy assumptions in build systems (for example, the most
> common one being the assumption "we're building on Windows" => "object files
> end in .obj") so nothing which can't be quickly committed upstream, or
> applied in opam-repository patches. I don't expect there will be "generic"
> fixes, beyond trying to cp "foo.exe" if "foo" cannot be found in a .install
> file (which I'm coding up anyway in my fork). What may be useful is to have
> certain non-OCaml packages packaged up in OPAM for Windows-only - for
> example, openssl, pcre and so on to deal with libraries which aren't
> normally packaged for Windows.

While a fork of the repository is possible, in the long (or medium) term I'd
prefer that we just put the Windows-specific build rules in the OPAM file,
guarded by a {os = "windows"} constraint or similar.

That way we can start feeding back patches upstream as we get things working
and tested.  I'm not sure if the "os" variable actually gets set to "windows"
in current OPAM though... perhaps Cygwin or something similar.

-anil



More information about the opam-devel mailing list