From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89946 invoked by alias); 17 May 2017 20:26:37 -0000 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org Received: (qmail 89929 invoked by uid 89); 17 May 2017 20:26:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=sad, H*Ad:U*aph, it=e2, doesn=e2?= X-HELO: sender-of-o51.zoho.com Received: from sender-of-o51.zoho.com (HELO sender-of-o51.zoho.com) (135.84.80.216) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 May 2017 20:26:35 +0000 Received: from localhost (port-92-200-235-5.dynamic.qsc.de [92.200.235.5]) by mx.zohomail.com with SMTPS id 14950527923461013.7740518468285; Wed, 17 May 2017 13:26:32 -0700 (PDT) References: <9335b6e8-ed7f-1e8d-4022-656da4681770@redhat.com> <59a501d2701f$b1bb1290$153137b0$@yahoo.com> <87ziiq937c.fsf@elephly.net> <59dc01d2704c$0d4ea910$27ebfb30$@yahoo.com> <878tq86rjx.fsf@elephly.net> <92b25477-ed9d-f35e-a9b4-2cb90e425cbd@ubuntu.com> <8760lc6q5n.fsf@elephly.net> <56f7c21c-c029-d3fe-0bc5-b969f5ed15a6@redhat.com> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Ricardo Wurmus To: =?utf-8?B?QW5kw6/Drw==?= Cc: Andrew Haley , java , bill.chatfield@yahoo.com, mohan NMH , Matthias Klose Subject: Re: Fwd: gcj can not import packages In-reply-to: X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Wed, 17 May 2017 20:26:00 -0000 Message-ID: <87vaozqlfv.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00000.txt.bz2 Andïï writes: > On 19 Jan 2017 09:59, "Andrew Haley" wrote: > > On 18/01/17 20:59, Ricardo Wurmus wrote: >> The Bootstrappable Builds project[1] ties to remove the number of >> trusted binaries to bootstrap a modern system. One way to get there is >> to have a bootstrap path that leads to the unavoidable C compiler. >> >> And even the C compiler doesn’t *have* to be a trusted binary. The Mes >> project[2] tries to build a C compiler using a minimal, hand-verifyable >> Scheme implementation, for example. >> >> I just find it sad to see GCJ go, because it makes it quite a bit harder >> to build the OpenJDK without a trusted JDK. > > It could be done with a chain of OpenJDK versions going back to > OpenJDK 6. Each release can build the previous one. You'd also > need a chain of old GCC releases, because old OpenJDK wasn't > necessarily compilable with a modern GCC. > > > Currently, it's possible to go from GCJ 6.2 straight to building OpenJDK 7 > with IcedTea 2.x. There's no need to involve OpenJDK 6 unless needed. > > > But bear in mind that even GCJ needed precompiled binaries: the > class library could be recompiled from source, but it needed a > binary class library. So I'm not convinced that it's much of an > advantage to use GCJ, really. > > > Exactly. There's nothing particular to GCJ that makes it more amenable to > bootstrapping. It just happened to contain pre-built class files and be > part of the compiler collection that was already being built to provide C > and C++ compilers. Lack of development in recent years has meant we've had > to work around a number of issues with it in IcedTea. Thank you for this comment. I really wasn’t aware of the fact that the GCC sources bundled pre-built class files. In the past few days I’ve experimented with a clean bootstrap from source with GNU Guix and it looks like it’s possible. Unfortunately, it does depend on unmaintained software (such as sablevm, jamvm, and an older version of ECJ), and it would be great if the parts that are needed for a from-source bootstrap would eventually make it into IcedTea. The resulting patches for Guix, which demonstrate the bootstrap chain are shown here: http://lists.gnu.org/archive/html/guix-patches/2017-05/msg00942.html (I may add a full write-up later and publish it at http://bootstrappable.org.) > Going forward, my intention is to make IcedTea self-sufficient by using > pre-compiled class files in the same manner as GCJ. This should make > bootstrapping easier in the long run. Unfortunately, bootstrapping from binaries is not desirable for most distributions of the GNU system. Ideally, there would be an optional interpreter written in some language other than Java that would be just sufficient to interpret enough of Java to compile a first stage. This is what GNU Guile does. Admittedly, this might be a considerably more challenging task for the JDK. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net