unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#29403] [PATCH] gnu: gcl: Update snapshot.
@ 2017-11-22 19:06 Kei Kebreau
  2017-11-23 15:36 ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Kei Kebreau @ 2017-11-22 19:06 UTC (permalink / raw)
  To: 29403; +Cc: Kei Kebreau

* gnu/packages/lisp.scm (gcl): Update to 2.6.12-1.5956140.
[arguments]: Remove CFLAGS from make-flags; adjust pre-conf phase.
[native-inputs]: Add which.
---
 gnu/packages/lisp.scm | 152 +++++++++++++++++++++++++++-----------------------
 1 file changed, 81 insertions(+), 71 deletions(-)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index e5b8ad356..cbb6c0097 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -76,81 +76,91 @@
              ,lisp))))
 
 (define-public gcl
-  (package
-    (name "gcl")
-    (version "2.6.12")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/" name "/" name "-" version ".tar.gz"))
-      (sha256
-       (base32 "1s4hs2qbjqmn9h88l4xvsifq5c3dlc5s74lyb61rdi5grhdlkf4f"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(#:parallel-build? #f  ; The build system seems not to be thread safe.
-       #:tests? #f  ; There does not seem to be make check or anything similar.
-       #:configure-flags '("--enable-ansi") ; required for use by the maxima package
-       #:make-flags (list
-                     "CFLAGS=-fgnu89-inline" ; removes inline function warnings
-                     (string-append "GCC=" (assoc-ref %build-inputs "gcc")
-                                    "/bin/gcc"))
-       #:phases (modify-phases %standard-phases
-                  (add-before 'configure 'pre-conf
-                    (lambda _
-                      (substitute*
-                        (append
-                         '("pcl/impl/kcl/makefile.akcl"
-                           "add-defs"
-                           "unixport/makefile.dos"
-                           "add-defs.bat"
-                           "gcl-tk/makefile.prev"
-                           "add-defs1")
-                         (find-files "h" "\\.defs"))
-                        (("SHELL=/bin/bash")
-                         (string-append "SHELL=" (which "bash")))
-                        (("SHELL=/bin/sh")
-                         (string-append "SHELL=" (which "sh"))))
-                      (substitute* "h/linux.defs"
-                        (("#CC") "CC")
-                        (("-fwritable-strings") "")
-                        (("-Werror") ""))
-                      #t))
-                  (add-after 'install 'wrap
-                    (lambda* (#:key inputs outputs #:allow-other-keys)
-                      (let* ((gcl (assoc-ref outputs "out"))
-                             (input-path (lambda (lib path)
-                                           (string-append
-                                            (assoc-ref inputs lib) path)))
-                             (binaries '("binutils")))
-                        ;; GCC and the GNU binutils are necessary for GCL to be
-                        ;; able to compile Lisp functions and programs (this is
-                        ;; a standard feature in Common Lisp). While the
-                        ;; the location of GCC is specified in the make-flags,
-                        ;; the GNU binutils must be available in GCL's $PATH.
-                        (wrap-program (string-append gcl "/bin/gcl")
-                          `("PATH" prefix ,(map (lambda (binary)
-                                                  (input-path binary "/bin"))
-                                                binaries))))
-                      #t))
-                  ;; drop strip phase to make maxima build, see
-                  ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
-                  (delete 'strip))))
-    (inputs
-     `(("gmp" ,gmp)
-       ("readline" ,readline)))
-    (native-inputs
-     `(("gcc" ,gcc-4.9)
-       ("m4" ,m4)
-       ("texinfo" ,texinfo)
-       ("texlive" ,texlive)))
-    (home-page "https://www.gnu.org/software/gcl/")
-    (synopsis "A Common Lisp implementation")
-    (description "GCL is an implementation of the Common Lisp language.  It
+  (let ((commit "5956140b1083e2302a59d7ce2054b0b7c2cbb417")
+        (revision "1")) ;Guix package revision
+    (package
+      (name "gcl")
+      (version (string-append "2.6.12-" revision "."
+                              (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://git.savannah.gnu.org/r/gcl.git")
+               (commit commit)))
+         (file-name (string-append "gcl-" version "-checkout"))
+         (sha256
+          (base32 "0mwclf2879mh3d9xqkqhghf58lwy7srsnsq9x0f1cc6j302sy4hb"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:parallel-build? #f  ; The build system seems not to be thread safe.
+         #:tests? #f  ; There does not seem to be make check or anything similar.
+         #:configure-flags '("--enable-ansi") ; required for use by the maxima package
+         #:make-flags (list
+                       (string-append "GCC=" (assoc-ref %build-inputs "gcc")
+                                      "/bin/gcc"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'configure 'pre-conf
+             (lambda _
+               (chdir "gcl")
+               (substitute*
+                   (append
+                    '("pcl/impl/kcl/makefile.akcl"
+                      "add-defs"
+                      "unixport/makefile.dos"
+                      "add-defs.bat"
+                      "gcl-tk/makefile.prev"
+                      "add-defs1")
+                    (find-files "h" "\\.defs"))
+                 (("SHELL=/bin/bash")
+                  (string-append "SHELL=" (which "bash")))
+                 (("SHELL=/bin/sh")
+                  (string-append "SHELL=" (which "sh"))))
+               (substitute* "h/linux.defs"
+                 (("#CC") "CC")
+                 (("-fwritable-strings") "")
+                 (("-Werror") ""))
+               #t))
+           (add-after 'install 'wrap
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((gcl (assoc-ref outputs "out"))
+                      (input-path (lambda (lib path)
+                                    (string-append
+                                     (assoc-ref inputs lib) path)))
+                      (binaries '("binutils")))
+                 ;; GCC and the GNU binutils are necessary for GCL to be
+                 ;; able to compile Lisp functions and programs (this is
+                 ;; a standard feature in Common Lisp). While the
+                 ;; the location of GCC is specified in the make-flags,
+                 ;; the GNU binutils must be available in GCL's $PATH.
+                 (wrap-program (string-append gcl "/bin/gcl")
+                   `("PATH" prefix ,(map (lambda (binary)
+                                           (input-path binary "/bin"))
+                                         binaries))))
+               #t))
+           ;; drop strip phase to make maxima build, see
+           ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
+           (delete 'strip))))
+      (inputs
+       `(("gmp" ,gmp)
+         ("readline" ,readline)))
+      (native-inputs
+       `(("gcc" ,gcc-4.9)
+         ("m4" ,m4)
+         ("texinfo" ,texinfo)
+         ("texlive" ,texlive)
+         ;; The which binary is needed by lsp/gcl_directory.lsp to properly
+         ;; define the Lisp procedure named "which".
+         ("which" ,which)))
+      (home-page "https://www.gnu.org/software/gcl/")
+      (synopsis "A Common Lisp implementation")
+      (description "GCL is an implementation of the Common Lisp language.  It
 features the ability to compile to native object code and to load native
 object code modules directly into its lisp core.  It also features a
 stratified garbage collection strategy, a source-level debugger and a built-in
 interface to the Tk widget system.")
-    (license license:lgpl2.0+)))
+      (license license:lgpl2.0+))))
 
 (define-public ecl
   (package
-- 
2.15.0

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

* [bug#29403] [PATCH] gnu: gcl: Update snapshot.
  2017-11-22 19:06 [bug#29403] [PATCH] gnu: gcl: Update snapshot Kei Kebreau
@ 2017-11-23 15:36 ` Ludovic Courtès
  2017-11-23 19:16   ` Kei Kebreau
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2017-11-23 15:36 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 29403

Hi!

Kei Kebreau <kkebreau@posteo.net> skribis:

> * gnu/packages/lisp.scm (gcl): Update to 2.6.12-1.5956140.
> [arguments]: Remove CFLAGS from make-flags; adjust pre-conf phase.
> [native-inputs]: Add which.

Could you include a rationale for using a development snapshot?
Normally we’d stick to upstream releases, unless there’s a good reason.

Thanks,
Ludo’.

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

* [bug#29403] [PATCH] gnu: gcl: Update snapshot.
  2017-11-23 15:36 ` Ludovic Courtès
@ 2017-11-23 19:16   ` Kei Kebreau
  2017-11-23 21:46     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Kei Kebreau @ 2017-11-23 19:16 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 29403

[-- Attachment #1: Type: text/plain, Size: 1315 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> Hi!
>
> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> * gnu/packages/lisp.scm (gcl): Update to 2.6.12-1.5956140.
>> [arguments]: Remove CFLAGS from make-flags; adjust pre-conf phase.
>> [native-inputs]: Add which.
>
> Could you include a rationale for using a development snapshot?
> Normally we’d stick to upstream releases, unless there’s a good reason.
>
> Thanks,
> Ludo’.

The short story is that there is an issue with GCL's garbage collection
when it gets built on hydra.gnu.org. In the process of investigating
this issue, I noticed that Camm Maguire, GCL maintainer, uses these
development snapshots in the package he oversees for Debian. This
specific snapshot is the latest one and is shipped in Debian unstable,
but even stable uses a fairly recent GCL development snapshot. These
snapshots are mainly small bug fixes and optimizations from the look of
the GCL commit history.

If you think this update is permissible, how does the following commit
message read:

    * gnu/packages/lisp.scm (gcl): Update to 2.6.12-1.5956140.
    [arguments]: Remove CFLAGS from make-flags; adjust pre-conf phase.
    [native-inputs]: Add which.

    This update includes small upstream bug fixes and optimizations.

Thank you,
Kei

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* [bug#29403] [PATCH] gnu: gcl: Update snapshot.
  2017-11-23 19:16   ` Kei Kebreau
@ 2017-11-23 21:46     ` Ludovic Courtès
  2017-11-24 19:54       ` bug#29403: " Kei Kebreau
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2017-11-23 21:46 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 29403

Kei Kebreau <kkebreau@posteo.net> skribis:

>> Kei Kebreau <kkebreau@posteo.net> skribis:
>>
>>> * gnu/packages/lisp.scm (gcl): Update to 2.6.12-1.5956140.
>>> [arguments]: Remove CFLAGS from make-flags; adjust pre-conf phase.
>>> [native-inputs]: Add which.
>>
>> Could you include a rationale for using a development snapshot?
>> Normally we’d stick to upstream releases, unless there’s a good reason.
>>
>> Thanks,
>> Ludo’.
>
> The short story is that there is an issue with GCL's garbage collection
> when it gets built on hydra.gnu.org.

Do you mean that substitutes disappeared?  (I just tried and got
substitutes from berlin.guixsd.org.)

> In the process of investigating this issue, I noticed that Camm
> Maguire, GCL maintainer, uses these development snapshots in the
> package he oversees for Debian. This specific snapshot is the latest
> one and is shipped in Debian unstable, but even stable uses a fairly
> recent GCL development snapshot. These snapshots are mainly small bug
> fixes and optimizations from the look of the GCL commit history.

OK, that certainly justifies this patch.

Nevertheless, we should also kindly invite them to publish these as
formal releases rather than giving Debian a special treatment.

> If you think this update is permissible, how does the following commit
> message read:
>
>     * gnu/packages/lisp.scm (gcl): Update to 2.6.12-1.5956140.
>     [arguments]: Remove CFLAGS from make-flags; adjust pre-conf phase.
>     [native-inputs]: Add which.
>
>     This update includes small upstream bug fixes and optimizations.

Sounds good, yes.

Thanks for explaining!

Ludo’.

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

* bug#29403: [PATCH] gnu: gcl: Update snapshot.
  2017-11-23 21:46     ` Ludovic Courtès
@ 2017-11-24 19:54       ` Kei Kebreau
  0 siblings, 0 replies; 5+ messages in thread
From: Kei Kebreau @ 2017-11-24 19:54 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 29403-done

[-- Attachment #1: Type: text/plain, Size: 2205 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>>> Kei Kebreau <kkebreau@posteo.net> skribis:
>>>
>>>> * gnu/packages/lisp.scm (gcl): Update to 2.6.12-1.5956140.
>>>> [arguments]: Remove CFLAGS from make-flags; adjust pre-conf phase.
>>>> [native-inputs]: Add which.
>>>
>>> Could you include a rationale for using a development snapshot?
>>> Normally we’d stick to upstream releases, unless there’s a good reason.
>>>
>>> Thanks,
>>> Ludo’.
>>
>> The short story is that there is an issue with GCL's garbage collection
>> when it gets built on hydra.gnu.org.
>
> Do you mean that substitutes disappeared?  (I just tried and got
> substitutes from berlin.guixsd.org.)
>

Sorry for not being clearer. I meant that the stratified garbage
collection that GCL uses seems to have a non-reproducible memory
protection issue right now.

>> In the process of investigating this issue, I noticed that Camm
>> Maguire, GCL maintainer, uses these development snapshots in the
>> package he oversees for Debian. This specific snapshot is the latest
>> one and is shipped in Debian unstable, but even stable uses a fairly
>> recent GCL development snapshot. These snapshots are mainly small bug
>> fixes and optimizations from the look of the GCL commit history.
>
> OK, that certainly justifies this patch.
>
> Nevertheless, we should also kindly invite them to publish these as
> formal releases rather than giving Debian a special treatment.
>

I'll send a message to the GCL mailing list.

>> If you think this update is permissible, how does the following commit
>> message read:
>>
>>     * gnu/packages/lisp.scm (gcl): Update to 2.6.12-1.5956140.
>>     [arguments]: Remove CFLAGS from make-flags; adjust pre-conf phase.
>>     [native-inputs]: Add which.
>>
>>     This update includes small upstream bug fixes and optimizations.
>
> Sounds good, yes.
>
> Thanks for explaining!
>
> Ludo’.

Pushed to master as dd0134fcb707452e1c343d66af6088c0be38a285. I also
managed to avoid adding "which" as a build dependency by substituting
paths to gcc, ld and objdump in GCL's top loop. Thanks for the review!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

end of thread, other threads:[~2017-11-24 19:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22 19:06 [bug#29403] [PATCH] gnu: gcl: Update snapshot Kei Kebreau
2017-11-23 15:36 ` Ludovic Courtès
2017-11-23 19:16   ` Kei Kebreau
2017-11-23 21:46     ` Ludovic Courtès
2017-11-24 19:54       ` bug#29403: " Kei Kebreau

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).