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 &quot;make sanity&quot;.<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=&quot;/root/buildjdk/openjdk-binary-plugs&quot;<br>declare -x ALT_BOOTDIR=&quot;/usr/local/jdk1.6.0_14&quot;<br>declare -x ALT_JIBX_LIBS_PATH=&quot;/root/buildjdk/jibx/lib&quot;<br>
declare -x ANT_HOME=&quot;/opt/ant&quot;<br>declare -x BOOTDIR=&quot;/usr/local/jdk1.6.0_14&quot;<br> <br>  After I issued &quot;make sanity&quot; 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 [ &quot;$(BOOT_CHECK)&quot; != &quot;same&quot; -a &quot;$(BOOT_CHECK)&quot; != &quot;newer&quot; ]; then \</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">          $(ECHO) &quot;ERROR: Your BOOTDIR environment variable does not point \n&quot; \</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">            &quot;      to a valid JDK for bootstrapping this build. \n&quot; \</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">            &quot;      A JDK $(JDK_MINOR_VERSION) $(MARKET_NAME) build must be bootstrapped using  \n&quot; \</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">            &quot;      JDK $(PREVIOUS_JDK_VERSION) fcs (or later). \n&quot; \</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">            &quot;      Apparently, your bootstrap JDK is version $(BOOT_VER) \n&quot; \</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">            &quot;      Please update your ALT_BOOTDIR setting and start your build again. \n&quot; \</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">            &quot;&quot; &gt;&gt; $(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&#39;</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&gt;&amp;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&gt;&amp;1 | $(HEAD) -n 4 | $(EGREP) &#39;^Zip&#39;)</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">_UNZIP_VER :=$(shell $(UNZIP)  -help 2&gt;&amp;1 | $(HEAD) -n 4 | $(EGREP) &#39;^UnZip&#39;)</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">_BOOT_VER  :=$(shell $(BOOTDIR)/bin/java -version 2&gt;&amp;1 | $(HEAD) -n 1)</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">MAKE_VER   :=$(call GetVersion,&quot;$(_MAKE_VER)&quot;)</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">ZIP_VER    :=$(call GetVersion,&quot;$(_ZIP_VER)&quot;)</span><br style="color: rgb(51, 102, 255);"><span style="color: rgb(51, 102, 255);">UNZIP_VER  :=$(call GetVersion,&quot;$(_UNZIP_VER)&quot;)</span><br style="color: rgb(51, 102, 255);">
<span style="color: rgb(51, 102, 255);">BOOT_VER   :=$(call GetVersion,&quot;$(_BOOT_VER)&quot;)</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 &#39;s@[^1-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*@\1@&#39; )</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&gt;&amp;1 | head -n 1 | sed -e &#39;s@[^1-9]*\([1-9][0-9]*\.[0-9][0-9]*\).*@\1@&#39;</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>