I'm on Windows Vista 32-bit, SP2, Visual Studio 2008 Professional. I'm building OpenJDK7 b92.
Mercurial --------- Mercurial for Windows in its .msi form is self-contained and doesn't require an additional Python installation. I've also added the installation folder to my Windows PATH. Download the forest extensions from http://bitbucket.org/pmezard/hgforest-crew/ as explained there. Do *not* download from http://mercurial.selenic.com/wiki/ForestExtension this simply does not work. Copy hgforest-crew\forest.py to library.zip\hgext Add the following Mercurial.ini to the Mercurial installation directory -------- [extensions] hgext.forest= -------- FreeType2 --------- From http://gnuwin32.sourceforge.net/packages/freetype.htm download the *-bin.zip and *-dep.zip and unzip them. OpenJDK erroneously expects a freetype.dll in the freetype lib folder. To prevent complains during the build, hold your nose and copy bin\freetype6.dll to lib\freetype.dll. Ant and JAVA_HOME ----------------- I've installed Ant 1.8.0. OpenJDK can't tolerate JAVA_HOME being set. Ant uses the registry entry if JAVA_HOME is unset, but expects a full JDK. Hence, check the Windows regisitry to ensure that the appropriate key in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment refers to a JRE that's *inside* a JDK. SDK and PATH ------------ Although the SKD will be on the PATH before starting the build, for some obscure reason OpenJDK searches for rc.exe and mt.exe in VC\bin rather than on the PATH. Again, hold your nose, close your eyes and copy them in VC\bin. Cygwin ------ I've installed cygwin 1.7.5 with the additions mentioned in the OpenJDK Build README. I've also installed libintl-2 and vim via normal cygwin setup. I don't remember if I've installed wget explicitly or if it came with the default installation. Make ---- I downloaded make 3.80 from one of the sites mentioned in http://www.filewatcher.com/m/make-3.80-1.tar.bz2.286814.0.0.html and installed it in cygwin with tar xjf <yourDownloadsFolder>/make-3.80-1.tar.bz2 Other issues ------------ Apply the patch mentioned in http://mail.openjdk.java.net/pipermail/build-dev/2010-May/002945.html which certainly helps with b92 but which will be obsolete any time soon. Getting the repository ---------------------- In a cygwin shell, cd to a folder of your choice (BUILD_HOME) and do mkdir jdk7 hg fclone http://hg.openjdk.java.net/jdk7/jdk7/ jdk7 wget http://www.java.net/download/openjdk/jdk7/promoted/b92/jdk-7-ea-plug-b92-windows-i586-06_may_2010.jar java -jar jdk-7-ea-plug-b92-windows-i586-06_may_2010.jar and install the binary plugs in BUILD_HOME Environment variables --------------------- Copy the following in cygwin's $HOME/env.bat -------- call "%VS90COMNTOOLS%\vsvars32.bat" bash -------- Copy and adapt the following in cygwin's $HOME/env.sh (pay attention to line breaks due to emailers) -------- #!/usr/bin/bash unset CLASSPATH unset JAVA_HOME CYGPATH=/usr/bin/cygpath BUILD_HOME=$HOME FREETYPE_HOME="C:\Downloads\FreeType" export ANT_HOME=$(${CYGPATH} -u "C:\Downloads\Apache\apache-ant-1.8.0") export PATH=$PATH:$(${CYGPATH} -u "$FREETYPE_HOME\freetype-2.3.5-1-bin\bin"):$(${CYGPATH} -u "$FREETYPE_HOME\freetype-2.3.5-1-dep\bin") export ALT_BINARY_PLUGS_PATH="$BUILD_HOME/openjdk-binary-plugs" export ALT_BOOTDIR=$(${CYGPATH} -s -m "C:\Program Files\Java\jdk1.6.0_18") export ALT_COMPILER_PATH=$(${CYGPATH} -s -m "C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN") export ALT_FREETYPE_LIB_PATH=$(${CYGPATH} -s -m "$FREETYPE_HOME\freetype-2.3.5-1-bin\lib") export ALT_FREETYPE_HEADERS_PATH=$(${CYGPATH} -s -m "$FREETYPE_HOME\freetype-2.3.5-1-bin\include") export ALT_DXSDK_PATH=$(${CYGPATH} -s -m "$DXSDK_DIR") export OPENJDK=true -------- Building -------- WARNING: As unbelievable as it might sound, you need to be online to build OpenJDK! During the build, some files are downloaded from the net. In a cygwin shell do the following to set the VisualStudio vars, the environment and to start the build. ./env.bat . ./env.sh cd $BUILD_HOME/jdk7 make sanity make On my three years old laptop the build proper takes about 2:30 hours.
