# Ann: SWI-Prolog 8.0.3 (stable)

**URL:** <https://swi-prolog.discourse.group/t/ann-swi-prolog-8-0-3-stable/836>\
**Category:** Releases\
**Created:** [June 19, 2019, 2:35pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-0-3-stable/836 "2019-06-19T14:35:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [June 19, 2019, 2:35pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-0-3-stable/836/1 "2019-06-19T14:35:30Z")

</div>

Dear SWI-Prolog user,

SWI-Prolog 8.0.3 is available for download.

Keri Harris backported the important fixes from 8.1.x into 8.0.3. The  
policy is not to include any patch that might affect compatibilty.  
Highlights:

- Several fixes to clause garbage collection, avoiding crashes.  
We also included a couple of patches for performance reasons  
here.

- Make pack\_install/1 and friends talk to the new HTTPS website.

- Sync the Mac app (had several flows due to Qt update and CPack  
packager).

- Various issues with swipl-ld and teh pkg-config file left after  
the migration to CMake/CPack.

- Several security fixes.

# SWI-Prolog Changelog since version 8.0.2

- ENHANCED: improve performance of asserta/1 when there are lots of  
erased clauses

- ENHANCED: do not consider dynamic predicates as dirty until clauses  
have been retracted

- ENHANCED: incrementally track dirty clause count to avoid O(N) cost  
when considering clause GC

- FIXED: Use https to contact the pack server.

- FIXED: do not delete lingering clauses indexes unless they are known  
to have been lingering at the time clause GC started

- FIXED: Issue#478: is\_lambda/1 failed on valid yall lambda  
expressions. Fix by Paulo Moura.

- FIXED: abolish\_table\_subgoals/1 failed if no tabling has been done  
in the calling thread.

- FIXED: Offload unregistration of dirty foreign/thread-local predicates  
to the thread performing clause GC. This ensures that access to  
DirtyDefInfo structures is no longer racy

- FIXED: Predicates do not need to be activated when setting a frame’s  
generation as the frame generation is guaranteed to be greater than  
the current CGC starting generation

- FIXED: Issue#475: xinteger//1: missing cut and inconsistent handling  
of negative integers over the two modes.

- FIXED: Issue#474 (Windows) several issues due to `sizeof(wint_t) == 2`

- FIXED: possible unneeded fatal stack overflow after an earlier caught  
overflow.

- TEST: Broken test after fix to assert to a static predicate.

- PORT: Use `--enable-fat` for building gmp for the Mac Bundle as  
suggested by Torbjörn Granlund.

- PORT: Use the self-compiled MacOS dependencies for creating the  
MacOS bundle.

- PORT: Added scripts/macos-deps.sh to build the MacOS dependencies  
from source.

- PORT: Allow MACOSX\_DEPENDENCIES\_FROM to specify a directory with  
the dependencies

- PORT: Provide correct LDSOFLAGS for compiling extensions from the  
MacOS bundle.

- PORT: Set MacOS deployment target to 10.12.

- PORT: MacOS: When running as bundle, report the Frameworks directory  
of the bundle as the location for the dylibs.

- PORT: On MacOS use `cc` and `c++` as compilers in `swipl-ld`.  
The CMake compiler is a specific version from XCode while we should  
rely on the general Xcode cli tools.

- PORT: Fixup Info.plist for MacOS version. See  
[https://github.com/SWI-Prolog/issues/issues/84](https://github.com/SWI-Prolog/issues/issues/84)

- FIX: fixes a suplus dot in a test

- PORT: various checks and ifdefs for FreeBSD

- FIXED: verify\_safe\_declaration/1 leaves a choicepoint

- FIXED: clause\_info/2: possible too native unification can lead to  
incorrect results. Alan Baljeu.

- FIXED: Cleanup of thread-local procedures in temporary modules  
failed if the localization was only effectuated in a high thread id.  
This patch refines 81b1c29e0b98c05fd0ca6db6dffbe246e8546408.

- SECURITY: utf8\_strlen() on non-null terminated input may read beyond  
the buffer.

- FIXED: Using a thread\_local predicate inside a temporary module could  
crash the system.

- FIXED: library(ansi\_term): loading should not set the `color_term`  
flag to `true` if it is already defined.

- FIXED: Make loaded C++ foreign libraries visible through  
current\_foreign\_library/2. Arthur Wang.

- FIXED: print\_term/2 to print zero-argument compounds. Peter Ludemann.

- FIXED: re-enable file consult messages when a file is consulted from  
the Windows menu.

- INSTALL: Added declaration for JNIDIR (requires updating jpl module)

- FIXED: :- table/1: undefined predicate check should ignore implicitly  
imported predicates.

- FIXED: reloading a file with tabled predicates sometimes failed to  
rename the implementation. Backport of commit 95af97086

- FIXED: Avoid excessive GC because the system incorrectly believes it  
is nearly reaching the stack limit. This is only part of the solution  
to avoid excessive GC.

- PORT: Conditionally deal with `-fprofile-dir=` and  
`-Wno-maybe-uninitialized` as these are not supported in the default  
MacOS toolchain. Paulo Moura.

- DOC: Updated demo/README and renamed to README.md

- PORT: `swipl-ld.exe` to configure for native MinGW tools.

- FIXED: `swipl.exe --dump-runtime-variables` to provide the right  
value for `PLLIBDIR` on Windows. Abramo Bagnara.

## Package archive

- FIXED: error return and avoid compiler warning.

- FIXED: Error handling when hitting end-of-file while skipping an  
archive entry. Also made error reporting more robust.

- ENHANCED: Print more human friendly messages from archive errors.

## Package clib

- DOC: intro for UDP sockets updated.

- ENHANCED: Make UDP inbound thread restart automatically if it dies

- ADDED: udp\_term\_string\_hook/3 may throw udp(invalid\_message) to make  
the UDP library ignore some message. This can be used together with  
encryption to create a safe UDP cluster.

- FIXED: timer thread should not be created as detached as it is joined.  
Matt Lilley.

- DOC: Typo and link for ptmalloc() details.

- FIXED: library(udp\_broadcast): keep the inbound thread running on  
exceptions during broadcast.

## Package http

- DOC: Fixed a minor typo.

- FIXED: Issue#91: mime\_pack/3: lacking cut causes bad behaviour on  
backtracking.

- SECURITY: Add `SameSite` attribute to session cookies using the  
default setting `lax`. This protects against [Cross Site Resource  
Forgery(CSRF)](https://www.owasp.org/index.php/SameSite) exploits.

## Package jpl

- INSTALL: Allow installing libjpl.so in $JNIDIR to support Debian  
install. After discusion with Lev Lamberov.

## Package ltx2htm

- SECURITY: Possibly reading beyond stack buffer. Note that the ltx2htm  
package is typically only used to build the documentation.

- FIXED: read outside automatic variable.

## Package paxos

- ADDED: paxos\_admin\_key/2 to get supported access to changes to the  
quorum and nodes considered dead. Also fixes some mistakes in the  
documentation.

- ADDED: paxos\_property/1 to query the status of the cluster.

- ADDED: paxos\_quorum\_ask/4 to ask questions to the forum outside the  
paxos protocol.

- ADDED: hook paxos:paxos\_ledger\_hook/5, allowing (some keys of) the  
ledger to be stored elsewhere.

- FIXED: Avoid deadlock assembling the dead node admin when starting  
with an explicit node id.

- FIXED: Avoid deadlock for last node disappearing.

## Package pcre

- FIXED: Issue#91: re\_match/3: `anchored(true)` was not processed.

## Package pengines

- MODIFIED: Pengines handling of /abort through HTTP. The abort handler  
(still) sends a signal to the Pengine. The Pengine will reply through  
the handler that is waiting for it (create, ask, next, pull\_respons)  
with an abort message. This waiting request **is no longer aborted  
in JavaScript**, which didn’t work anyway. The /abort handler itself  
answers a 404 if the Pengine doesn’t exist or a JSON `true` if the  
signal was sent, without waiting for its reply.

- ADDED: /pengine/detach method that allows for detaching from a  
connected Pengine, keeping it running in the background. This is  
backed up by changes to SWISH that can be activated to allow long  
running jobs.

- FIXED: Avoid emitting a no-cache header in the middle of CSV output.

## Package pldoc

- FIXED: Avoid exception looking for non-existing file in wiki text.

- FIXED: PlDoc.sty macro definition.

- ENHANCED: PlDoc issue#11: restrict \tag to the \tags environment to  
avoid conflicts with LaTeX `amsmath` package.

## Package readline

- PORT: Support new -DMACOSX\_DEPENDENCIES\_FROM=dir

- PORT: FreeBSD: fixes warnings about implicit declarations of readline  
funcs The readline/history.h was neither found nor included on FreeBSD,  
but the readline library was, so the comiler generated warnings about  
the read\_history and write\_history being implicitly defined.

## Package sgml

- FIXED: SGML/HTML/XML parser: possible memory leak and reading an  
out-of-scope automatic variable.

- SECURITY: Possible buffer overrun when handling parser errors and  
warnings if the file name is very long. This patch also puts a  
separate length constraint on the location such that not all space is  
used by the location part of the message. With help from Keri Harris.

## Package swipl-win

- FIXED: ANSI escape sequences translation and help\_pager flag.

- FIXED: autocompletion crash

## Package table

- FIXED: new\_order\_table/2: accept strings for character sets for  
compatibility with SWI7.

## Package xpce

- FIXED: Issue#464: gxref/0: ignore files that do not exist.  
Paulo Moura.

- CLANG: Add unneeded initialization to avoid a warning.

- CLEANUP: Avoid some (benign, I think) errors trapped by Address  
Sanitizer.

## Package zlib

- TEST: Issue#473: zlib tests failing on Windows due to CR/LF encoding.

- FIX: fixes zlib test, gzip\_utf8 The test failed, because of missing  
encoding(utf8) term.

---

<div class="post-metadata">

**Author:** ![wdiestel](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/wdiestel/32/22_2.png) [@wdiestel](https://swi-prolog.discourse.group/u/wdiestel)\
**Post date:** [July 5, 2019, 12:23pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-0-3-stable/836/2 "2019-07-05T12:23:13Z")

</div>

I get issues with 8.0.3-1 on Ubuntu 18.04. What may be wrong? Missing dependencies?

```
$ uname -a
Linux lupo-xps 4.18.0-24-generic #25~18.04.1-Ubuntu SMP Thu Jun 20 11:13:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ sudo apt show swi-prolog-nox
Package: swi-prolog-nox
Version: 8.0.3-1-gcbd8b3b92-bionicppa2

$ swipl
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

ERROR: /usr/lib/swi-prolog/library/editline.pl:65:
	catch/3: Undefined procedure: editline:use_foreign_library/1
Warning: /usr/lib/swi-prolog/library/editline.pl:65:
	Goal (directive) failed: editline:use_foreign_library(foreign(libedit4pl))
ERROR: Exported procedure editline:el_wrap/4 is not defined
ERROR: Exported procedure editline:el_cursor/2 is not defined
ERROR: Exported procedure editline:el_bind/2 is not defined
ERROR: Exported procedure editline:el_source/2 is not defined
ERROR: Exported procedure editline:el_wrapped/1 is not defined
ERROR: Exported procedure editline:el_addfn/4 is not defined
ERROR: Exported procedure editline:el_unwrap/1 is not defined
ERROR: Exported procedure editline:el_read_history/2 is not defined
ERROR: Exported procedure editline:el_write_history/2 is not defined
ERROR: Exported procedure editline:el_add_history/2 is not defined
ERROR: Exported procedure editline:el_history_events/2 is not defined
ERROR: Exported procedure editline:el_history/2 is not defined
ERROR: Exported procedure editline:el_deletestr/2 is not defined
ERROR: Exported procedure editline:el_insertstr/2 is not defined
ERROR: Exported procedure editline:el_line/2 is not defined
ERROR: /usr/lib/swi-prolog/library/editline.pl:68: Initialization goal raised exception:
ERROR: Undefined procedure: editline:el_wrapped/1
ERROR: In:
ERROR: [27] editline:el_wrapped(user_input)
ERROR: [26] editline:el_wrap at /usr/lib/swi-prolog/library/editline.pl:98
ERROR: [25] '$run_init_goal'(editline:el_wrap) at /usr/lib/swi-prolog/boot/init.pl:618
ERROR: [24] catch(system:'$run_init_goal'(...),error(existence_error(procedure,...),context(...,_4696)),system:'$initialization_error'(...,...,...)) at /usr/lib/swi-prolog/boot/init.pl:386
ERROR: [23] catch_with_backtrace(system:'$run_init_goal'(...),error(existence_error(procedure,...),context(...,_4766)),system:'$initialization_error'(...,...,...)) at /usr/lib/swi-prolog/boot/init.pl:436
```

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [July 5, 2019, 12:47pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-0-3-stable/836/3 "2019-07-05T12:47:37Z")

</div>

I only have 8.1.9 installed from the PPA, but that version is fine. Most likely the post-installation step that builds the library index has not been executed. That should have created

```
/usr/lib/swi-prolog/library/INDEX.pl

```

You can try to reconfigure the package to see whether that helps and what happens (some apt command; do not recall). You can also start Prolog, possibly using `swipl --no-tty` to avoid trying to load editline and  
run (as root)

```
?- make_library_index(swi(library)).

```

Would be nice to know whether this is a bug in the package or some weird local issue.

---

<div class="post-metadata">

**Author:** ![wdiestel](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/wdiestel/32/22_2.png) [@wdiestel](https://swi-prolog.discourse.group/u/wdiestel)\
**Post date:** [July 5, 2019, 1:04pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-0-3-stable/836/4 "2019-07-05T13:04:30Z")

</div>

> [@wdiestel](#):
>
> /usr/lib/swi-prolog/library/editline.pl

It appeared to be caused by a generic issue within the Ubuntu package manager, so not specfic to swipl, after cleanup it works again!
