This repository is an attempt to build SWI-Prolog using
Conda. We use conda-forge to get all the
dependencies. The anaconda suite can build SWI-Prolog except for
xpce that depends on several X11 packages that do not exist in
anaconda and the native UUID library that depends on ossuuid.
Platform notes
Initially build and tested on Linux. Provides a complete system.
Issues
ossuuidis missing, so using partial pure Prolog UUID library rather than nativelibdbpackage provides X64.dyliblibraries. Droppedbdbpackage- Building using GMP crashes. This is also the problem for the non-conda build, so we revert to the bundled LibBF
Builds using VS 2022.
Issues
- Not extensively tested
- Uses bundled LibBF for big integers and rational numbers
Download and prepare miniconda. Note that we require conda-forge
for packages. As is, this conflicts with defaults for building a
package, claiming a merge conflict related to mpi. There are several
suggesting for working around that. For me it worked to disable the
defaults channel.
Download from https://docs.conda.io/projects/miniconda/en/latest/
conda config --append channels conda-forge
conda config --set channel_priority strict
conda config --remove channels defaults
conda upgrade -c conda-forge --all
conda install conda-build
conda install conda-verify
conda build . 2>&1 | tee build.log
conda create -n swipl
conda activate swipl
conda install --use-local swi-prolog
conda build purge
-
Use the non-powershell here becasue
build_env_setup.batis not available for powershell.cd ~/miniconda3/conda-bld\swi-prolog_NNN call build_env_setup.bat cd build cmake --build --config Release
- Search "anaconda" and open the desired shell.
- Use the PowerShell prompt for
conda build
This repo was started before I found the conda-forge feedstock for SWI-Prolog at https://github.com/conda-forge/swi-prolog-feedstock. Eventually, this work will be merged into this conda-forge feedstock. As is, this recipe is cross-platform and deals with the latest release and notably with the Python interface.
In particular, we still must pay attention to conda-forge/swi-prolog-feedstock#18 (comment)