Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/swipl: bump version to 10.0.2
@ 2026-05-09 20:46 Julien Olivain via buildroot
  2026-05-30 13:05 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Olivain via buildroot @ 2026-05-09 20:46 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

For change log since version 9.2.9, see:
https://www.swi-prolog.org/ChangeLog?branch=stable&from=9.2.9&to=10.0.2

This new version can no longer build in the source tree. Therefore,
this commit adds SWIPL_SUPPORTS_IN_SOURCE_BUILD = NO. Also, the target
swipl needs the host-swipl binary. It is searched by the cmake script.
This commit changes SWIPL_NATIVE_FRIEND variable to point to the
out-of-source build directory.

swipl has now a stricter ABI check of its prolog library bytecode
compiled files, compared to its builtin expected ABI:
https://github.com/SWI-Prolog/swipl/blob/V10.0.2/src/pl-init.c#L263

When cross-compiling, swipl is built on one side, and library files
are built with the host-swipl. The ABI string of the host-swipl and
target swipl must match. If not matching, swipl fail to start at
runtime with the error:

    FATAL: could not find SWI-Prolog home
      Tried source: compiled in
        Found /usr/lib/swipl: ABI mismatch

This ABI string includes a signature of builtin modules. See:
https://github.com/SWI-Prolog/swipl/blob/V10.0.2/src/pl-init.c#L1653
https://github.com/SWI-Prolog/swipl/blob/V10.0.2/src/pl-ext.c#L330

The swipl ncurses support is made with one those builtin module.
ncurses development files are likely present on host and likely not
enabled or needed on target, hence producing a different ABI
signature. For that reason, this commit disables ncurses on both the
host and target.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Patch tested in:
https://gitlab.com/jolivain/buildroot/-/jobs/14292359431
https://gitlab.com/jolivain/buildroot/-/pipelines/2512763423
---
 package/swipl/swipl.hash | 2 +-
 package/swipl/swipl.mk   | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/package/swipl/swipl.hash b/package/swipl/swipl.hash
index efc3aa963f..4dada84df5 100644
--- a/package/swipl/swipl.hash
+++ b/package/swipl/swipl.hash
@@ -1,4 +1,4 @@
 # From https://www.swi-prolog.org/download/stable
-sha256  53f428e2d9bbdf30e53b06c9c42def9a13ff82fc36a111d410fc8b0bc889ee2d  swipl-9.2.9.tar.gz
+sha256  e42cc098f7b8a6051c4f79a99b55162d467098aba60f69649bdc7583f0734b57  swipl-10.0.2.tar.gz
 # Locally calculated
 sha256  770594d0f4463b71f1485f00e4bc5cf4b6f667d62ef6bc9bde2fee236541992a  LICENSE
diff --git a/package/swipl/swipl.mk b/package/swipl/swipl.mk
index 20faaefe7c..801e5b800a 100644
--- a/package/swipl/swipl.mk
+++ b/package/swipl/swipl.mk
@@ -4,11 +4,13 @@
 #
 ################################################################################
 
-SWIPL_VERSION = 9.2.9
+SWIPL_VERSION = 10.0.2
 SWIPL_SITE = https://www.swi-prolog.org/download/stable/src
 SWIPL_LICENSE = BSD-2-Clause
 SWIPL_LICENSE_FILES = LICENSE
 
+SWIPL_SUPPORTS_IN_SOURCE_BUILD = NO
+
 HOST_SWIPL_DEPENDENCIES = host-zlib
 
 SWIPL_DEPENDENCIES = host-swipl zlib
@@ -16,6 +18,7 @@ SWIPL_DEPENDENCIES = host-swipl zlib
 # A host-swipl is needed to compile the target prolog boot
 # boot.prl file.
 HOST_SWIPL_CONF_OPTS = \
+	-DHAVE_CURSES_H=0 \
 	-DBUILD_PDF_DOCUMENTATION=OFF \
 	-DSWIPL_PACKAGES=OFF \
 	-DUSE_GMP=OFF \
@@ -29,12 +32,13 @@ HOST_SWIPL_CONF_OPTS = \
 # the path set to this variable. Therefore, we cannot use the host
 # "swipl" binary installed in $(HOST_DIR)/usr/bin.
 SWIPL_CONF_OPTS = \
+	-DHAVE_CURSES_H=0 \
 	-DBUILD_PDF_DOCUMENTATION=OFF \
 	-DHAVE_WEAK_ATTRIBUTE=1 \
 	-DLLROUND_OK=1 \
 	-DMODF_OK=1 \
 	-DQSORT_R_GNU=1 \
-	-DSWIPL_NATIVE_FRIEND=$(HOST_SWIPL_SRCDIR) \
+	-DSWIPL_NATIVE_FRIEND=$(HOST_SWIPL_BUILDDIR) \
 	-DSWIPL_PACKAGES=OFF \
 	-DUSE_TCMALLOC=OFF \
 	-DCMAKE_CXX_COMPILER=true
-- 
2.54.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/swipl: bump version to 10.0.2
  2026-05-09 20:46 [Buildroot] [PATCH 1/1] package/swipl: bump version to 10.0.2 Julien Olivain via buildroot
@ 2026-05-30 13:05 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-05-30 13:05 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

On Sat, May 09, 2026 at 10:46:58PM +0200, Julien Olivain via buildroot wrote:
> For change log since version 9.2.9, see:
> https://www.swi-prolog.org/ChangeLog?branch=stable&from=9.2.9&to=10.0.2
> 
> This new version can no longer build in the source tree. Therefore,
> this commit adds SWIPL_SUPPORTS_IN_SOURCE_BUILD = NO. Also, the target
> swipl needs the host-swipl binary. It is searched by the cmake script.
> This commit changes SWIPL_NATIVE_FRIEND variable to point to the
> out-of-source build directory.
> 
> swipl has now a stricter ABI check of its prolog library bytecode
> compiled files, compared to its builtin expected ABI:
> https://github.com/SWI-Prolog/swipl/blob/V10.0.2/src/pl-init.c#L263
> 
> When cross-compiling, swipl is built on one side, and library files
> are built with the host-swipl. The ABI string of the host-swipl and
> target swipl must match. If not matching, swipl fail to start at
> runtime with the error:
> 
>     FATAL: could not find SWI-Prolog home
>       Tried source: compiled in
>         Found /usr/lib/swipl: ABI mismatch
> 
> This ABI string includes a signature of builtin modules. See:
> https://github.com/SWI-Prolog/swipl/blob/V10.0.2/src/pl-init.c#L1653
> https://github.com/SWI-Prolog/swipl/blob/V10.0.2/src/pl-ext.c#L330
> 
> The swipl ncurses support is made with one those builtin module.
> ncurses development files are likely present on host and likely not
> enabled or needed on target, hence producing a different ABI
> signature. For that reason, this commit disables ncurses on both the
> host and target.
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>

Applied to next, thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-30 13:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09 20:46 [Buildroot] [PATCH 1/1] package/swipl: bump version to 10.0.2 Julien Olivain via buildroot
2026-05-30 13:05 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox