Skip to content

SWI-Prolog/docker-swipl-build-mingw

Repository files navigation

Docker to cross-compile SWI-Prolog for Windows

This docker builds SWI-Prolog for Windows using the MinGW cross-compilation toolchain from Linux. Usage:

  • Get source tree if you don't have it already
	git clone https://github.com/SWI-Prolog/swipl-devel.git
        git -C swipl-devel submodule update --init
  • Setup docker-swipl-build-mingw
	git clone https://github.com/SWI-Prolog/docker-swipl-build-mingw.git
	git -C docker-swipl-build-mingw submodule update --init
  • Edit Makefile to make $SWIPLSRC point at a checked out source tree normally obtained using
	git clone https://github.com/SWI-Prolog/swipl-devel.git
	git submodule update --init
  • By default, the Docker image creates a user swipl with the UID and GID of the user that creates the image. This user/group is used for the build process. Edit GID and UID in Makefile if you want a different scenario.

  • Create the Docker image using the command below. This takes quite long. The image is pretty big (6.71Gb)

	make image
  • Run the image using the command below. This create an X11 headless server for running Wine. If debugging is required it may be wise to run make run11 which sets up X11 forwarding, making Wine windows appear on your X11 deskop (requires a Unix host).
	make run
  • The commands below create a fresh build.win64 directory, configures, builds and packages SWI-Prolog for Windows 64
	build_win64

Issues

  • The SSL test suite is currently not built. There is an issue running openssl.exe in wine in a Docker container with the random seeding.

Considerations

The Docker is built on Fedora (latest) as this distro seems to have a good balance between stability and providing up-to-date development tools. Notably the MinGW tool suite provides a lot of the dependencies we need and, unlike its Ubuntu (20.04) equivalent, PGO compilation works.

Automatic builds

You can also download the image using

docker pull ghcr.io/swi-prolog/swipl-mingw-build:latest

About

Docker to cross-compile SWI-Prolog for Windows

Resources

Stars

4 stars

Watchers

2 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors