From: ludo@gnu.org (Ludovic Courtès)
To: Federico Beffa <beffa@ieee.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH 3/3] gnu: Add ghc.
Date: Sun, 01 Mar 2015 15:55:46 +0100 [thread overview]
Message-ID: <87385oephp.fsf@gnu.org> (raw)
In-Reply-To: <CAKrPhPPu8qYSkyJ5gRy-TOPY7K0dPAFCZdcGU8kYNd-bTg82KQ@mail.gmail.com> (Federico Beffa's message of "Sun, 1 Mar 2015 13:44:57 +0100")
Federico Beffa <beffa@ieee.org> skribis:
> I do not create a ready to use bootstrap package because the resulting
> store entry amounts to 940MB! I just keep an unmodified fixed version
> tarball (68MB) and take care to patch it in custom phases of the final
> GHC package.
Sounds good.
> From c39f2fa29bd614227f501cb83f72e2aa827a9123 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 25 Feb 2015 20:20:24 +0100
> Subject: [PATCH] gnu: Add ghc.
>
> * gnu/packages/haskell.scm: New file.
[...]
> +;; 43 tests out of 3965 fail.
> +;;
> +;; Most of them do not appear to be serious:
> +;;
> +;; - some tests generate files referring to "/bin/sh" and "/bin/ls". I've not
> +;; figured out how these references are generated.
> +;;
> +;; - Some tests allocate more memory than expected (ca. 3% above upper limit)
> +;;
> +;; - Some tests try to load unavailable libriries: Control.Concurrent.STM,
> +;; Data.Vector, Control.Monad.State.
> +;;
> +;; - Test posix010 tries to check the existence of a user on the system:
> +;; getUserEntryForName: does not exist (no such user)
All these seem workable: #1 and #4 should be easily fixed by adjusting
to the specifics of our build environment, and #2 and #3 might just need
to be skipped. But let’s get this patch in first. :-)
[...]
> + (substitute* (list "testsuite/timeout/Makefile"
> + "testsuite/timeout/timeout.py"
> + "testsuite/timeout/timeout.hs"
> + "testsuite/tests/rename/prog006/Setup.lhs"
> + "testsuite/tests/programs/life_space_leak/life.test")
> + (("/bin/sh") (which "sh"))
> + (("/bin/rm") "rm"))
Perhaps (find-files "testsuite" ".*") would be enough?
> + ;; We need to set the locale for the tests to produce results
> + ;; identical to the expected ones.
s/set the locale/install a UTF-8 locale/ (presumably.)
[...]
> + (alist-cons-before
> + 'configure 'install-bin
This phase installs bootstrap binaries to $out/bin and adds them to
$PATH, right? Wouldn’t it be enough to install them to $TMPDIR/bin and
add that to $PATH?
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((binaries
> + (list
> + "./utils/ghc-pwd/dist-install/build/tmp/ghc-pwd"
> + "./utils/hpc/dist-install/build/tmp/hpc"
> + "./utils/haddock/dist/build/tmp/haddock"
> + "./utils/hsc2hs/dist-install/build/tmp/hsc2hs"
> + "./utils/runghc/dist-install/build/tmp/runghc"
> + "./utils/ghc-cabal/dist-install/build/tmp/ghc-cabal"
> + "./utils/hp2ps/dist/build/tmp/hp2ps"
> + "./utils/ghc-pkg/dist-install/build/tmp/ghc-pkg"
> + "./utils/unlit/dist/build/tmp/unlit"
> + "./ghc/stage2/build/tmp/ghc-stage2"))
Could we just list base names and do
(append-map (lambda (program)
(find-files "." (string-append "^" program "$")))
'("ghc-pwd" "hpc" ...))
> + (ld-so (string-append (assoc-ref inputs "libc")
> + "/lib/ld-linux-x86-64.so.2"))
Please use ,(glibc-dynamic-linker) for the base name.
[...]
> + (system* (string-append (getcwd) "/configure")
> + (string-append "--prefix=" ghc-bootstrap-prefix)
> + (string-append "--with-gmp-libraries=" gmp-lib)
> + (string-append "--with-gmp-includes=" gmp-include))
> + (setenv "PATH"
> + (string-append (getenv "PATH") ":"
> + ghc-bootstrap-prefix "/bin"))
> + (zero? (system* "make" "install")))))
Perhaps move “make install” to a separate phase?
Thanks for the great work!
Eventually we should move Hugs to haskell.scm as well.
Ludo’.
next prev parent reply other threads:[~2015-03-01 14:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 19:54 [PATCH 3/3] gnu: Add ghc Federico Beffa
2015-03-01 12:44 ` Federico Beffa
2015-03-01 14:55 ` Ludovic Courtès [this message]
2015-03-02 6:29 ` Mark H Weaver
2015-03-02 11:09 ` Federico Beffa
2015-03-03 12:24 ` Ludovic Courtès
2015-03-05 8:26 ` Federico Beffa
2015-03-08 21:36 ` Ludovic Courtès
2015-03-21 23:21 ` Mark H Weaver
-- strict thread matches above, loose matches on Subject: below --
2015-03-22 20:31 Federico Beffa
2015-03-25 21:20 ` Ludovic Courtès
2015-03-28 19:15 ` Federico Beffa
2015-03-31 19:31 ` Mark H Weaver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87385oephp.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=beffa@ieee.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).