Head down, clicking away... TimBell

« Building OpenJDK7 on... 32-bit XP: the O/S installation. | Main | Building OpenJDK7 on... »

Wednesday Jan 02, 2008

Building OpenJDK7 on 32-bit XP: set up the tool chain, part one.

In this episode we begin setting up the build tool chain and fetch a copy of the OpenJDK7 sources.

Java Technology has always been rooted in a Unix/Solaris OS background. To this day, you need a Unix-like environment before building on other platforms. Here we begin to set up the basic tools needed:


  1. install Cygwin


    • NOTE: Add the following to the Cygwin packages installed by default. You will need them later:

      Archive->zip
      Archive->unzip
      Base->tar
      Devel->binutils
      Devel->make
      Interpreters->m4
      System->procps
      Utils->cpio
      Utils->file

    • These are not required by the JDK7 build, but as a U*ix developer I find almost everything in Base essential, as well as wget. Feel free to add anything else you would like to have.

      Base-> "everything"
      Web->wget

    • If you plan to use ssh/sshd for remote access to the system, add a few more:

      Admin->cygrunsrv
      Net->openssh
      Net->rsync



  2. The current Cygwin distribution supplies Gnu make version 3.81-2, which is not compatible with the JDK7 Makefiles. Install v3.81 anyway to get the other dependencies, then find a version between 3.78.1 and 3.80 to lay down on top.

    Here is make 3.80. If you installed Cygwin into the default location (C:/cygwin), the install scenario might go like this after you open a Cygwin terminal window:

    mkdir -p /cygdrive/c/temp
    cd /cygdrive/c/temp
    wget http://cygwin.paracoda.com/release/make/make-3.80-1.tar.bz2
    cd /
    tar xvjf /cygdrive/c/temp/make-3.80-1.tar.bz2
    make --version
    Thanks to Igor Nekrestyanov for that hint.

    On one machine I set up, I needed to track down an unsatisfied reference to cygintl-2.dll before make version 3.80 would work for me. 'cygcheck -hv ./make.exe' was the key that pointed this out.

  3. Install your favorite text editor (in my case, xemacs)

  4. Install hg (Mercurial) and the forest extension under C:/Mercurial, as described by Daniel Fuchs

  5. Edit c:\Mercurial\Mercurial.ini to add:

    [extensions]
    forest=c:/Mercurial/hgforest/forest.py

  6. Pull over your own copy of the OpenJDK source. Open a Cygwin terminal window and:

    cd G: (Or wherever you set aside space for user files)
    hg fclone http://hg.openjdk.java.net/jdk7/jdk7/ jdk7

    cd jdk7
    hg fin


  7. Good job. Congratulations! Now for some homework: read the contents of file:///G:/jdk7/README-builds.html

Comments:

Post a Comment:
Comments are closed for this entry.