Hi <br> I am a fan of Java and I tried to build openjdk6 on my Linux. I came across a weird error when issuing "make sanity".<br> Here are the details.<br> The openjdk source is from openjdk-6-src-b16-24_apr_2009.tar.gz<br>
My env vars are:<br>declare -x ALT_BINARY_PLUGS_PATH="/root/buildjdk/openjdk-binary-plugs"<br>declare -x ALT_BOOTDIR="/usr/local/jdk1.6.0_14"<br>declare -x ALT_JIBX_LIBS_PATH="/root/buildjdk/jibx/lib"<br>
declare -x ANT_HOME="/opt/ant"<br>declare -x BOOTDIR="/usr/local/jdk1.6.0_14"<br> <br> After I issued "make sanity" I got the some error messages:<br><br><span style="color: rgb(255, 0, 0);">ERROR: Your BOOTDIR environment variable does not point <br>
to a valid JDK for bootstrapping this build. <br> A JDK 6 build must be bootstrapped using <br> JDK 1.6.0 fcs (or later). <br> Apparently, your bootstrap JDK is version <br> Please update your ALT_BOOTDIR setting and start your build again. <br>
<br>ERROR: You do not have access to valid Motif 2.1 header files. <br> Please check your access to (for example) <br> /usr/include/Xm/AtomMgr.h <br> and/or check your value of ALT_MOTIF_DIR. <br> <br>
ERROR: You do not have access to valid Cups header files. <br> Please check your access to <br> /usr/include/cups/cups.h <br> and/or check your value of ALT_CUPS_HEADERS_PATH, <br> CUPS is frequently pre-installed on many systems, <br>
or may be downloaded from <a href="http://www.cups.org">http://www.cups.org</a> </span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> </span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">Exiting because of the above error(s). </span><br>
<br>The whole output can be found from my attached file.<br>The first ERROR is weird. And I checked makefile script.<br><br>I found it is generated from file jdk/make/common/shared/Sanity.gmk<br><span style="color: rgb(51, 102, 255);">######################################################</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"># BOOTDIR must point to a valid JDK.</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">######################################################</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">BOOT_CHECK :=$(call CheckVersions,$(BOOT_VER),$(REQUIRED_BOOT_VER))</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">sane-bootdir:</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"> @if [ "$(BOOT_CHECK)" != "same" -a "$(BOOT_CHECK)" != "newer" ]; then \</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> $(ECHO) "ERROR: Your BOOTDIR environment variable does not point \n" \</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"> " to a valid JDK for bootstrapping this build. \n" \</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> " A JDK $(JDK_MINOR_VERSION) $(MARKET_NAME) build must be bootstrapped using \n" \</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"> " JDK $(PREVIOUS_JDK_VERSION) fcs (or later). \n" \</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> " Apparently, your bootstrap JDK is version $(BOOT_VER) \n" \</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"> " Please update your ALT_BOOTDIR setting and start your build again. \n" \</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);"> "" >> $(ERROR_FILE) ; \</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);"> fi</span><br><br>It seems BOOT_VER is empty.<br>This can be confirmed by one line from the output.<br><span style="color: rgb(255, 0, 0);">make[1]: Entering directory `/root/buildjdk/openjdk6/jdk/make'</span><br style="color: rgb(255, 0, 0);">
<b><span style="color: rgb(255, 0, 0);">/root/buildjdk/openjdk6/jdk/make/common/shared/Sanity-Settings.gmk:72: WARNING: BOOT_VER should not be empty [Sanity-Settings.gmk]</span></b><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">/root/buildjdk/openjdk6/jdk/make/common/shared/Sanity-Settings.gmk:119: WARNING: ZIP_VER should not be empty [Sanity-Settings.gmk]</span><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);">/root/buildjdk/openjdk6/jdk/make/common/shared/Sanity-Settings.gmk:120: WARNING: UNZIP_VER should not be empty [Sanity-Settings.gmk]</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">/root/buildjdk/openjdk6/jdk/make/common/shared/Sanity-Settings.gmk:125: WARNING: FINDBUGS_VER should not be empty [Sanity-Settings.gmk]</span><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);">/root/buildjdk/openjdk6/jdk/make/common/shared/Sanity-Settings.gmk:201: WARNING: MAKE_VER should not be empty [Sanity-Settings.gmk]</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">make[2]: Entering directory `/root/buildjdk/openjdk6/jdk/make/tools/</span><br>
<span style="color: rgb(255, 0, 0);"></span><br><font color="#000000">Note MAKE_VER, ZIP_VER and UNZIP_VER are also empty.</font><br style="color: rgb(255, 0, 0);"><br>Then I tried to figure out why BOOT_VER is empty during make sanity.<br>
<br>I found BOOT_VER is init-ed in jdk/make/common/shared/Sanity.gmk<br><span style="color: rgb(51, 102, 255);"># Get the version numbers of what we are using</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">_MAKE_VER :=$(shell $(MAKE) --version 2>&1 | $(HEAD) -n 1)</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">_ZIP_VER :=$(shell $(ZIPEXE) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^Zip')</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">_UNZIP_VER :=$(shell $(UNZIP) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^UnZip')</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">_BOOT_VER :=$(shell $(BOOTDIR)/bin/java -version 2>&1 | $(HEAD) -n 1)</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">MAKE_VER :=$(call GetVersion,"$(_MAKE_VER)")</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">ZIP_VER :=$(call GetVersion,"$(_ZIP_VER)")</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">UNZIP_VER :=$(call GetVersion,"$(_UNZIP_VER)")</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">BOOT_VER :=$(call GetVersion,"$(_BOOT_VER)")</span><br style="color: rgb(51, 102, 255);"><br>and GetVersion is defined in ./jdk/make/common/shared/Defs.gmk as follows<br>
<font color="#000000"><span style="color: rgb(51, 102, 255);"># Given a line of text, get the major.minor version number from it</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">define GetVersion</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">$(shell echo $1 | sed -e 's@[^1-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*@\1@' )</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">endef<br><br><span style="color: rgb(0, 0, 0);">I tested the commands combined above, and got the corrent result</span><br>
<span style="color: rgb(0, 0, 0);">root:~/buildjdk/openjdk6# $BOOTDIR/bin/java -version 2>&1 | head -n 1 | sed -e 's@[^1-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*@\1@'</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">1.6</span><br>
<br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">So anybody has any hints?</span><br><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Best regards,</span><br style="color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0);">Frank</span><br></span></font><br>