all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita@karetnikov.org>
Cc: guix-devel@gnu.org
Subject: Re: Bootstrapping GHC
Date: Tue, 01 Oct 2013 09:04:30 +0200	[thread overview]
Message-ID: <87siwlxyip.fsf@gnu.org> (raw)
In-Reply-To: <87pprpagte.fsf@karetnikov.org> (Nikita Karetnikov's message of "Tue, 01 Oct 2013 06:03:09 +0400")

Nikita Karetnikov <nikita@karetnikov.org> 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	other threads:[~2013-10-01  7:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30 10:49 Bootstrapping GHC Nikita Karetnikov
2013-09-30 19:29 ` Ludovic Courtès
2013-10-01  2:03   ` Nikita Karetnikov
2013-10-01  7:04     ` Ludovic Courtès [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87siwlxyip.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=nikita@karetnikov.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.