# Pack

**URL:** https://swi-prolog.discourse.group/c/help/pack/25.md

[Latest](https://swi-prolog.discourse.group/latest.md) · [Categories](https://swi-prolog.discourse.group/categories.md) · [Tags](https://swi-prolog.discourse.group/tags.md)

---

## [About the Pack category](https://swi-prolog.discourse.group/t/about-the-pack-category/2669)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 0

</div>

Use this when you need help with a Pack. Packs are different from Packages. Packages are added during build time or when installing SWI-Prolog, Pack(s) can be installed and removed after installation.

---

## [What changed in library(macros)](https://swi-prolog.discourse.group/t/what-changed-in-library-macros/9733)

<div class="topic-metadata">

**Author:** [@BJooze](https://swi-prolog.discourse.group/u/BJooze)\
**Replies:** 10\
**Last updated:** [July 28, 2026, 3:08pm UTC](https://swi-prolog.discourse.group/t/what-changed-in-library-macros/9733 "2026-07-28T15:08:40Z")

</div>

I’ve been using a few simple macros - starting in 9.2.9. After recently switching to 1.0.2 and changing nothing in my own code, all the sudden I cannot for the life of me get any (#define/#import) macros to work. I’m cur…

---

## [Issue Loading XPCE Graphics Library (Version 10.0.0)](https://swi-prolog.discourse.group/t/issue-loading-xpce-graphics-library-version-10-0-0/9481)

<div class="topic-metadata">

**Author:** [@Denzel](https://swi-prolog.discourse.group/u/Denzel)\
**Replies:** 3\
**Last updated:** [January 18, 2026, 9:29am UTC](https://swi-prolog.discourse.group/t/issue-loading-xpce-graphics-library-version-10-0-0/9481 "2026-01-18T09:29:24Z")

</div>

Hello everyone, I’m having an issue. I’m trying to use XPCE for a project, but SWI-Prolog can’t find the PCE library. I’m using the latest stable version (10.0.0), Does anyone know what happened?

---

## [Packs with foreign code - Makefile and CMakeLists.txt in same pack - questions](https://swi-prolog.discourse.group/t/packs-with-foreign-code-makefile-and-cmakelists-txt-in-same-pack-questions/9464)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 1\
**Last updated:** [December 28, 2025, 2:41pm UTC](https://swi-prolog.discourse.group/t/packs-with-foreign-code-makefile-and-cmakelists-txt-in-same-pack-questions/9464 "2025-12-28T14:41:23Z")

</div>

In working with the pack which currently has a Makefile for building looking to add the ability to build for native Windows using a CMakeLists.txt. The SWI-Prolog documentation page for Packs with foreign code notes …

---

## [MacOS pack install without Xcode](https://swi-prolog.discourse.group/t/macos-pack-install-without-xcode/9255)

<div class="topic-metadata">

**Author:** [@ridgeworks](https://swi-prolog.discourse.group/u/ridgeworks)\
**Replies:** 19\
**Last updated:** [September 14, 2025, 7:02am UTC](https://swi-prolog.discourse.group/t/macos-pack-install-without-xcode/9255 "2025-09-14T07:02:04Z")

</div>

Trying to do a pack\_install on a new Mac laptop with no Apple developer tools installed, e.g., ?- pack\_install(clpBNR). % Contacting server at https://www.swi-prolog.org/pack/query ... ok Installation plan: Install cl…

---

## [A strange behavior of CHR package](https://swi-prolog.discourse.group/t/a-strange-behavior-of-chr-package/4964)

<div class="topic-metadata">

**Author:** [@chansey97](https://swi-prolog.discourse.group/u/chansey97)\
**Replies:** 5\
**Last updated:** [May 31, 2025, 7:17pm UTC](https://swi-prolog.discourse.group/t/a-strange-behavior-of-chr-package/4964 "2025-05-31T19:17:19Z")

</div>

This is a further discussion about the issue on Github. For the following program %% test.pl :- use\_module(library(chr)). :- chr\_constraint c/2. c(K,\_I), c(K,\_J) \<=\> writeln('rule 1 fired'). c(\_I,K), c(\_J,K) \<=\> writ…

---

## [Mutually exclusive clp(BNR) constraints](https://swi-prolog.discourse.group/t/mutually-exclusive-clp-bnr-constraints/8933)

<div class="topic-metadata">

**Author:** [@Rscho314](https://swi-prolog.discourse.group/u/Rscho314)\
**Replies:** 5\
**Last updated:** [April 12, 2025, 3:41pm UTC](https://swi-prolog.discourse.group/t/mutually-exclusive-clp-bnr-constraints/8933 "2025-04-12T15:41:28Z")

</div>

Hi, I’m trying to compute constraints on a list of boolean pairs. Essentially, I want this, but yielding clp(BNR) constraints instead of enumerating solutions: core\_(\[\],0,0). core\_(\[K-V|T\],Tp,Fp):- \[K,V\]::boolean, …

---

## [How to embed Python into Prolog on MacOS?](https://swi-prolog.discourse.group/t/how-to-embed-python-into-prolog-on-macos/8766)

<div class="topic-metadata">

**Author:** [@AZH](https://swi-prolog.discourse.group/u/AZH)\
**Replies:** 2\
**Last updated:** [February 3, 2025, 10:20am UTC](https://swi-prolog.discourse.group/t/how-to-embed-python-into-prolog-on-macos/8766 "2025-02-03T10:20:42Z")

</div>

Hello there! After reading the README of Janus-SWI GitHub - SWI-Prolog/packages-swipy: Python interface for SWI-Prolog , I am still unsure how to embed Python into Prolog on MacOS. Do I need to install a Homebrew or Mac…

---

## [Installing janus\_swi on Windows](https://swi-prolog.discourse.group/t/installing-janus-swi-on-windows/8629)

<div class="topic-metadata">

**Author:** [@Remifa](https://swi-prolog.discourse.group/u/Remifa)\
**Replies:** 9\
**Last updated:** [November 29, 2024, 2:21pm UTC](https://swi-prolog.discourse.group/t/installing-janus-swi-on-windows/8629 "2024-11-29T14:21:33Z")

</div>

I probably need the .whl version for the janus installation as my PC is operating off-line. I get the following results trying to upgrade to the new version of janus: py -3.11 -m pip install --no-build-isolation "H:\\..…

---

## [SWISH: sandboxing clp(BNR)](https://swi-prolog.discourse.group/t/swish-sandboxing-clp-bnr/8592)

<div class="topic-metadata">

**Author:** [@Rscho314](https://swi-prolog.discourse.group/u/Rscho314)\
**Replies:** 1\
**Last updated:** [November 10, 2024, 4:17pm UTC](https://swi-prolog.discourse.group/t/swish-sandboxing-clp-bnr/8592 "2024-11-10T16:17:29Z")

</div>

Hi, I registered clp(BNR) as a SWISH Git submodule on my local SWISH instance, ran make pack and tried to run the following program with the empty program profile: :-use\_module(library(clpBNR)). test\_rule(A,B):- A…

---

## [App provided by a pack found by \`app list\` but not when run…](https://swi-prolog.discourse.group/t/app-provided-by-a-pack-found-by-app-list-but-not-when-run/7720)

<div class="topic-metadata">

**Author:** [@soli](https://swi-prolog.discourse.group/u/soli)\
**Replies:** 2\
**Last updated:** [August 23, 2024, 10:41am UTC](https://swi-prolog.discourse.group/t/app-provided-by-a-pack-found-by-app-list-but-not-when-run/7720 "2024-08-23T10:41:18Z")

</div>

I’m trying to provide an app from a pack and I’m a bit puzzled by what I observe. The app is some foo.pl file in the app subdirectory of a pack. When I install the pack, I correctly get foo listed by swipl app list Ho…

---

## [SQLite dependency in a pack](https://swi-prolog.discourse.group/t/sqlite-dependency-in-a-pack/7620)

<div class="topic-metadata">

**Author:** [@Boris](https://swi-prolog.discourse.group/u/Boris)\
**Replies:** 12\
**Last updated:** [July 31, 2024, 5:37pm UTC](https://swi-prolog.discourse.group/t/sqlite-dependency-in-a-pack/7620 "2024-07-31T17:37:40Z")

</div>

I found time to work on my (probably misguided) effort of having yet another way of interfacing SWI-Prolog with SQLite. On the way I learned something I knew and have already forgotten. From the SQLite docs: The use of…

---

## [How to change the url of the code of a pack](https://swi-prolog.discourse.group/t/how-to-change-the-url-of-the-code-of-a-pack/6139)

<div class="topic-metadata">

**Author:** [@friguzzi](https://swi-prolog.discourse.group/u/friguzzi)\
**Replies:** 8\
**Last updated:** [July 22, 2024, 12:52pm UTC](https://swi-prolog.discourse.group/t/how-to-change-the-url-of-the-code-of-a-pack/6139 "2024-07-22T12:52:49Z")

</div>

Hi, I’m updating the lbfgs pack https://www.swi-prolog.org/pack/list?p=lbfgs and I would like the pack to point to GitHub - friguzzi/lbfgs: An interface to call libLBFGS from within SWI-Prolog However, if you do pac…

---

## [Running IO Operations from Python with Janus](https://swi-prolog.discourse.group/t/running-io-operations-from-python-with-janus/7410)

<div class="topic-metadata">

**Author:** [@JosephOziel](https://swi-prolog.discourse.group/u/JosephOziel)\
**Replies:** 4\
**Last updated:** [April 28, 2024, 4:43pm UTC](https://swi-prolog.discourse.group/t/running-io-operations-from-python-with-janus/7410 "2024-04-28T16:43:17Z")

</div>

I am trying to create a midi file using the python midiutil library. Here is my code: :- module(midi, \[main/1\]). :- use\_module(library(janus), \[py\_call/1, py\_call/2\]). % you need midiutil installed % pip install midiut…

---

## [Pack operations fail after upgrading swi-prolog to 9.2.1](https://swi-prolog.discourse.group/t/pack-operations-fail-after-upgrading-swi-prolog-to-9-2-1/7247)

<div class="topic-metadata">

**Author:** [@jinwoo](https://swi-prolog.discourse.group/u/jinwoo)\
**Replies:** 11\
**Last updated:** [February 19, 2024, 5:04pm UTC](https://swi-prolog.discourse.group/t/pack-operations-fail-after-upgrading-swi-prolog-to-9-2-1/7247 "2024-02-19T17:04:52Z")

</div>

I reported \`pack\` operations fail with \`close\_range\` · Issue #164 · SWI-Prolog/packages-http · GitHub but am also reporting here. Most of the pack operations seem to fail with swi-prolog 9.2.1, and I can’t install any pa…

---

## [Package of CHR with dynamic rule priorities?](https://swi-prolog.discourse.group/t/package-of-chr-with-dynamic-rule-priorities/4874)

<div class="topic-metadata">

**Author:** [@chansey97](https://swi-prolog.discourse.group/u/chansey97)\
**Replies:** 16\
**Last updated:** [December 30, 2023, 2:03pm UTC](https://swi-prolog.discourse.group/t/package-of-chr-with-dynamic-rule-priorities/4874 "2023-12-30T14:03:44Z")

</div>

Recently I have read some papers about CHR(Constraint Handling Rules). It is indeed a very powerful language (especially for expressing algorithm’s intent) and in most cases the refined operational semantics is sufficien…

---

## [C++ foreign interface error](https://swi-prolog.discourse.group/t/c-foreign-interface-error/6832)

<div class="topic-metadata">

**Author:** [@lug](https://swi-prolog.discourse.group/u/lug)\
**Replies:** 5\
**Last updated:** [September 10, 2023, 10:25pm UTC](https://swi-prolog.discourse.group/t/c-foreign-interface-error/6832 "2023-09-10T22:25:35Z")

</div>

It was working before but oddly it isn’t. I don’t remember what version I was using when it worked. I’d appreciate any ideas on solving the issue. v8 I get the same ‘undefined reference’ error as below. C:\\Users\\Co…

---

## [Yaml's treatment of single letter values](https://swi-prolog.discourse.group/t/yamls-treatment-of-single-letter-values/6523)

<div class="topic-metadata">

**Author:** [@DewayneG](https://swi-prolog.discourse.group/u/DewayneG)\
**Replies:** 2\
**Last updated:** [May 4, 2023, 8:38pm UTC](https://swi-prolog.discourse.group/t/yamls-treatment-of-single-letter-values/6523 "2023-05-04T20:38:10Z")

</div>

In yaml, keys appear on the left of a colon and values on the right. Values are generally strings or numbers. However the value of the letter e is supposed to be of type string, but its reproducibly an atom. I would l…

---

## [Answers to queries not written to stdout on WASM + Node](https://swi-prolog.discourse.group/t/answers-to-queries-not-written-to-stdout-on-wasm-node/6476)

<div class="topic-metadata">

**Author:** [@atava](https://swi-prolog.discourse.group/u/atava)\
**Replies:** 4\
**Last updated:** [April 19, 2023, 11:52am UTC](https://swi-prolog.discourse.group/t/answers-to-queries-not-written-to-stdout-on-wasm-node/6476 "2023-04-19T11:52:54Z")

</div>

For what I can gather from the source, the WASM shell example relies on the on\_output function both for showing SWI-Prolog messages and answers to queries (the latter are sent to the stdout stream). Running on Node, ans…

---

## [Firebase Functions + SWI-Prolog WASM (Node) - Memory build-up issue](https://swi-prolog.discourse.group/t/firebase-functions-swi-prolog-wasm-node-memory-build-up-issue/6435)

<div class="topic-metadata">

**Author:** [@atava](https://swi-prolog.discourse.group/u/atava)\
**Replies:** 5\
**Last updated:** [April 3, 2023, 9:50pm UTC](https://swi-prolog.discourse.group/t/firebase-functions-swi-prolog-wasm-node-memory-build-up-issue/6435 "2023-04-03T21:50:12Z")

</div>

A few years ago I wanted to try to plug a serverless Prolog service to a Web app and I successfully managed to have SP running on a Google Cloud Run container (Cloud Run is a service firing container instances to serve r…

---

## [FFI pack installation failure](https://swi-prolog.discourse.group/t/ffi-pack-installation-failure/6288)

<div class="topic-metadata">

**Author:** [@jamesnvc](https://swi-prolog.discourse.group/u/jamesnvc)\
**Replies:** 2\
**Last updated:** [February 22, 2023, 11:06am UTC](https://swi-prolog.discourse.group/t/ffi-pack-installation-failure/6288 "2023-02-22T11:06:32Z")

</div>

Trying to install library(ffi), I get an error saying source\_sink pack\_build\_path(autoheader)’ does not exist\`. My understand is that this is due to the legacy build system the pack is using…is there a simple fix?

---

## [\[SWIPL\] cplint package unreachable](https://swi-prolog.discourse.group/t/swipl-cplint-package-unreachable/5939)

<div class="topic-metadata">

**Author:** [@blllne2](https://swi-prolog.discourse.group/u/blllne2)\
**Replies:** 1\
**Last updated:** [November 15, 2022, 4:21pm UTC](https://swi-prolog.discourse.group/t/swipl-cplint-package-unreachable/5939 "2022-11-15T16:21:20Z")

</div>

Dear all, It seems that the cplint package: https://www.swi-prolog.org/pack/list?p=cplint is unreachable (Error 503). May someone check what’s going on? Thanks very much, Elena Bellodi

---

## [clpBNR: B or B](https://swi-prolog.discourse.group/t/clpbnr-b-or-b/5796)

<div class="topic-metadata">

**Author:** [@swi](https://swi-prolog.discourse.group/u/swi)\
**Replies:** 27\
**Last updated:** [October 13, 2022, 12:39am UTC](https://swi-prolog.discourse.group/t/clpbnr-b-or-b/5796 "2022-10-13T00:39:07Z")

</div>

I was playing around with clpBNR and leap years and found the following: :- use\_module(library(clpBNR)). % constraints-only version leap(Y) :- Y::integer(1583,\_), \[Q0,Q1,Q2\]::integer(1,\_), \[R0,R1,R2\]::integer(…

---

## [Problems compiling Rocksdb](https://swi-prolog.discourse.group/t/problems-compiling-rocksdb/5701)

<div class="topic-metadata">

**Author:** [@pegesund](https://swi-prolog.discourse.group/u/pegesund)\
**Replies:** 35\
**Last updated:** [August 22, 2022, 6:27pm UTC](https://swi-prolog.discourse.group/t/problems-compiling-rocksdb/5701 "2022-08-22T18:27:52Z")

</div>

Hi, I am having trouble compiling the rocksdb-module on Linux. I get pretty many of these errors: error: conversion from ‘PlTerm’ to ‘bool’ is ambiguous Swipl version is 8.4.3 and gcc version is 12.1.1 - any clues? B…

---

## [Different results when using library(simplex) or R-package lpSolve / lpSolveAPI](https://swi-prolog.discourse.group/t/different-results-when-using-library-simplex-or-r-package-lpsolve-lpsolveapi/5545)

<div class="topic-metadata">

**Author:** [@BenEngbers](https://swi-prolog.discourse.group/u/BenEngbers)\
**Replies:** 6\
**Last updated:** [July 13, 2022, 2:38pm UTC](https://swi-prolog.discourse.group/t/different-results-when-using-library-simplex-or-r-package-lpsolve-lpsolveapi/5545 "2022-07-13T14:38:01Z")

</div>

Hi, One of the exercises from the course material for the Linear Programming course, involved baking cakes. For chocolate, vanilla, and lemon cakes it is known how many eggs and how much flour are needed and what is the…

---

## [Pack RocksDB, build fails on Ubuntu 22.04 LTS on WSL on Windows (reproducible)](https://swi-prolog.discourse.group/t/pack-rocksdb-build-fails-on-ubuntu-22-04-lts-on-wsl-on-windows-reproducible/5559)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 22\
**Last updated:** [July 2, 2022, 3:53pm UTC](https://swi-prolog.discourse.group/t/pack-rocksdb-build-fails-on-ubuntu-22-04-lts-on-wsl-on-windows-reproducible/5559 "2022-07-02T15:53:11Z")

</div>

Build of RocksDB for pack RocksDB fails and is reproducible. OS: Ubuntu 22.04 LTS on WSL 2 on Windows 10 SWI-Prolog: 8.5.13 After first fail of building RocksDB pack, downloaded RocksDB into ~\\rocksdb and successfully…

---

## [Progress monitoring using HTTP client](https://swi-prolog.discourse.group/t/progress-monitoring-using-http-client/5344)

<div class="topic-metadata">

**Author:** [@gavin.mendel.gleason](https://swi-prolog.discourse.group/u/gavin.mendel.gleason)\
**Replies:** 1\
**Last updated:** [April 28, 2022, 1:23pm UTC](https://swi-prolog.discourse.group/t/progress-monitoring-using-http-client/5344 "2022-04-28T13:23:21Z")

</div>

I’m using the http client in an application, and I was wondering the best way to add a progress monitor. It seems like the underlying stream processing for chunked streams uses cgi\_statistics, at least internally. Is thi…

---

## [Stacktraces in Package Trill](https://swi-prolog.discourse.group/t/stacktraces-in-package-trill/5247)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 5\
**Last updated:** [April 13, 2022, 12:03pm UTC](https://swi-prolog.discourse.group/t/stacktraces-in-package-trill/5247 "2022-04-13T12:03:46Z")

</div>

swipl 8.4.1, trill 6.0.3 Hi, I get Stack Traces in Package Trill: :- use\_module(library(trill)). :- trill. % or :- trillp. or :- tornado. classAssertion( smartphone, sm0815). propertyAssertion( has, egon, sm0815).…

---

## [Pack trill, problem with sub\_class and prob\_sub\_class](https://swi-prolog.discourse.group/t/pack-trill-problem-with-sub-class-and-prob-sub-class/5229)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 1\
**Last updated:** [April 7, 2022, 11:32am UTC](https://swi-prolog.discourse.group/t/pack-trill-problem-with-sub-class-and-prob-sub-class/5229 "2022-04-07T11:32:57Z")

</div>

swipl 8.4.2, trill 6.0.2 Hi, in the example donvito.pl is defined: :-use\_module(library(trill)). :- trill. % or :- trillp. or :- tornado. /\*\* \<examples\> ?- prob\_instanceOf(goodPerson,donVito,Prob). \*/ classAsserti…

---

## [Why do I get an "Arithmetic: evaluation error: \`zero\_divisor'" ? in cplint / slipcover](https://swi-prolog.discourse.group/t/why-do-i-get-an-arithmetic-evaluation-error-zero-divisor-in-cplint-slipcover/5216)

<div class="topic-metadata">

**Author:** [@Frank\_Schwidom](https://swi-prolog.discourse.group/u/Frank_Schwidom)\
**Replies:** 4\
**Last updated:** [April 6, 2022, 6:01am UTC](https://swi-prolog.discourse.group/t/why-do-i-get-an-arithmetic-evaluation-error-zero-divisor-in-cplint-slipcover/5216 "2022-04-06T06:01:21Z")

</div>

swipl 8.4.1, cplint 4.5.0 Hi, see the code: :- use\_module( library( slipcover)). :- sc. :- set\_sc(verbosity,3). % :- set\_sc(depth\_bound,false). % :- set\_sc(neg\_ex,given). bg(\[\]). fold(train,\[1\]). output( p/0). m…

[Next page](https://swi-prolog.discourse.group/c/help/pack/25.md?page=1)
