I have uploaded SWI-Prolog 9.3.26. From the Prolog point of view,
this merely fixes a few minor issues. As discussed though, the
tooling has changed considerably:
The xpce GUI toolkit is now based on the SDL3+Cairo+Pango libraries,
using practically the same source on all platforms.
The GUI toolkit now runs natively on MacOS (i.e., no more need for
XQuartz) and Wayland (the Linux display server that is now more and
more replacing X11).
The swipl-win executable now uses xpce for its console window. This
implies that the native swipl-win.exe on Windows and the Qt based
version for MacOS and Linux have gone.
The GNU readline binding is disabled. We now use the BSD libedit for
command line editing as it is more flexible and can support more
instances, which allows it to run inside the xpce based Prolog console(s).
Availability
As usual, we provide binaries for Windows and MacOS. These use the
full stack outlined above.
We will update the flatpak version. The snap version will be discontinued
as it is harder to manage and serves the same purpose as the flatpak
version.
We provide PPAs for Ubuntu. The one for plucky (25.04) will provide
the gui. Versions for older Ubuntu releases will not. Users can either
use the flatpak version or build from source, after building SDL3 and
SDL3_image from source. Unfortunately the plucky PPA build failed to
include the gui as well. This will be fixed.
The Macports version will be updated. Unfortunately there is an issue
with Macports SDL3_image package that prevents port from building it.
You can build SWI-Prolog using the dependencies from Macports, including
SDL3_image. This is merely an issue on how port works.
Issues are to be expected and a quick re-release as well. Please test!
Enjoy --- Jan
SWI-Prolog Changelog since version 9.3.25
FIXED: swipl-win installation for MacOS when not creating a bundle.
PPA: Updated scripts/make-ppa to setup building without gui for
older distros
ADDED: Empty light theme file.
FIXED: Code generation for unification moved to the head. Minimal test
case: p(X, Y) :- X = f(Y), Y = a.. Issue occurs if a variable is
accessed (Y) before its unification must be moved to the head.
FIXED: Building; typo in prolog_pack/http fix
BUILD: Avoid installing some libraries with missing dependencies -
Do not install library(prolog_pack) if http support is missing.
Do not install SICStus timeout compatibility if multi-threading
is not enabled.
FIXED: library(prolog_xref): added some missing hook declarations.
THEME: Dark theme declarations for class list_browser and the profiler.
Requires the SDL version of xpce.
ENHANCED: Improve dark theme Only applies with new SDL based xpce
PORT: Fixed MacOS installer to include transitive dependencies and
fix the @rpath.
BUILD: Fixed PGO build with -DEPILOG=ON
BUILD: Ensure proper GUI environment for building the manual.
ADDED: Support -Dtheme=<theme>
PORT: Update scripts/macos-deps.sh Update most ports, add SDL3,
SDL3_image, cairo and pango.
ADDED: Working directory handling for MacOS app.
PORT: Create a MacOS bundle based on Epilog.
ENHANCED: interactor/0,1: use epilog when available. In the long
term we will drop xterm support as well as native win32 support.
EPILOG: Deal with --win-app option in a way that also supports
epilog.
ENHANCED: Remove thread context for threads running the REPL loop.
This avoids the complicating [Thread xyz] note on messages in
alternate consoles such as Epilog or SSH shells.
ADDED: Prolog flag toplevel_thread. This flag is true in a thread
that is currently running a REPL loop.
FIXED: Edit from PceEmacs using popup could raise an error.
E.g. ERROR: prolog_edit:is_file_spec/1: No rule matches
prolog_edit:is_file_spec(20_625_830)
BUILD: Add CMake -DEPILOG option This option prepares the core
for the upcoming Epilog configuration. It must be used with the sdl branch of packages/xpce. Effect:
Drop library(readline)
Drop swipl-win, either Windows version or Qt version.
Create a new swipl-win that is a copy of swipl that sets the epilog flag. Depending on the platform some more additions
may be needed.
PORT: Find MinGW DLL dependencies more dynamically This provides two
CMake functions to find the direct and indirect MinGW DLLs that must
be included into the distribution
ADDED: Allow storing the tty screen size with a stream. This is
required for environments where we use a non-tty I/O device such as a
pipe or socket while there is a notion of a tty size. Currently used
for Epilog on Windows.
MODIFIED: print_term/2: print dict tags and compound functors using
the current write options. Both used to be printed hardwired using ~q (quoted).
FIXED: When rational_syntax is natural, write /(Int,Number) with
spaces. This ensures such a term is not read as a rational number.
FIXED: Use autoload_call/1 to avoid reporting undefined predicates.
MODIFIED: Make the code walker ignore calls to autoload_call/1.
ADDED: autoload_call/1: call Goal after autoloading.
PORT: Avoid errors on sharing violations.
FIXED: Windows: comparing string equality with surrogate pairs
Comparing strings with surrogate pairs could signal inequality while
the strings are equal.
FIXED: Unification to chars or codes of wchar_t text on Windows.
Package debian
PPA: Updated to support xpce based GUI This deletes the Qt console
(swi-prolog-win package) and replaces the X11 dependencies with
SDL+cairo+pango.
Package libedit
ADDED: Support winlibedit hook to get the terminal size. This allows
fetching the terminal size for Epilog on Windows.
PORT: Make el_history_events/2 also work on the fileno property
on Windows.
ENHANCED: Use autoload_call/1 to avoid undefined errors.
FIXED: Read multi-byte characters on non-Windows.
ADDED: Support Windows pipe handles for I/O This is work in progress to
support Epilog on Windows. It consists of changes to our winlibedit
port of libedit. These changes do not use Console mode setting and
read using ReadFile() rather than ReadConsoleInput().
– signal handler is not reset (BSD signals)
– Check size of double
CMake Error at /home/mike/swipl-devel/build/CMakeFiles/CMakeScratch/TryCompile-nQX4Dk/CMakeLists.txt:30 (target_link_libraries):
Target “cmTC_c07a3” links to:
SDL3::SDL3
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at /usr/share/cmake-3.28/Modules/CheckTypeSize.cmake:146 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/usr/share/cmake-3.28/Modules/CheckTypeSize.cmake:271 (__check_type_size_impl)
packages/xpce/cmake/XPCEConfig.cmake:13 (check_type_size)
packages/xpce/CMakeLists.txt:33 (include)
CMake Error at /home/peter/src/swipl-devel/build.debug/CMakeFiles/CMakeScratch/TryCompile-0dljyG/CMakeLists.txt:26 (target_link_libraries):
Target "cmTC_8a416" links to:
SDL3::SDL3
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
CMake Error at /usr/share/cmake-3.25/Modules/CheckIncludeFile.cmake:95 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
cmake/Utils.cmake:45 (check_include_file)
packages/xpce/cmake/XPCEConfig.cmake:16 (AC_CHECK_HEADERS)
packages/xpce/CMakeLists.txt:33 (include)
I built with options from Jan’s config file, but with static and test turned on (the ctest for SDL had 2 failed tests: testautomation, testautomation-no-simd, which I presume don’t matter).
I also got a warning from cmake: Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR) .
These were the commands I used to build SDL and SDL_image:
Also by @peter.ludemann . This is an issue with older versions of cmake. I stumbled on it at some point as well and fixed it by updating CMake. ChatGPT proposes another solution that makes the configuration work with older versions. Please do reconfigure from scratch.
I pushed fixes for this. There are also some other small fixes for benign compiler warnings and QLF compilation warnings if the build locale is not UTF-8 based. Also pushed fixes for two bad colours in the dark theme.
All now compiles completely clean on Debian Bookworm for me (started from a clean Docker image).
Hmm. Weird. There is the /usr/bin/cmake -E env --unset=DISPLAY SDL_VIDEODRIVER=dummy but that doesn’t seem to get through. I noticed that before in some build environment.
The simple work-around is to do export SDL_VIDEODRIVER=dummy before running ninja. You don’t have to start again. Just set the variable and re-run ninja.
The the only question remaining is why … In what environment are you building?
Thanks. Did you build in the GUI environment, i.e., can you start X11/Wayland tools from the shell in which you were building?
A great thing about SDL is that there is the dummy driver that allows the library to function without a GUI, but apparently the setting doesn’t come through
You can just use a constant. @display?dpi is bogus as SDL does not report that. It is fixed to 96. SDL uses logical pixels that should be treated as old style low-res displays. SDL, Cairo and Pango all deal with sub-pixel resolutions (each in their own way …) and parts of xpce now handle dimensions as floats.
BTW, ctrl-C (from my terminal) with gtrace doesn’t behave the way I remember it … it seems to get stuck. And when closing the trace window, “Exit from Prolog” simply returns to the SWI-Prolog REPL.