From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Bootstrapping GHC Date: Tue, 01 Oct 2013 09:04:30 +0200 Message-ID: <87siwlxyip.fsf@gnu.org> References: <87siwma8j6.fsf@karetnikov.org> <87li2e5crm.fsf@gnu.org> <87pprpagte.fsf@karetnikov.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]:45643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQu5S-00083V-3v for guix-devel@gnu.org; Tue, 01 Oct 2013 03:09:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQu5M-0004sO-Uo for guix-devel@gnu.org; Tue, 01 Oct 2013 03:09:38 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:48323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQu5M-0004sF-OQ for guix-devel@gnu.org; Tue, 01 Oct 2013 03:09:32 -0400 In-Reply-To: <87pprpagte.fsf@karetnikov.org> (Nikita Karetnikov's message of "Tue, 01 Oct 2013 06:03:09 +0400") 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: Nikita Karetnikov Cc: guix-devel@gnu.org Nikita Karetnikov skribis: >> I don=E2=80=99t know GHC, but apparently it can be bootstrapped from >> intermediate generated C files: > >> http://www.haskell.org/ghc/docs/6.4.1/html/building/sec-porting-ghc.ht= ml > >> Wouldn=E2=80=99t that be better than fiddling with binaries out-of-band? > > The recent versions of the compiler don=E2=80=99t support this. So you h= ave to > use the old version. I=E2=80=99ve spent four hours on this and didn=E2= =80=99t even get > to the intermediate C files (that=E2=80=99s the first step). The compiler > depends on the old libraries, so you have to downgrade. That=E2=80=99s t= he main > difficulty. > > Also, you can=E2=80=99t build GHC 7.6.3 using GHC 6.4.1. Users would hav= e to > build several compilers any time they want the latest version. That may > take more than six hours (or even longer) on an average machine. > > So I=E2=80=99d prefer to avoid this if it=E2=80=99s possible. Blech. I find it worrisome if GHC doesn=E2=80=99t have a better bootstrapp= ing story. How do they port it then? >>> 1. We=E2=80=99d have to host the binaries (step 2) somewhere and repeat= the >>> process whenever the hash of =E2=80=98/bin/sh=E2=80=99 changes. How= often will this >>> happen? > >> The hash of /bin/sh? Where did you see /bin/sh? :-) > > I meant this one: > > scheme@(guile-user)> ,use (guix build utils) > scheme@(guile-user)> (which "sh") > $1 =3D "/nix/var/nix/profiles/default/guix-profile/bin/sh" > scheme@(guile-user)> (readlink $1) > $2 =3D "/nix/store/fzcdfwyyin5dr7finlaq2kph396nrlli-bash-4.2/bin/sh" > > How often may the hash change? In other words, what does Bash use to > =E2=80=9Csource=E2=80=9D the hash function? Will it happen whenever you = merge > =E2=80=98core-updates=E2=80=99? Yes. (The hash in the store file name is the hash of all the inputs that led to that directory (info "(guix) Introduction").) >> The =E2=80=98uri=E2=80=99 argument can be a list: > >> (origin >> (method url-fetch) >> (uri (list "http://..." "file://...")) >> (sha256 ...)) > >> However, =E2=80=98url-fetch=E2=80=99 doesn=E2=80=99t support file://. > >> The other option would be to allow =E2=80=98source=E2=80=99 to be a list= ; that=E2=80=99s easily >> implemented, just not done yet. > > Thanks, I=E2=80=99ll look into it. Great, thanks. Ludo=E2=80=99.