These are my notes for building Mustang on Ubuntu 6.06. Amazingly enough, this works with just a small number of easily fixed issues. This is good news if you want to tinker with the JDK on Ubuntu. Even if you don't, it is comforting to know that the Mustang build process is robust enough to allow the tinkerers to use it on their favorite platform, so that you can benefit from their labors.
As any mad scientist would do, just to prove that it can be done, I decided to build Mustang on my shiny new Ubuntu 6.06 "Dapper Drake" system. The build instructions warn you not to try this at home. The official build environment is Redhat Enterprise Advanced Server 2.1 update 2, formerly known as Redhat Advanced Server 2.1 update 2. Ugh.
I was not sure that this was going to work. Ubuntu is Debian based, and it uses GCC 4.0, not GCC 3.2. As it turns out, the X11 headers have recently moved to around, so I had some grief. But it all turned out well, and I lived to tell the tale.
Why would anyone care? If you use Linux as your primary work OS (as I do), and you switched to the increasingly popular Ubuntu, and you want to tinker with the JDK, these instructions will save you time and frustration. (Not that much time, maybe. It took me less than a day to hack my way through.) For everyone else, it may be comforting to know that someone with very limited system programming experience can do the build in an unfamiliar environment. It certainly is a tribute to the Mustang team who put this very complex build together.
Here are the instructions.
cd mustangsrc java -jar ../downloads/jdk-6-rc-src-b87-jrl-09_jun_2006.jar java -jar ../downloads/jdk-6-rc-bin-b87-jrl-09_jun_2006.jar java -jar ../downloads/jdk-6-rc-mozilla_headers-b87-unix-09_jun_2006.jar
unset JAVA_HOME export ALT_BOOTDIR=/home/me/jdk1.5.0 export ALT_DEVTOOLS_PATH=/usr/bin export ALT_GCC29_PLUGIN_LIB_PATH=/home/me/jdk1.6.0/jre/plugin/i386/ns7-gcc29 export ALT_MOZILLA_HEADERS_PATH=/home/me/mustangsrc/share/plugin/ export ALT_OUTPUTDIR=/home/me/mustangout export MILESTONE=rc export BUILD_NUMBER=b87
BASENAME = $(UTILS_USR_BIN_PATH)basename
CP=/bin/cp
# WARNINGS_ARE_ERRORS = -Werror
/* extern XIC XmImGetXIC( Widget w, uint32_t input_policy, ArgList args, Cardinal num_args) ; */
"%eax", /* "%ebx", */ "%ecx", "%edx"I'd like some expert to tell me if that is ok.
IRULESRC=/etc/X11/config/cf
ifeq ($(PLATFORM), linux) CPPFLAGS += -I/usr/include/X11/extensions -I$(MOTIF_DIR)/include -I$(OPENWIN_HOME)/include endifand in j2se/make/sun/awt/mawt.gmk, change /usr/X11R6/lib to /usr/lib (3x):
LIBXT = /usr/lib/libXt.a LIBSM = /usr/lib/libSM.a LIBICE = /usr/lib/libICE.a
The build instructions told me to run make scsl, but then I got an error complaining about a missing jscheme/REPL. Following this advice, I picked up with make j2se, and voila, it worked.
cd /home/me/mustangout bin/java -jar demo/jfc/SwingSet2/SwingSet2.jar