unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Federico Beffa <beffa@ieee.org>
To: "Mark H Weaver" <mhw@netris.org>, "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH 3/3] gnu: Add ghc.
Date: Mon, 2 Mar 2015 12:09:18 +0100	[thread overview]
Message-ID: <CAKrPhPOMn2eggP670Ev06D2nHk0yrkEhB5AnQYh3g=sWPRsVqw@mail.gmail.com> (raw)
In-Reply-To: <8761aj29qk.fsf@netris.org>

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

>> +            (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?

Somehow find-files appears to have problems with a file. This happens
even if I install the en_US.UTF-8 locale:

Backtrace:
In ice-9/boot-9.scm:
2401: 19 [save-module-excursion #<procedure 1691880 at
ice-9/boot-9.scm:4045:3 ()>]
4050: 18 [#<procedure 1691880 at ice-9/boot-9.scm:4045:3 ()>]
1724: 17 [%start-stack load-stack ...]
1729: 16 [#<procedure 16a6c60 ()>]
In unknown file:
   ?: 15 [primitive-load
"/gnu/store/qxy6784klrpjqnmxw00l6fpkqi60jwad-ghc-7.8.4-guile-builder"]
In ice-9/eval.scm:
 387: 14 [eval # ()]
In srfi/srfi-1.scm:
 830: 13 [every1 #<procedure 17b2520 at
/gnu/store/v4q9shphawhckqp35x05fxz5sfijv92r-module-import/guix/build/gnu-build-system.scm:475:9
(expr)> ...]
In /gnu/store/v4q9shphawhckqp35x05fxz5sfijv92r-module-import/guix/build/gnu-build-system.scm:
 479: 12 [#<procedure 17b2520 at
/gnu/store/v4q9shphawhckqp35x05fxz5sfijv92r-module-import/guix/build/gnu-build-system.scm:475:9
(expr)> #]
In ice-9/eval.scm:
 432: 11 [eval # #]
In srfi/srfi-1.scm:
 619: 10 [for-each #<procedure 1b744e0 at ice-9/eval.scm:416:20 (a)> #]
In ice-9/boot-9.scm:
 171: 9 [with-throw-handler #t ...]
 867: 8 [call-with-input-file
"testsuite/tests/codeGen/should_run/cgrun037.stdout" ...]
In /gnu/store/v4q9shphawhckqp35x05fxz5sfijv92r-module-import/guix/build/utils.scm:
 443: 7 [#<procedure 1f2ae00 at
/gnu/store/v4q9shphawhckqp35x05fxz5sfijv92r-module-import/guix/build/utils.scm:442:10
(in)> #<input: testsuite/tests/codeGen/should_run/cgrun037.stdout 11>]
 469: 6 [#<procedure 1a9f6a0 at
/gnu/store/v4q9shphawhckqp35x05fxz5sfijv92r-module-import/guix/build/utils.scm:465:6
(in out)> #<input: testsuite/tests/codeGen/should_run/cgrun037.stdout
11> ...]
In srfi/srfi-1.scm:
 465: 5 [fold #<procedure 19d5180 at
/gnu/store/v4q9shphawhckqp35x05fxz5sfijv92r-module-import/guix/build/utils.scm:469:32
(r+p line)> ...]
In /gnu/store/v4q9shphawhckqp35x05fxz5sfijv92r-module-import/guix/build/utils.scm:
 472: 4 [#<procedure 19d5180 at
/gnu/store/v4q9shphawhckqp35x05fxz5sfijv92r-module-import/guix/build/utils.scm:469:32
(r+p line)> # ...]
In ice-9/regex.scm:
 189: 3 [list-matches #<regexp 1b66100> "hello\x00 world\n" 0]
 176: 2 [fold-matches #<regexp 1b66100> "hello\x00 world\n" ...]
In unknown file:
   ?: 1 [regexp-exec #<regexp 1b66100> "hello\x00 world\n" 0 0]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 1f2ae40 at ice-9/boot-9.scm:97:6 (thrown-k .
args)> misc-error ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 1f2ae40 at
ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: string contains #\nul character: "hello\x00 world\n"
builder for `/gnu/store/ixnpnrj6g6svayzz5kw0yhigm5vgjd2g-ghc-7.8.4.drv'
failed with exit code 1
@ build-failed /gnu/store/ixnpnrj6g6svayzz5kw0yhigm5vgjd2g-ghc-7.8.4.drv
- 1 builder for
`/gnu/store/ixnpnrj6g6svayzz5kw0yhigm5vgjd2g-ghc-7.8.4.drv' failed
with exit code 1
cannot build derivation
`/gnu/store/659as6vx99qfrnwl1cc59kkgwiqwhg2l-ghc-7.8.4.drv': 1
dependencies couldn't be built
killing process 10073

>
> [...]
>
>> +           (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?

That is what is happening :-). The bootstrap binaries are installed in a
temporary local directory inside the build directory:

       (let* ((ghc-bootstrap-path
               (string-append (getcwd) "/" ,name "-" ,version "/ghc-bin"))
              (ghc-bootstrap-prefix
               (string-append ghc-bootstrap-path "/usr" )))

               ...

                  (system* (string-append (getcwd) "/configure")
                           (string-append "--prefix=" ghc-bootstrap-prefix)

                           ...

>
>> +            (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" ...))

Here I'm puzzled. If I test the command that you suggest by displaying
the generated list (during the phase execution), I see that it produces
the same list as the original one (at least as displayed on screen).

In spite of this, differently than with the explicit list, the phase
fails because somehow the listed files do not get patched by

                  (for-each
                   (cut system* "patchelf" "--set-interpreter" ld-so <>)
                   binaries)

Unless you understand what's happening, I would propose for now to
keep the explicit lists.

Regards,
Fede

  reply	other threads:[~2015-03-02 11:09 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
2015-03-02  6:29   ` Mark H Weaver
2015-03-02 11:09     ` Federico Beffa [this message]
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='CAKrPhPOMn2eggP670Ev06D2nHk0yrkEhB5AnQYh3g=sWPRsVqw@mail.gmail.com' \
    --to=beffa@ieee.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=mhw@netris.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).