SWI-Prolog 10.1.5 is ready for download. This version comes with
various enhancements to the development tools. It also fixes some
minor bugs and portability issues. Highlights:
Fixed XPCE scroll sensitivity when using trackpads (notably on
Macbooks).
Added library(tableutil), providing the tabling inspection
and statistic utilities that used to be in my private library.
Add a class property to threads. This is used to control
debugging a group of threads, including new threads that are
created in this group. For example, ?- tdebug(http). now
reliably enabled debug mode on HTTP worker threads, including
lazily created threads. Classes are shown by threads/0 and
the GUI tool for monitoring threads.
Extend completion on the commandline to variable names and $Var references to saved bindings.
Fixed bug in PceEmacs dabbrev_expand, causing the editor to loop
and be unresponsive.
Added Spy menu option to PceEmacs context popup on heads and
goals.
@EricGT enabled PGO compilation for MSVC (producing way slower
code than GCC in debug mode ā¦). Also fixed an issue in LibBF
based random number generation.
ADDED: library(tableutil): toplevel utilities This library provides
toplevel utilities to dump tables, their relations and statistics.
PORT: #1481 Removed RETSIGTYPE configuration The CMake config seems
broken for gentoo using C23. As there are no systems that use int for signal handler return value, there is no need for this
configuration.
FIXED: Make compile again for single threaded and WASM targets.
CLEANUP: Prolog flag handling. Cleanup the implementation, mostly
by splitting too large functions. Clarified documentation with
respect to thread interaction. Added an option local(true)
to create_prolog_flag/3 which create a flag only for the calling
thread. Clarified and fixed default behaviour, which is for
create_prolog_flag/3 to set the flag globally, i.e., make it
available with this value for any thread. This now updates both the
local and global flag table (before it updated only the global table).
DOC: Use PlDoc for the documentation of library(threadutil)
CLEANUP: Move thread_alias/2 to library(thread_util). The core
functionality is now provided by set_thread/2.
ADDED: Assign threads the notion of a class. This is notably
intended to control debugging. Possibly this can be extended to
other features such as memory management policies, termination, etc.
Future versions may also allow for multiple classes. Related changes
Add class(Class) to options of thread_create/3
Add class(Class) to thread_property/2 and set_thread/2
Add thread_class to PL_thread_attributes_t
Allow tdebug/1 and tnodebug/1 to address a class of threads
Adapt debugging/0 and threads/0.
Adapt the GUI thread monitor.
Use classes in main system, Epilog and the HTTP server.
Practical consequence:
Use ?- tdebug(http). to activate debugging in HTTP worker
threads. This reliably activates spy points in the HTTP server.
ADDED: PL_current_prolog_flag(): type PL_BOOL
MODIFIED: visible/1: default to include cut_call This shows calls
to ! in the tracer.
FIXED: thread_property/2: system_thread_id on Linux Failed to
initialize this on systems with the getid() function (primarily Linux,
but possibly other platforms using glibc).
FIXED: Make updateAlerted() thread-safe Could lead to race conditions
when this function is called from multiple threads (usually the target
and some external thread).
ADDED: prolog:complete_input/4: enhanced CLI TAB completion - Complete
variables in the query using Emacs dabbrev completion - Complete
in $Var for saved toplevel variables.
BUILD: Fixed PGO compilation for non-MSVC
TEST: empty file position tests.
CMAKE: Add MSVC support for Profile-Guided Optimization
ENHANCED: Message when running the toplevel using initialization/1.
FIXED: #1478 LibBF mpz_import() emulation for leading zero-bytes.
Lead to undefined behaviour in random number generation.
UBAN: #1478 Avoid undefined arithmetic on NULL pointer (benign).
FIXED: predicate_label/2: avoid importing targets into system.
PPA: Fixup generating PPAs for both SDL and non-SDL versions.
Package debian
PPA: Dropped libedit. Using bundled version.
Package http
ADDED: Set class property for created threads.
Package protobufs
CLEANUP: remove absolute path from generated _pb.pl, fix typos
TEST: fixed typo that prevent interop test from running
Package xpce
ENHANCED: Capture main thread messages to current Epilog using
hyperlinks.
ADDED: PceEmacs Prolog mode: set spy point from goal and head popup.
PORT: Removed RETSIGTYPE config Outdates as any reasonable still
alive system uses void.
FIXED: Epilog: Possible access to freed object when closing.
ENHANCED: Thread monitor Show more of the status of threads and improve
popup menu actions. Improve disabling popup entries and add an entry
to toggle debug mode for classes of threads.
ENCHANCED: GUI tracer control.
ADDED: Epilog: use thread classes.
FIXED: PceEmacs: possible infinite loop in dabbrev_expand. editor->dabbrev_expand can loop if a secondary or ternary search
for candidates only results in candidates that are already rejected
by the user from earlier candidate searches.
ENHANCED: Improve scroll wheel handling. Notably get more natural
scroll speed on MacOS trackpads
FIX: Pass image (not surf) to my_cairo_check_surface in
ws_load_image_file
Thanks for quick quick response. I have inserted the line git submodule update --recursive
into my full build script for SWIPL. It works both for intel mac and silicon macs.
I am getting the following error when building 10.1.5 on arch linux
CMake Error in CMakeLists.txt:
IMPORTED_LOCATION or IMPORTED_IMPLIB not set for imported target
āSDL3::SDL3-sharedā configuration āPGOā.
CMake Error in packages/xpce/CMakeLists.txt:
IMPORTED_LOCATION or IMPORTED_IMPLIB not set for imported target
āSDL3_image::SDL3_image-sharedā configuration āPGOā.
Previous version was 10.1.4, and I do have the SDL3 and SDL3_Image packages installed. However, I did update arch. I am going to reboot and try building again. Will update in a few minutes.
Ok. Nothing related changed to SWI-Prologās build process. After an OS upgrade it is typically wise to do build and configure from scratch because previous detected dependencies now have different paths due to version upgrades.
Still getting the same issue. Usually I let the aur package handle the updates. Now I tried building from source manually, and I am seeing the exact same error.
Weird. Iām a bit surprised about the configuration āPGOā in the error. I do not recall that. Maybe something new in CMake? Which version? Could you try building without PGO enabled?
Yes. Commit b9f48137e7b4f8fa87aef141ba34b022de44202f works around this, although Iām afraid I donāt really understand why. I donāt understand the documentation and it seems Iām not the only one ⦠At least for me it now builds on the latest Arch Linux (in a Docker container from archlinux:base-devel)
Same here, on Debian 6.12.74+deb13+1-amd64 CMake 3.31.6. This is with a fresh git clone so thereās nothing left over from previous versions.
CMake Error in CMakeLists.txt:
IMPORTED_LOCATION or IMPORTED_IMPLIB not set for imported target
"SDL3::SDL3-shared" configuration "PGO".
CMake Error in packages/xpce/CMakeLists.txt:
IMPORTED_LOCATION or IMPORTED_IMPLIB not set for imported target
"SDL3_image::SDL3_image-shared" configuration "PGO".
CMake Error in CMakeLists.txt:
IMPORTED_LOCATION or IMPORTED_IMPLIB not set for imported target
"SDL3::SDL3-shared" configuration "PGO".
CMake Error in packages/xpce/CMakeLists.txt:
IMPORTED_LOCATION or IMPORTED_IMPLIB not set for imported target
"SDL3_image::SDL3_image-shared" configuration "PGO".
-- Generating done (0.3s)
CMake Generate step failed. Build files cannot be regenerated correctly.
Is this completely up-to-date? I.e., are you at commit b9f48137e7b4f8fa87aef141ba34b022de44202f? That patch fixed this issue for Arch Linux.
There is no need for fresh clones. The build does not write outside the directory in which you are building (except if you install as well of course). So, just delete the build directory and all is clean again.
Iām working my way through the thread Iāve rebuilt with that commit, but (cmake version 3.31.6):
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Error: The source directory "/data2/tmp/swipl-devel-HEAD/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
I updated Debian yesterday, Iāll try what was a previously successful build of 10.1.3 to make sure thatās not due to the upgrade.
Yeah I know, but I donāt keep the tree between builds anyway, so itās always a fresh clone.
event->wheel.integer_y is introduced in SDL 3.2.12. That patch was needed to make trackpad scrolling behave properly. Pushed a new version where we emulate this. Not perfect, but hopefully good enough. Version 1a00ab1213592f52dba8702dcf8969dc33cc2a3