Docker for building Windows version of SWI-Prolog

I have created https://github.com/SWI-Prolog/docker-swipl-build-mingw, a docker that can be used to (cross) compile SWI-Prolog for Windows (32 bit and 64 bit). See the README.md for usage.

This automates the hugely complex process of getting all dependencies in place and build the system. It also works around a bug in the Ubuntu MinGW cross compilation suite that blocks PGO optimized compilation by using Fedora as the Linux base image.

Only tested on Ubuntu as host, but in theory this should allow anyone with Docker to build the Windows binaries from the sources with a simple command (and a lot of patience to build the initial Docker image).

5 Likes

Nice one Jan,

That should also be useful to pack developers
that need to distribute binaries, right ?

Thanks for making this available,

Nicos Angelopoulos

http://stoics.org.uk/~nicos

To some extend, as it provides the complete build environment and Windows emulation needed. In many cases it should be easy enough to compile a DLL for a pack using either a Windows installation and MinGW or cross-compiling from Linux. I don’t know how much the docker will help, but there probably are scenarios where it does.