Using A Sun based Javac to compile rt-closed.jar different from using gcj

Michael Franz mvfranz at
Thu Aug 20 17:20:24 PDT 2009

> Er... you *shouldn't* need JDK7, that would be self-defeating.  I
> regularly build OpenJDK with IcedTea6 which is an implementation of
> Java 6.
> Note that Zero is now part of the IcedTea forest so in theory you can do:
The issue I run into when trying to compile the BSD port is here (from
someone else) ,
so, if it is possible to build OpenJDK with a OpenJDK 6 I don't know how to
get around that issue.

> $ hg fclone
> $ cd jdk7
> $ hg fpull -u
> and create a hybrid of the two.  Never tried it though.
These seem like it will just be a world of hurt.

> > 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.
> >
> IIRC, it allows you to pass a path to an ecj binary.  What
> command-line options are you passing in full?

I passed the full :  --with-ecj=/opt/local/bin/ecj

Then I checked to see if the 'using ecj check' was yes or no.  It was only
yes when I passed ecj using --with-javac

> IcedTea7 does the following:
> * If --with-javac is specified, it uses that.
> * If not, it checks for javac in ${JDK_HOME}/bin/javac.  If
> --with-jdk-home is not specified, then each of the following is tried:
> /usr/lib/jvm/java-gcj
> /usr/lib/jvm/gcj-jdk
> /usr/lib/jvm/cacao
> /usr/lib/jvm/java-openjdk
> /usr/lib/jvm/icedtea6
> /usr/lib/jvm/java-6-openjdk
> /usr/lib/jvm/openjdk
> /usr/lib/jvm/java-icedtea
> The first three are omitted if --disable-bootstrap is used.  The first
> one that exists is used.
> * If JAVAC is still not set, then it looks for ecj either on the path
> or as specified by --with-ecj.
> * Should it not find that, it will use ecj.jar and ${JAVA} to run it.
> If that can't even be found, configure exits with an error.
> In short, it tries its level best to find you a compiler.  config.log
> will tell you which one has been chosen for JAVAC.  By default (i.e.
> ./configure) it will set JAVAC, JAVA, etc. from the first JDK it
> finds.
I guess setting javac is the easiest way to use ecj to compile

> > 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.
> Ugh, if that is failing, it suggests the JDK you built is bad.
The version that is built works fine outside of the test_gamma logic.  I can
actually use it for the bootstrap, and get to the same point.  I am thinking
that the is not correct.  If I source that and then try to use
java/javac it fails.  No java/lang/Object found, if I specify the
Xbootclasspath with an rt.jar, the zip library is not found. --

> Andrew :-)
> Free Java Software Engineer
> Red Hat, Inc. (
> Support Free Java!
> Contribute to GNU Classpath and the OpenJDK
> PGP Key: 94EFD9D8 (
> Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the distro-pkg-dev mailing list