Subject: Re: [bug#65041] [PATCH] gnu: clisp: Add threads support on x84_64-linux.

From: Sharlatan Hellseher <[email-masked]>
Date: Thu, 31 Aug 2023 14:19:57 +0100

Hi Guillaume,

Andrew tried to build it on Raspberry Pi (ARM based) but it's failed
without that restriction. I had no chance to test on other platform
supported by Guix yet.
I'm including V2 of the patch which include minor adjustment for
target architecture detection simplification.

Thanks,
Oleg

On Mon, 28 Aug 2023 at 17:31, Guillaume Le Vaillant <[email-masked]> wrote:
>
> Hi.
>
> As clisp has over 1600 dependent packages, updating it should be done on
> a "lisp-team" branch which will be merged into the master branch if all
> goes well. However I can't do that right now as I'm on holiday until
> next week.
>
>
> Sharlatan Hellseher <[email-masked]> skribis:
>
> > * gnu/packages/lisp.scm (clisp)[arguments]: Add configuration options to
> > support threads on x86_64-linux system.
> > [...]
> > +                           ,@(if (string-prefix? "x86_64-linux"
> > +                                                 (or (%current-system)
> > +                                                     (%current-target-system)))
> > +                                 '("--enable-portability"
> > +                                   "--with-threads=POSIX_THREADS")
> > +                                 '())
>
> Does clisp only support threads on x86-64, or could it be enabled for
> some other architectures?

-- 

… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From a1501772832bf453bfdd241d6ff76ef4e1800c62 Mon Sep 17 00:00:00 2001
Message-Id: <a15[email-masked]>
From: Sharlatan Hellseher <[email-masked]>
Date: Thu, 3 Aug 2023 16:44:16 +0100
Subject: [PATCH] gnu: clisp: Add threads support on x84_64-linux.

Guix's build version of CLISP, fails to load bordeaux-threads:

Error while trying to load definition for system bordeaux-threads
      This implementation is unsupported.

This patch adds support for POSIX_THREADS on x86_64-linux
system.

* gnu/packages/lisp.scm (clisp)[arguments]: Add configuration options to
support threads on x86_64-linux system.

Reported and Co-Authored by Andrew Kravchuk <[email-masked]>
---
 gnu/packages/lisp.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 2f4fe6476d..867a5df496 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2019-2023 Guillaume Le Vaillant <[email-masked]>
 ;;; Copyright © 2020 Marius Bakke <[email-masked]>
 ;;; Copyright © 2020 Zhu Zihao <[email-masked]>
-;;; Copyright © 2021 Sharlatan Hellseher <[email-masked]>
+;;; Copyright © 2021, 2023 Sharlatan Hellseher <[email-masked]>
 ;;; Copyright © 2021 Paul A. Patience <[email-masked]>
 ;;; Copyright © 2021 Charles Jackson <[email-masked]>
 ;;; Copyright © 2022 Joeke de Graaf <[email-masked]>
@@ -25,6 +25,7 @@
 ;;; Copyright © 2022 ( <[email-masked]>
 ;;; Copyright © 2023 Zheng Junjie <[email-masked]>
 ;;; Copyright © 2023 Yovan Naumovski <[email-masked]>
+;;; Copyright © 2023 Andrew Kravchuk <[email-masked].
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -380,6 +381,10 @@ (define-public clisp
                                                      (%current-target-system)))
                                  '("CFLAGS=-falign-functions=4")
                                  '())
+                           ,@(if (target-x86?)
+                                 '("--enable-portability"
+                                   "--with-threads=POSIX_THREADS")
+                                 '())
                             "--with-dynamic-ffi"
                             "--with-dynamic-modules"
                             "--with-ffcall"

base-commit: 782cf09b84bc72514e89d783460ea98bc353bf6a
-- 
2.40.1