From mboxrd@z Thu Jan 1 00:00:00 1970 From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Subject: Re: Removing compilers that cannot be bootstrapped Date: Mon, 21 Mar 2016 20:15:34 +0100 Message-ID: <87pounzlpl.fsf@T420.taylan> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai5Ii-0002Tc-37 for guix-devel@gnu.org; Mon, 21 Mar 2016 15:15:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai5Ig-0004sy-Pm for guix-devel@gnu.org; Mon, 21 Mar 2016 15:15:40 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai5Ig-0004ss-CC for guix-devel@gnu.org; Mon, 21 Mar 2016 15:15:38 -0400 Received: by mail-wm0-x244.google.com with SMTP id l68so24331903wml.3 for ; Mon, 21 Mar 2016 12:15:38 -0700 (PDT) In-Reply-To: (David Thompson's message of "Mon, 21 Mar 2016 13:54:24 -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: "Thompson, David" Cc: guix-devel "Thompson, David" writes: > Haskell, OCaml, Chicken, and other compilers that we package have a > serious issue that many of us are aware of: they cannot be built from > source! They rely upon pre-built binaries of the same compiler. I > understand that it's very inconvenient to not have these compilers > available to us, and all of the software that is written in their > respective languages, but I feel like all of our work is undermined by > making exceptions for them. I would like to remove compilers that > don't have a bunch of dependent packages yet such as Chicken until > upstream fixes the issue. But we have tons of Haskell packages and a > handful of OCaml packages and it would be heartbreaking to some to > remove all of that hard work. > > What can we possibly do to avoid being yet another distro that relies > on a bunch of blobs (leaving the *true* bootstrap binaries out of it > for now)? A while back Mark raised the idea of hosting one pre-compiled bootstrap version of each such compiler, and use that to compile further versions. This way the number of blobs is one per such compiler, instead of one for every new version of each such compiler. It seemed like a good medium-term solution to me. I'm not sure how it would be implemented. I think the original proposal had it that we keep an internal bootstrap version of the package, which works by downloading a blob, and this is used to compile the true, public package. However, we would need to update the bootstrap version whenever it becomes too old to compile the newest version. So new untrusted blobs enter the picture every once in a while. Maybe frequently, if some of these compilers don't care much about supporting the ability to be compiled with somewhat older versions of themselves. A solution to that in turn might be to keep a growing list of intermediate versions of the compiler in addition to the bootstrap and newest versions. The first version in this list can be compiled via the bootstrap version, each nth version in the list can be compiled with the n-1th version, and the last version in the list is used to compile the current, newest version. (define %foo-compiler-bootstrap (package ... (source some-blob) ...)) (define %foo-compiler-intermediate-versions-list '("1.1" "1.7" "2.2" ...)) (define %foo-compiler-intermediate-versions (magic %foo-compiler-bootstrap %foo-compiler-intermediate-versions-list)) (define foo-compiler (package ... (native-inputs `(("foo-compiler" ,(last %foo-compiler-intermediate-versions)) ...)) ...)) So when someone instructs guix to rebuild the world from scratch, it downloads the bootstrap blob, then builds 1.1 with it, then builds 1.7 with that, then 2.2 with that, and so on, and ultimately the current version. This way it's truly one blob for each such compiler in guix. And one day, that blob can be replaced with a verified-safe one. I just came up with this and haven't thought much about it. Just throwing it out there. > - Dave Taylan