[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] gnu: Add ghc.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 3/3] gnu: Add ghc. |
Date: |
Tue, 03 Mar 2015 13:24:34 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Federico Beffa <address@hidden> skribis:
> address@hidden (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:
[...]
> ?: 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"
Right, that’s because ‘regexp-exec’ uses libc’s regexp functions, for
which the nul character marks the end of the string.
This file presumably cannot be patched with ‘substitute*’. Is it a problem?
>> 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 :-).
OK, sorry for the confusion.
>>> + (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.
Weird, but OK then.
Thanks,
Ludo’.