public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Andïï <gnu_andrew@member.fsf.org>
Cc: Andrew Haley <aph@redhat.com>, java <java@gcc.gnu.org>,
	bill.chatfield@yahoo.com, mohan NMH <mohan.nmh2@gmail.com>,
	Matthias Klose <doko@ubuntu.com>
Subject: Re: Fwd: gcj can not import packages
Date: Wed, 17 May 2017 20:26:00 -0000	[thread overview]
Message-ID: <87vaozqlfv.fsf@elephly.net> (raw)
In-Reply-To: <CAFXTvn525N1D_EOuCAWXSJugCpZCZCkc5GfuhNJ1nPoDK0DAoQ@mail.gmail.com>


Andïï <gnu_andrew@member.fsf.org> writes:

> On 19 Jan 2017 09:59, "Andrew Haley" <aph@redhat.com> 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

  parent reply	other threads:[~2017-05-17 20:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANV4OqjehvrZUaMGbwn0Gu3KsesTy7aWVhY9cPETpnqwf_Zo0A@mail.gmail.com>
2016-11-09 11:29 ` mohan NMH
2016-11-09 12:26   ` Andrew Haley
2016-11-09 12:49     ` mohan NMH
2016-11-09 13:29       ` Andrew Haley
2017-01-16 17:41         ` Bill Chatfield via java
2017-01-16 20:10           ` Ricardo Wurmus
2017-01-16 22:58             ` Bill Chatfield via java
2017-01-16 23:24               ` Anthony Green
2017-01-17  9:56               ` Andrew Haley
2017-01-18 20:29                 ` Ricardo Wurmus
2017-01-18 20:40                   ` Matthias Klose
2017-01-18 20:59                     ` Ricardo Wurmus
2017-01-19  9:59                       ` Andrew Haley
     [not found]                         ` <CAFXTvn525N1D_EOuCAWXSJugCpZCZCkc5GfuhNJ1nPoDK0DAoQ@mail.gmail.com>
2017-05-17 20:26                           ` Ricardo Wurmus [this message]
2017-01-17  9:58           ` Andrew Haley
2017-01-17 15:21             ` Bill Chatfield via java

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=87vaozqlfv.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=aph@redhat.com \
    --cc=bill.chatfield@yahoo.com \
    --cc=doko@ubuntu.com \
    --cc=gnu_andrew@member.fsf.org \
    --cc=java@gcc.gnu.org \
    --cc=mohan.nmh2@gmail.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).