all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* gnu: Add CLISP.
@ 2015-02-12 23:48 Taylan Ulrich Bayırlı/Kammer
  2015-02-13  3:20 ` Eric Bavier
  0 siblings, 1 reply; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-02-12 23:48 UTC (permalink / raw)
  To: guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: patch --]
[-- Type: text/x-diff, Size: 3325 bytes --]

From 6201470b3e6c2410be7f38d8cc1cc99c3b13f0da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Thu, 12 Feb 2015 22:19:52 +0100
Subject: [PATCH] gnu: Add CLISP.

* gnu/packages/lisp.scm (clisp): New variable.
---
 gnu/packages/lisp.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 53 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index cdf0912..2788ef8 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -31,7 +31,9 @@
   #:use-module (gnu packages which)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages bdw-gc)
-  #:use-module (gnu packages libffi))
+  #:use-module (gnu packages libffcall)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages libsigsegv))
 
 (define-public gcl
   (package
@@ -135,3 +137,53 @@ supporting ASDF, Sockets, Gray streams, MOP, and other useful components.")
     ;; which aren't under the lgpl2.0+ and instead contain many different,
     ;; non-copyleft licenses.
     (license license:lgpl2.0+)))
+
+(define-public clisp
+  (package
+    (name "clisp")
+    (version "2.49")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnu/clisp/release/" version
+                           "/clisp-" version ".tar.gz"))
+       (sha256
+        (base32 "0rp82nqp5362isl9i34rwgg04cidz7izljd9d85pqcw1qr964bxx"))))
+    (build-system gnu-build-system)
+    (inputs `(("libffcall" ,libffcall)
+              ("readline" ,readline)
+              ("libsigsegv" ,libsigsegv)))
+    (arguments
+     '(#:phases
+       (alist-cons-after
+        'unpack 'post-unpack
+        (lambda _
+          ;; The package is very messy with its references to "/bin/sh" and
+          ;; some other absolute pathes to traditional tools.  These appear in
+          ;; many places where our automatic patching misses them.  Therefore
+          ;; we do the following, in this early (post-unpack) phase, to solve
+          ;; the problem from its root.
+          (substitute* (find-files "." "configure|Makefile")
+            (("/bin/sh") "sh"))
+          (substitute* '("src/clisp-link.in")
+            (("/bin/pwd") "pwd")))
+        (alist-cons-before
+         'build 'pre-build
+         (lambda _
+           ;; We are supposed to call make under the src sub-directory.
+           (chdir "src"))
+         %standard-phases))
+       ;; Parallel builds seem to fail.
+       #:parallel-build? #f))
+    (home-page "http://www.clisp.org/")
+    (synopsis "A feature-rich Common Lisp implementation")
+    (description "GNU CLISP is an implementation of ANSI Common Lisp, with
+many extensions.  It includes an interpreter, compiler, debugger, CLOS, MOP,
+an FFI, i18n, POSIX and Perl regular expressions, a socket interface, fast
+bignums, arbitrary precision floats, and more.  An X11 interface is available
+through CLX, Garnet and CLUE/CLIO.  Command line editing is provided by
+readline.")
+    ;; Website says gpl2+, COPYRIGHT file says gpl2; actual source files have
+    ;; a lot of gpl3+.  (Also some parts are under non-copyleft licenses, such
+    ;; as CLX by Texas Instruments.)
+    (license (list license:gpl2 license:gpl2+ license:gpl3+))))
-- 
2.2.1

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

* Re: gnu: Add CLISP.
  2015-02-12 23:48 gnu: Add CLISP Taylan Ulrich Bayırlı/Kammer
@ 2015-02-13  3:20 ` Eric Bavier
  2015-02-13  7:35   ` Mark H Weaver
  2015-02-13 10:33   ` Taylan Ulrich Bayırlı/Kammer
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Bavier @ 2015-02-13  3:20 UTC (permalink / raw)
  To: Taylan Ulrich Bayırlı/Kammer; +Cc: guix-devel

On Fri, 13 Feb 2015 00:48:05 +0100
taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer) wrote:

> From 6201470b3e6c2410be7f38d8cc1cc99c3b13f0da Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>  <taylanbayirli@gmail.com>
> Date: Thu, 12 Feb 2015 22:19:52 +0100
> Subject: [PATCH] gnu: Add CLISP.
> 
> * gnu/packages/lisp.scm (clisp): New variable.
[...]
> +    (arguments
> +     '(#:phases
> +       (alist-cons-after
> +        'unpack 'post-unpack

Could you use a more descriptive phase name?  E.g. "patch-sh-and-pwd"?

> +        (alist-cons-before
> +         'build 'pre-build

Ditto.  Several other packages use "chdir" or "chdir-to-source"

> +       ;; Parallel builds seem to fail.
> +       #:parallel-build? #f))

If you know more specifically why parallel builds fail, could you
comment on that?  Race conditions, or not using $(MAKE), etc?

> +    (home-page "http://www.clisp.org/")
> +    (synopsis "A feature-rich Common Lisp implementation")

Do not begin with "A"; `guix lint` will complain about that.  Perhaps
just "Common Lisp implementation".

> +    (description "GNU CLISP is an implementation of ANSI Common
> Lisp, with +many extensions.  It includes an interpreter, compiler,
             ^
"+many" -> "many"

> debugger, CLOS, MOP, +an FFI, i18n, POSIX and Perl regular
                       ^
"+an" -> "an"

> expressions, a socket interface, fast +bignums, arbitrary precision
                                        ^
"+bignums" -> "bignums"

> floats, and more.  An X11 interface is available +through CLX, Garnet
                                                   ^
"+through" -> "through"

> and CLUE/CLIO.  Command line editing is provided by +readline.")
                                                      ^
"+readline" -> "readline"

Copy and paste + wrapping errors? ;)

> +    ;; Website says gpl2+, COPYRIGHT file says gpl2; actual source
> files have
> +    ;; a lot of gpl3+.  (Also some parts are under non-copyleft
> licenses, such
> +    ;; as CLX by Texas Instruments.)
> +    (license (list license:gpl2 license:gpl2+ license:gpl3+))))

I think in this case the gpl3+ might "win out", but I'll let others
comment on that.

Thanks!
`~Eric

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

* Re: gnu: Add CLISP.
  2015-02-13  3:20 ` Eric Bavier
@ 2015-02-13  7:35   ` Mark H Weaver
  2015-02-13 10:39     ` Taylan Ulrich Bayırlı/Kammer
  2015-02-13 13:26     ` Eric Bavier
  2015-02-13 10:33   ` Taylan Ulrich Bayırlı/Kammer
  1 sibling, 2 replies; 6+ messages in thread
From: Mark H Weaver @ 2015-02-13  7:35 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <bavier@member.fsf.org> writes:

> On Fri, 13 Feb 2015 00:48:05 +0100
> taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer) wrote:
>
>> From 6201470b3e6c2410be7f38d8cc1cc99c3b13f0da Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
>>  <taylanbayirli@gmail.com>
>> Date: Thu, 12 Feb 2015 22:19:52 +0100
>> Subject: [PATCH] gnu: Add CLISP.

I agree with all of Eric's feedback, with one exception:

>> +    (description "GNU CLISP is an implementation of ANSI Common
>> Lisp, with +many extensions.  It includes an interpreter, compiler,
>              ^
> "+many" -> "many"
[...]
> Copy and paste + wrapping errors? ;)

This seems to be a problem on your end, Eric.  I guess that your mail
client word-wrapped Taylan's patch.  The '+'s you see intermixed were at
the beginning of each line of the patch, of course.

>> +    ;; Website says gpl2+, COPYRIGHT file says gpl2; actual source
>> files have
>> +    ;; a lot of gpl3+.  (Also some parts are under non-copyleft
>> licenses, such
>> +    ;; as CLX by Texas Instruments.)
>> +    (license (list license:gpl2 license:gpl2+ license:gpl3+))))
>
> I think in this case the gpl3+ might "win out", but I'll let others
> comment on that.

Yes, I think that's correct.
Okay to push with these changes.

     Thanks!
       Mark

PS: It might now be possible to bootstrap sbcl from source code using
    either clisp or ecl.  Any takers?

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

* Re: gnu: Add CLISP.
  2015-02-13  3:20 ` Eric Bavier
  2015-02-13  7:35   ` Mark H Weaver
@ 2015-02-13 10:33   ` Taylan Ulrich Bayırlı/Kammer
  1 sibling, 0 replies; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-02-13 10:33 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <bavier@member.fsf.org> writes:

> Could you use a more descriptive phase name?  E.g. "patch-sh-and-pwd"?
> [...]
> Ditto.  Several other packages use "chdir" or "chdir-to-source"

Done.

> If you know more specifically why parallel builds fail, could you
> comment on that?  Race conditions, or not using $(MAKE), etc?

I'm inexperienced with Makefiles, but I suppose the following hints at a
race condition:

--- START SNIP ---

MAKE=make CLISP="/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/src/clisp -K boot  -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc" with_dynamic_modules=no ./clisp-link add boot base i18n syscalls regexp readline || (rm -rf base ; exit 1)
make[1]: Entering directory '/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/src/i18n'
make[1]: Nothing to be done for 'clisp-module'.
make[1]: Leaving directory '/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/src/i18n'
make[1]: Entering directory '/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/src/syscalls'
rm -f libgnu_sc.a
rm -f libgnu_sc.a
mkdir -p gllib
mkdir -p gllib
test -f gllib/Makefile || sh config.status gllib/Makefile depfiles
cd gllib; \
  make srcdir="/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/modules/syscalls/gllib" \
	ACLOCAL_M4="/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/modules/syscalls/gllib/Makefile.am" \
	CFLAGS="-g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O -falign-functions=4 -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -fPIC -I/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/src/"; \
  ln libgnu.a ../libgnu_sc.a
test -f gllib/Makefile || sh config.status gllib/Makefile depfiles
cd gllib; \
  make srcdir="/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/modules/syscalls/gllib" \
	ACLOCAL_M4="/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/modules/syscalls/gllib/Makefile.am" \
	CFLAGS="-g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O -falign-functions=4 -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -fPIC -I/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/src/"; \
  ln libgnu.a ../libgnu_sc.a
  
[ SNIP ]

ln: failed to create hard link '../libgnu_sc.a': File exists
Makefile:51: recipe for target 'gllib' failed
make[1]: *** [gllib] Error 1
make[1]: Leaving directory '/tmp/nix-build-clisp-2.49.drv-0/clisp-2.49/src/syscalls'
Makefile:2282: recipe for target 'base' failed
make: *** [base] Error 1

--- END SNIP ---

This looks like several Makefiles want to ensure the existence of
libgnu_sc.a, and they all start doing it together when called in
parallel.

> Do not begin with "A"; `guix lint` will complain about that.  Perhaps
> just "Common Lisp implementation".

Actually 'guix lint' recommended "A Common Lisp implementation", which
is also what GCL in the same file uses. :-)

Maybe lint needs to be fixed then.  I went with "Common Lisp
implementation" as you suggested, assuming it's fine that it's more or
less the same with GCL.

> I think in this case the gpl3+ might "win out", but I'll let others
> comment on that.

Done, taking Mark's comment into account.


I pushed the patch already to save a round-trip, assuming that my
decisions above are correct re. race condition comment and synopsis.
Tell me if I did wrong.

Thanks for the review,
Taylan

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

* Re: gnu: Add CLISP.
  2015-02-13  7:35   ` Mark H Weaver
@ 2015-02-13 10:39     ` Taylan Ulrich Bayırlı/Kammer
  2015-02-13 13:26     ` Eric Bavier
  1 sibling, 0 replies; 6+ messages in thread
From: Taylan Ulrich Bayırlı/Kammer @ 2015-02-13 10:39 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> writes:

> PS: It might now be possible to bootstrap sbcl from source code using
>     either clisp or ecl.  Any takers?

It's my intention to work on that next.  Consider it under progress
until I report success or failure.  (Sometimes the work seems
overwhelming and frustrates me; I have a couple unfinished recipes
lingering around due to that.)

Taylan

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

* Re: gnu: Add CLISP.
  2015-02-13  7:35   ` Mark H Weaver
  2015-02-13 10:39     ` Taylan Ulrich Bayırlı/Kammer
@ 2015-02-13 13:26     ` Eric Bavier
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Bavier @ 2015-02-13 13:26 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

On Fri, 13 Feb 2015 02:35:44 -0500
Mark H Weaver <mhw@netris.org> wrote:

> Eric Bavier <bavier@member.fsf.org> writes:
> 
> > On Fri, 13 Feb 2015 00:48:05 +0100
> > taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer) wrote:
> >
> >> From 6201470b3e6c2410be7f38d8cc1cc99c3b13f0da Mon Sep 17 00:00:00 2001
> >> From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
> >>  <taylanbayirli@gmail.com>
> >> Date: Thu, 12 Feb 2015 22:19:52 +0100
> >> Subject: [PATCH] gnu: Add CLISP.
> 
> I agree with all of Eric's feedback, with one exception:
> 
> >> +    (description "GNU CLISP is an implementation of ANSI Common
> >> Lisp, with +many extensions.  It includes an interpreter, compiler,
> >              ^
> > "+many" -> "many"
> [...]
> > Copy and paste + wrapping errors? ;)
> 
> This seems to be a problem on your end, Eric.  I guess that your mail
> client word-wrapped Taylan's patch.  The '+'s you see intermixed were at
> the beginning of each line of the patch, of course.

Indeed, this was my error (using an unfamiliar email client).  My
apologies for the noise.

> 
> >> +    ;; Website says gpl2+, COPYRIGHT file says gpl2; actual source
> >> files have
> >> +    ;; a lot of gpl3+.  (Also some parts are under non-copyleft
> >> licenses, such
> >> +    ;; as CLX by Texas Instruments.)
> >> +    (license (list license:gpl2 license:gpl2+ license:gpl3+))))
> >
> > I think in this case the gpl3+ might "win out", but I'll let others
> > comment on that.
> 
> Yes, I think that's correct.

Thanks for the confirmation.

`~Eric

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

end of thread, other threads:[~2015-02-13 13:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-12 23:48 gnu: Add CLISP Taylan Ulrich Bayırlı/Kammer
2015-02-13  3:20 ` Eric Bavier
2015-02-13  7:35   ` Mark H Weaver
2015-02-13 10:39     ` Taylan Ulrich Bayırlı/Kammer
2015-02-13 13:26     ` Eric Bavier
2015-02-13 10:33   ` Taylan Ulrich Bayırlı/Kammer

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.