guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bootstrapping GHC


From: Ludovic Courtès
Subject: Re: Bootstrapping GHC
Date: Tue, 01 Oct 2013 09:04:30 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Nikita Karetnikov <address@hidden> skribis:

>> I don’t 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.html
>
>> Wouldn’t that be better than fiddling with binaries out-of-band?
>
> The recent versions of the compiler don’t support this.  So you have to
> use the old version.  I’ve spent four hours on this and didn’t even get
> to the intermediate C files (that’s the first step).  The compiler
> depends on the old libraries, so you have to downgrade.  That’s the main
> difficulty.
>
> Also, you can’t build GHC 7.6.3 using GHC 6.4.1.  Users would have 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’d prefer to avoid this if it’s possible.

Blech.  I find it worrisome if GHC doesn’t have a better bootstrapping
story.  How do they port it then?

>>> 1. We’d have to host the binaries (step 2) somewhere and repeat the
>>>    process whenever the hash of ‘/bin/sh’ 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 = "/nix/var/nix/profiles/default/guix-profile/bin/sh"
> scheme@(guile-user)> (readlink $1)
> $2 = "/nix/store/fzcdfwyyin5dr7finlaq2kph396nrlli-bash-4.2/bin/sh"
>
> How often may the hash change?  In other words, what does Bash use to
> “source” the hash function?  Will it happen whenever you merge
> ‘core-updates’?

Yes.  (The hash in the store file name is the hash of all the inputs
that led to that directory (info "(guix) Introduction").)

>> The ‘uri’ argument can be a list:
>
>>   (origin
>>     (method url-fetch)
>>     (uri (list "http://..."; "file://..."))
>>     (sha256 ...))
>
>> However, ‘url-fetch’ doesn’t support file://.
>
>> The other option would be to allow ‘source’ to be a list; that’s easily
>> implemented, just not done yet.
>
> Thanks, I’ll look into it.

Great, thanks.

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]