<br><br><div class="gmail_quote">On Thu, Aug 20, 2009 at 8:32 AM, Andrew John Hughes <span dir="ltr">&lt;<a href="mailto:gnu_andrew@member.fsf.org">gnu_andrew@member.fsf.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/8/20 Michael Franz &lt;<a href="mailto:mvfranz@gmail.com">mvfranz@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi,<br>
&gt;<br>
&gt; It has taken a few days but I have figured out why my rt-closed.jar is<br>
&gt; missing a bunch of classes.<br>
&gt;<br>
&gt; I am building on OS X and using either Apple&#39;s JKD or an older version of<br>
&gt; OpenJDK.  It seems that on Fedora the creation of the rt-closed.jar using<br>
&gt; gcj to compile the sources in rt/ .  The class files are created in lib/rt,<br>
&gt; this is then jar&#39;ed to create rt-closed.jar.  It seems that gcj (and ecj)<br>
&gt; will put classes that are reference (directly/indirectly) by the classes it<br>
&gt; compile into the output directory.  This explains why lib/rt has class files<br>
&gt; that are not in rt.  Since Apple&#39;s JDK or OpenJDK itself do not do this the<br>
&gt; rt-closed.jar is missing classes that are assumed to be there later causing<br>
&gt; the bootstrap process to fail.<br>
&gt;<br>
&gt; Is this functionality of gcj and ecj an undocumented switch in OpenJDK?<br>
&gt;<br>
&gt; Michael<br>
&gt;<br>
<br>
</div></div>Well, I believe Apple&#39;s JDK is a Sun derivative too, so its behaviour<br>
being similar to OpenJDK is not too much of a surprise.  When or how<br>
it was derived is impossible to tell as it&#39;s a proprietary product.<br>
Equally, gcj uses ecj so we&#39;re only talking about the difference in<br>
two compilers here: ecj and javac.</blockquote><div>I didn&#39;t know gcj was using ecj.  I thought it had its own implementation. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
I believe the purpose of rt-closed.jar is to precompile classes from<br>
OpenJDK that would otherwise be present in a Sun-derived JDK to begin<br>
with (this bit is so old it predates my involvement in IcedTea).  So,<br>
although ecj spits out every class it touches, the loss shouldn&#39;t<br>
matter on with Sun-derived boot JDKs -- in theory.</blockquote><div>It does matter in the case where the bootclasspath is replaced to use only rt-closed.jar and some directories. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
The whole build process is currently based on two presumptions:<br>
<br>
  * If you build with the defaults, you do a full bootstrap build: gcj<br>
for stage 1 and the built JDK for stage 2.<br>
  * If you build with --disable-bootstrap (renamed from<br>
--with-icedtea/--with-openjdk et. al. in IcedTea7, but still under<br>
those names in 6) then you are assumed to be doing a build closer to<br>
the OpenJDK default, so less patches are applied, etc.<br>
<br>
I&#39;m working on making the stages JDK-independent but this takes time.<br>
The first stage will be getting a full build working with OpenJDK but<br>
as you (and others) have seen, we aren&#39;t there yet.  This is<br>
documented in the NEWS for 1.11.<br>
<br>
You could try building using --disable-bootstrap for now, or just do a<br>
raw OpenJDK build without IcedTea by checking out the IcedTea forest:<br>
hg fclone <a href="http://hg.openjdk.java.net/icedtea/jdk7" target="_blank">http://hg.openjdk.java.net/icedtea/jdk7</a><br>
</blockquote><div>I have been using the openjdk-bsdport, but I was not able to build since there you need Java 7 features and I don&#39;t have a working Java 7 JDK (one that can handle the new features).  I have not tried the Soylatte version.  So, I am actually interested in the bootstrapping process of IcedTea. <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Patches are of course welcome, but touching such a hairy build system<br>
is not for the faint-hearted :)</blockquote><div>I have looked at this whole build process and get faint all the time.<br> <br>I was able to use --with-javac=ecj and get past this issue.  I was not able to figure out what the --with-ecj switch did.<br>
<br>I now have a test_gamma issue using the bootstrap JDK for the second build.  I may be posting the details later, depends on how far I get.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
--<br>
Andrew :-)<br>
<br>
Free Java Software Engineer<br>
Red Hat, Inc. (<a href="http://www.redhat.com" target="_blank">http://www.redhat.com</a>)<br>
<br>
Support Free Java!<br>
Contribute to GNU Classpath and the OpenJDK<br>
<a href="http://www.gnu.org/software/classpath" target="_blank">http://www.gnu.org/software/classpath</a><br>
<a href="http://openjdk.java.net" target="_blank">http://openjdk.java.net</a><br>
<br>
PGP Key: 94EFD9D8 (<a href="http://subkeys.pgp.net" target="_blank">http://subkeys.pgp.net</a>)<br>
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8<br>
</blockquote></div><br>