Changes between Version 5 and Version 6 of jdk


Ignore:
Timestamp:
09/18/2008 02:35:14 AM (13 years ago)
Author:
DJ Lucas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jdk

    v5 v6  
    3030}}}
    3131
     32
     33= OpenJDK-6 (IcedTea-6) =
     34
     35First, BLFS-6.3 is the minimum target and you must have a working Ant (which requires a JDK), and GTK+.
     36
     37Next, you will need GCJ-4.3.0 or better (gcc-4.3.2 at the time of writing).
     38Install it using the following instructions:
     39   
     40{{{
     41sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &&
     42sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in &&
     43sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in &&
     44mkdir ../gcc-build &&
     45cd ../gcc-build &&
     46../gcc-4.3.2/configure \
     47    --prefix=/opt/gcc-4.3.2 \
     48    --libexecdir=/usr/lib \
     49    --enable-shared \
     50    --enable-threads=posix \
     51    --enable-__cxa_atexit \
     52    --enable-clocale=gnu \
     53    --enable-languages=c,c++,java &&
     54make &&
     55sudo make install &&
     56sudo ln -v -sf `find /opt/gcc-4.3.2/lib/gcc -name ffitarget.h` \
     57    /opt/gcc-4.3.2/include
     58}}}
     59
     60Next, you will need to install several freely available jars into our new gcc directory (to isolate them from the rest of the system).
     61
     621.  ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R1.zip
     63{{{
     64cp *.jar /opt/gcc-4.3.2/share/java/
     65}}}
     66
     672.  http://ftp.wayne.edu/apache/xml/xalan-j/binaries/xalan-j_2_7_0-bin.tar.gz
     68{{{
     69cp *.jar /opt/gcc-4.3.2/share/java/
     70}}}
     713. http://ftp.osuosl.org/pub/eclipse/eclipse/downloads/drops/S-3.5M1-200808071402/ecj-3.5M1.jar
     72{{{
     73cp ecj-3.5M1.jar /opt/gcc-4.3.2/share/java/
     74}}}
     75
     76
     77Now, you will need to download and install a little gcj-compat package from RedHat. We could do all of this manually, but despite the long list of commands, this is much easier.
     78ftp://sources.redhat.com/pub/rhug/java-gcj-compat-1.0.77.tar.gz
     79{{{
     80./configure --prefix=/opt/gcc-4.3.2 &&
     81sudo make install &&
     82sudo ln -vsf ../../../../bin/gjar \
     83    /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj-1.5.0.0/bin/jar &&
     84sudo ln -vsf ../../../../bin/gjavah \
     85    /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj-1.5.0.0/bin/javah &&
     86sudo rm -rf /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj-1.5.0.0/include &&
     87sudo ln -vsf ../../../lib/gcc/i686-pc-linux-gnu/4.3.2/include \
     88    /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj-1.5.0.0/include &&
     89sudo rm -rf /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/lib/i386 &&
     90sudo ln -vsf ../../../../../lib/gcj-4.3.2-9 \
     91    /opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/lib/i386
     92}}}
     93
     94Ignore the unresolved javadoc symlink, it is not needed, but can be fufilled by gjdoc if you prefer (good luck, it's also a PITA deserving it's own wiki page).
     95
     96Now download IcedTea6 from the git repository (or release when available) http://icedtea.classpath.org/hg/icedtea6/ (click the bz2 link).
     97
     98You will also need the latest OpenJDK-6 source tarball...you will not need to download the binary plugs as free alternatives are provided by IcedTea. http://download.java.net/openjdk/jdk6/
     99
     100Now extract the IcedTea6 tarball, and copy the OpenJDK-6 tarball into the extracted directory.
     101
     102'''NOTE''':  Below we create three symlinks in the main filesystem.  This is done to avoid adding another patch to the growing list of patches in IcedTea-6.  To create a patch is trivial, however, the patch would have to be updated frequently to keep up with development since it patches the downloaded openjdk6 source files, which are not yet in the tree. The symlink method is much easier until a stable release is made.
     103
     104'''NOTE''':  As of 20080916, a patch has been submitted upstream to fix a build error. http://www.linuxfromscratch.org/~dj/icedtea6-fix-ATFILE.patch Check the changelog to see if you still need it.
     105
     106Building the beast:
     107{{{
     108unset JAVA_HOME &&
     109unset CLASSPATH &&
     110sudo ln -s /opt/ant/bin/ant /usr/bin &&
     111sudo ln -s /usr/bin/touch /bin &&
     112sudo ln -s /bin/find /usr/bin &&
     113./autgen.sh &&
     114./configure \
     115    --with-ant-home=/opt/ant \
     116    --with-libgcj-jar=/opt/gcc-4.3.2/share/java/libgcj-4.3.2.jar \
     117    --with-gcj-home=/opt/gcc-4.3.2/lib/jvm/java-1.5.0-gcj-1.5.0.0 \
     118    --with-java=/opt/gcc-4.3.2/bin/gij \
     119    --with-jar=/opt/gcc-4.3.2/bin/gjar \
     120    --with-rmic=/opt/gcc-4.3.2/bin/grmic \
     121    --with-javah=/opt/gcc-4.3.2/bin/gjavah \
     122    --with-ecj-jar=/opt/gcc-4.3.2/share/java/ecj-3.5M1.jar \
     123    --with-xalan2-jar=/opt/gcc-4.3.2/share/java/xalan.jar \
     124    --with-xalan2-serializer-jar=/opt/gcc-4.3.2/share/java/serializer.jar \
     125    --with-xerces2-jar=/opt/gcc-4.3.2/share/java/xercesImpl.jar \
     126    --with-rhino=/opt/gcc-4.3.2/share/java/js.jar &&
     127make
     128}}}
     129
     130Go get some coffee, or lunch, a late night snack, take a nap, go to bed...and 2-3 hours later:
     131
     132Install the beast:
     133{{{
     134sudo cp -a j2sdk-image /opt/openjdk-1.6.0_0-b12 &&
     135sudo rm /opt/jdk &&
     136sudo ln -sfv openjdk-1.6.0_0-b12 /opt/jdk &&
     137sudo rm /opt/jdk/jre/lib/rhino.jar &&
     138sudo cp /opt/gcc-4.3.2/share/java/js.jar /opt/jdk/jre/lib/rhino.jar
     139}}}
     140
     141If you've used the BLFS instructions to install the original Sun JDK, for Ant, then all you need to do is refresh your profile...unless you want to use the browser plugin.  The browser plugin is located at /opt/jdk/jre/lib/i386/gcjwebplugin.so and it should be symlinked just like in the current JDK instructions.  Close the browser and reopen after refreshing your profile.
     142
     143That's it.  Hope you enjoy.
     144
     145
    32146[wiki:Programming Up][[br]]
    33147[wiki:BlfsNotes Top]