[PATCH] gnu: clisp: Add threads support on x84_64-linux.

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 3 Aug 2023 18:01
(address . guix-patches@gnu.org)(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
a5ff6e10bc72ccb8b046f5c55f7fd6d550605462.1691078405.git.sharlatanus@gmail.com
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 <awkravchuk@gmail.com>
---
gnu/packages/lisp.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 2f4fe6476d..47caa8e389 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -17,7 +17,7 @@
;;; Copyright © 2019-2023 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
-;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2021, 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2021 Charles Jackson <charles.b.jackson@protonmail.com>
;;; Copyright © 2022 Joeke de Graaf <joeke@posteo.net>
@@ -25,6 +25,7 @@
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
+;;; Copyright © 2023 Andrew Kravchuk <awkravchuk@gmail.com.
;;;
;;; This file is part of GNU Guix.
;;;
@@ -380,6 +381,12 @@ (define-public clisp
(%current-target-system)))
'("CFLAGS=-falign-functions=4")
'())
+ ,@(if (string-prefix? "x86_64-linux"
+ (or (%current-system)
+ (%current-target-system)))
+ '("--enable-portability"
+ "--with-threads=POSIX_THREADS")
+ '())
"--with-dynamic-ffi"
"--with-dynamic-modules"
"--with-ffcall"

base-commit: 782cf09b84bc72514e89d783460ea98bc353bf6a
--
2.40.1
S
S
Sharlatan Hellseher wrote on 26 Aug 2023 18:14
(address . 65041@debbugs.gnu.org)(name . Guillaume Le Vaillant)(address . glv@posteo.net)
CAO+9K5o1GmPFCJc42mmokWzcsNy1xS-92UO7T4cVccoj7CMOKw@mail.gmail.com
Hi Guix!
A gentle ping on the status of this issue, this patch helps to add
support for thread on x86_64 to CLISP.
Thanks,
Oleg
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
G
G
Guillaume Le Vaillant wrote on 28 Aug 2023 18:23
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
87zg2b9liy.fsf@kitej
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 <sharlatanus@gmail.com> skribis:

Toggle quote (10 lines)
> * 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?
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCZOzLxQ8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+3gAD+OFFrCQxsnxYdi7EnRhrkYA2X54txkh/wUzRJ
ItmoBCkA/RDcnvt1/cvThCSq3jiwY7PpE6bAymrnwJQfVDdjxL3v
=tDsE
-----END PGP SIGNATURE-----

S
S
Sharlatan Hellseher wrote on 31 Aug 2023 15:19
(name . Guillaume Le Vaillant)(address . glv@posteo.net)
CAO+9K5qPxMw8zrP_74Mubsn9HD_NVcMr=DDqART57Lig50BXfw@mail.gmail.com
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 <glv@posteo.net> wrote:
Toggle quote (23 lines)
>
> 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 <sharlatanus@gmail.com> 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: <a1501772832bf453bfdd241d6ff76ef4e1800c62.1693487783.git.sharlatanus@gmail.com>
From: Sharlatan Hellseher <sharlatanus@gmail.com>
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 <awkravchuk@gmail.com>
---
gnu/packages/lisp.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Toggle diff (36 lines)
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 <glv@posteo.net>
;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
-;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2021, 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2021 Charles Jackson <charles.b.jackson@protonmail.com>
;;; Copyright © 2022 Joeke de Graaf <joeke@posteo.net>
@@ -25,6 +25,7 @@
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
+;;; Copyright © 2023 Andrew Kravchuk <awkravchuk@gmail.com.
;;;
;;; 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
G
G
Guillaume Le Vaillant wrote on 4 Sep 2023 15:28
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
87msy2hxnn.fsf@kitej
The patch has been applied on the lisp-team branch, along with an update
for sbcl, if you want to test it.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCZPXcXA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j8ouQD+IQwF0AXFIVT6oG+Vo0urqXE/REo6XhxBgNGX
tqFJ7oMA/2HNBBDtWrZe8Xao7Acw3MSjOO+lJakBCsWK6q/3lB1+
=MNf/
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 23 Sep 2023 11:15
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 65041-done@debbugs.gnu.org)
87y1gxdzc6.fsf@kitej
Merged in master at 4f35ff1275e05be31f5d41464ccf147e9dbfd016.
Closing.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCZQ6s2Q8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+eqQD7BViGc5BCxGMX2wj7nifCBWwDKNMid3XA+TjS
F32lpsEA/3bZTiAQn/+V+vqxzhYGt7Ug8fGs/d/PVTjnPz9Qdq6j
=sBMY
-----END PGP SIGNATURE-----

Closed
?