unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Federico Beffa <beffa@ieee.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH 3/3] gnu: Add ghc.
Date: Sat, 28 Mar 2015 20:15:07 +0100	[thread overview]
Message-ID: <CAKrPhPMJD1bEu-zRyryy8QfY5cFS2jG6BLTBhcwyp+fOzeVzTA@mail.gmail.com> (raw)
In-Reply-To: <87384sg4ey.fsf@gnu.org>

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

On Wed, Mar 25, 2015 at 10:20 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Could you try ‘guix build ghc -s i686-linux -K’ and then investigate
> from there?  It might be clearer what needs to be patched.

That was indeed very useful! Thanks for making me discover the '-s' option :-)

The attached patch should fix the problem.

Regards,
Fede

[-- Attachment #2: 0001-gnu-ghc-Fix-i686-build.patch --]
[-- Type: text/x-diff, Size: 2528 bytes --]

From 52b593fd287a76b6a7ab04e5a3dc82bf4dc72d6b Mon Sep 17 00:00:00 2001
From: Federico Beffa <beffa@fbengineering.ch>
Date: Sat, 28 Mar 2015 20:09:37 +0100
Subject: [PATCH] gnu: ghc: Fix i686 build.

* gnu/packages/haskell.scm (ghc-bootstrap-7.8.4, ghc): Split
  'ghc-bootstrap-7.8.4' into 'ghc-bootstrap-i686-7.8.4' and
  'ghc-bootstrap-x86_64-7.8.4'. Select the appropriate input in 'ghc'.
---
 gnu/packages/haskell.scm | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 183d0eb..46a4b4f 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -33,22 +33,23 @@
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages python))
 
-;; We use bootstrap binaries with a fix version which can be used to build
-;; more versions of the GHC compiler.
-(define ghc-bootstrap-7.8.4
+(define ghc-bootstrap-x86_64-7.8.4
   (origin
     (method url-fetch)
-    (uri (string-append "https://www.haskell.org/ghc/dist/"
-                        "7.8.4/ghc-7.8.4-"
-                        (if (string-match "x86_64" (%current-system))
-                            "x86_64"
-                            "i386")
-                        "-unknown-linux-deb7.tar.xz"))
+    (uri
+     "https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-x86_64-unknown-linux-deb7.tar.xz")
     (sha256
      (base32
-      (if (string-match "x86_64" (%current-system))
-          "13azsl53xgj20mi1hj9x0xb32vvcvs6cpmvwx6znxhas7blh0bpn"
-          "0wj5s435j0zgww70bj1d3f6wvnnpzlxwvwcyh2qv4qjq5z8j64kg")))))
+          "13azsl53xgj20mi1hj9x0xb32vvcvs6cpmvwx6znxhas7blh0bpn"))))
+
+(define ghc-bootstrap-i686-7.8.4
+  (origin
+    (method url-fetch)
+    (uri
+     "https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-i386-unknown-linux-deb7.tar.xz")
+    (sha256
+     (base32
+      "0wj5s435j0zgww70bj1d3f6wvnnpzlxwvwcyh2qv4qjq5z8j64kg"))))
 
 ;; 43 tests out of 3965 fail.
 ;;
@@ -99,7 +100,10 @@
        ("ghostscript" ,ghostscript)        ; for tests
        ("patchelf" ,patchelf)
        ;; GHC is built with GHC. Therefore we need bootstrap binaries.
-       ("ghc-binary" ,ghc-bootstrap-7.8.4)))
+       ("ghc-binary"
+        ,(if (string-match "x86_64" (or (%current-target-system) (%current-system)))
+             ghc-bootstrap-x86_64-7.8.4
+             ghc-bootstrap-i686-7.8.4))))
     (arguments
      `(#:test-target "test"
        ;; We get a smaller number of test failures by disabling parallel test
-- 
2.2.1


  reply	other threads:[~2015-03-28 19:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-22 20:31 [PATCH 3/3] gnu: Add ghc Federico Beffa
2015-03-25 21:20 ` Ludovic Courtès
2015-03-28 19:15   ` Federico Beffa [this message]
2015-03-31 19:31     ` Mark H Weaver
  -- strict thread matches above, loose matches on Subject: below --
2015-02-26 19:54 Federico Beffa
2015-03-01 12:44 ` Federico Beffa
2015-03-01 14:55   ` Ludovic Courtès
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

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=CAKrPhPMJD1bEu-zRyryy8QfY5cFS2jG6BLTBhcwyp+fOzeVzTA@mail.gmail.com \
    --to=beffa@ieee.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@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).