cn=Directory Manager
All about Directory Server
All | Personal | Sun

20070508 Tuesday May 08, 2007

OpenDS builds on OpenJDK on OpenSolaris

Sun announced today that OpenJDK is now fully-buildable. Aside from a few third-party components that Sun doesn't have the right to open source (which are currently available in binary-only form until that can be resolved), the entire JDK codebase is GPLv2 with the classpath exception. I decided to take a shot and see what it takes to build it. It turns out, it's a pretty simple process.

There are instructions available for building with NetBeans, but honestly I don't use NetBeans and didn't particularly want to install it just for this. Plus, if you really do need to have NetBeans to build it, then that somehow doesn't seem fair. At any rate, I didn't find not using NetBeans to be a problem.

The system that I was using was an Ultra 40 Workstation running Solaris Nevada (Sun's OpenSolaris distribution -- see http://www.opensolaris.org/os/community/on/ and http://www.opensolaris.org/os/project/onnv/ for details) build 61. I already had the Sun Studio 11 compilers installed, and the Subversion client is included as part of Nevada.

Here's what I did to build OpenJDK and then use that to build OpenDS:
  1. I started in /export/home/nawilson/sandbox, which is the directory that I use to hold all of the source code I check out from various repositories.

  2. I checked out the OpenJDK source code with the command:
    svn checkout --username guest https://openjdk.dev.java.net/svn/openjdk
    When prompted for a password, I just pressed ENTER without typing anything.

  3. Once the checkout completed, I went into the openjdk/hotspot/trunk directory.

  4. I found the page http://openjdk.java.net/groups/hotspot/faq.html, which is the HotSpot FAQ, and on that page I found a link to the osse-build-solaris-i586 file that can be used as a simple build script. I downloaded that file and copied it into the current working directory. I then edited it to point both ALT_BOOTDIR and ALT_JDK_IMPORT_PATH to "/usr/java".

  5. I edited my path so that /opt/SUNWspro/bin was the first directory contained in it. This was necessary to make sure that the Sun Studio 11 compiler was getting used instead of /usr/ucb/cc which fails right away.

  6. I made the edited osse-build-solaris-i586 file executable and ran it without any arguments. About two hours later, I had a full JDK 1.6.0_01-b06 build in the build/solaris/jdk-solaris-i586 subdirectory.

  7. I returned to the /export/home/nawilson/sandbox directory and checked out OpenDS with the command:
    svn checkout --username guest https://opends.dev.java.net/svn/opends/trunk/opends
    Once the checkout completed, I went into the opends subdirectory.

  8. I set the JAVA_HOME environment variable to /export/home/nawilson/sandbox/openjdk/hotspot/trunk/build/solaris/jdk-solaris-i586 and ran "./build.sh" with no arguments. About 33 seconds later, I had a build/package/OpenDS-0.8.zip file containing the core OpenDS server.

  9. I went into the build/package/OpenDS-0.8 directory and ran ./setup to launch our QuickSetup utility to configure the server, populate it with sample data, start it up, and use our graphical status panel to verify that everything looks fine.
I also later used "./build.sh all" to perform a full build of OpenDS including the DSML gateway, Javadoc documentation, and running all 34,000+ unit tests. Everything passed with flying colors. As far as OpenDS is concerned, there is no distinguishable difference between the OpenJDK build that I just created and the real Java 1.6.0_01-b06 build that you can download from http://java.sun.com/.

Posted by cn_equals_directory_manager ( May 08 2007, 05:02:19 PM CDT ) Permalink

Comments:

Post a Comment:

Comments are closed for this entry.

Archives
Language
Links
Referrers