From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 3/3] gnu: Add ghc. Date: Tue, 03 Mar 2015 13:24:34 +0100 Message-ID: <87r3t6nu9p.fsf@gnu.org> References: <8761aj29qk.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSlsO-000482-2n for guix-devel@gnu.org; Tue, 03 Mar 2015 07:24:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSlsK-0005g1-TM for guix-devel@gnu.org; Tue, 03 Mar 2015 07:24:40 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSlsK-0005fx-Q8 for guix-devel@gnu.org; Tue, 03 Mar 2015 07:24:36 -0500 In-Reply-To: (Federico Beffa's message of "Mon, 2 Mar 2015 12:09:18 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Federico Beffa Cc: Guix-devel Federico Beffa skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >>> + (substitute* (list "testsuite/timeout/Makefile" >>> + "testsuite/timeout/timeout.py" >>> + "testsuite/timeout/timeout.hs" >>> + "testsuite/tests/rename/prog006/Setup.l= hs" >>> + "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 # "hello\x00 world\n" 0 0] > In ice-9/boot-9.scm: > 106: 0 [# args)> misc-error ...] > > ice-9/boot-9.scm:106:20: In procedure # ice-9/boot-9.scm:97:6 (thrown-k . args)>: > ice-9/boot-9.scm:106:20: string contains #\nul character: "hello\x00 worl= d\n" Right, that=E2=80=99s because =E2=80=98regexp-exec=E2=80=99 uses libc=E2=80= =99s regexp functions, for which the nul character marks the end of the string. This file presumably cannot be patched with =E2=80=98substitute*=E2=80=99. = Is it a problem? >> This phase installs bootstrap binaries to $out/bin and adds them to >> $PATH, right? Wouldn=E2=80=99t 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-c= abal" >>> + "./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=E2=80=99.