title: How do I bootstrap building the jdk?
body: <p>I am attempting to build <code>jdk-11+8</code> in order to read the generated source of <code>java.nio.ByteBuffer</code> for Linux.</p>
  <p>I installed all the dependencies based on the <a href="https://hg.openjdk.java.net/jdk/jdk11/raw-file/tip/doc/building.html#common-make-targets" rel="nofollow noreferrer">documentation</a>, and then successfully ran <code>configure</code>.</p>
  <p>However, when I run <code>make</code>, I get a strange error about a missing Java package, which looks like a bootstrapping problem.</p>
  <pre><code>git clone https://github.com/openjdk/jdk.git 
  pushd jdk
  bash configure
  ...
  The existing configuration has been successfully updated in
  /home/ubuntu/Code/jdk/build/linux-x86_64-normal-server-release
  using default settings.
  
  Configuration summary:
  * Debug level:    release
  * HS debug level: product
  * JDK variant:    normal
  * JVM variants:   server
  * OpenJDK target: OS: linux, CPU architecture: x86, address length: 64
  * Version string: 11-internal+0-adhoc.ubuntu.jdk (11-internal)
  
  Tools summary:
  * Boot JDK:       openjdk version &quot;11.0.9.1&quot; 2020-11-04 OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04) OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)  (at /usr/lib/jvm/java-11-openjdk-amd64)
  * Toolchain:      gcc (GNU Compiler Collection)
  * C Compiler:     Version 8.4.0 (at /usr/bin/gcc)
  * C++ Compiler:   Version 8.4.0 (at /usr/bin/g++)
  
  Build performance summary:
  * Cores to use:   4
  * Memory limit:   15854 MB
  
  make clean
  make
  
  Building target 'default (exploded-image)' in configuration 'linux-x86_64-normal-server-release'
  Warning: No mercurial configuration present and no .src-rev
  Compiling 117 files for BUILD_java.compiler.interim
  /home/ubuntu/Code/jdk/src/java.compiler/share/classes/javax/annotation/processing/Messager.java:28: error: package javax.annotation does not exist
  import javax.annotation.*;
  ^
  1 error
  CompileInterimLangtools.gmk:86: recipe for target '/home/ubuntu/Code/jdk/build/linux-x86_64-normal-server-release/buildtools/interim_langtools_modules/java.compiler.interim/_the.BUILD_java.compiler.interim_batch' failed
  make[3]: *** [/home/ubuntu/Code/jdk/build/linux-x86_64-normal-server-release/buildtools/interim_langtools_modules/java.compiler.interim/_the.BUILD_java.compiler.interim_batch] Error 1
  make/Main.gmk:76: recipe for target 'interim-langtools' failed
  make[2]: *** [interim-langtools] Error 2
  make[2]: *** Waiting for unfinished jobs....
  </code></pre>
  <p><strong>What am I missing?</strong></p>
  <p>More system details:</p>
  <pre><code>ubuntu@box:~$ uname -a
  Linux box 4.15.0-1057-aws #59-Ubuntu SMP Wed Dec 4 10:02:00 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  ubuntu@box:~$ cat /etc/issue
  Ubuntu 18.04.4 LTS \n \l
  </code></pre>
  <p>Digging a little more, I also see the following error, which may or may not be relevant:</p>
  <pre><code>ubuntu@ip-172-31-40-153:~/Code/jdk$ make -n gensrc &gt; /tmp/X
  make[3]: *** No rule to make target '/home/ubuntu/Code/jdk/build/linux-x86_64-normal-server-release/buildtools/jdk_tools_classes/_the.BUILD_TOOLS_JDK_batch', needed by '/home/ubuntu/Code/jdk/build/linux-x86_64-normal-server-release/support/gensrc/java.logging/_the.COMPILE_PROPERTIES.marker'.  Stop.
  make[2]: *** [java.logging-gensrc-src] Error 2
  make[2]: *** Waiting for unfinished jobs....
  make[3]: *** No rule to make target '/home/ubuntu/Code/jdk/build/linux-x86_64-normal-server-release/buildtools/jdk_tools_classes/_the.BUILD_TOOLS_JDK_batch', needed by '/home/ubuntu/Code/jdk/build/linux-x86_64-normal-server-release/support/gensrc/jdk.charsets/sun/nio/cs/ext/_the.charsetmapping-extcs'.  Stop.
  make[2]: *** [jdk.charsets-gensrc-src] Error 2
  make[3]: *** No rule to make target '/home/ubuntu/Code/jdk/build/linux-x86_64-normal-server-release/buildtools/jdk_tools_classes/_the.BUILD_TOOLS_JDK_batch', needed by '/home/ubuntu/Code/jdk/build/linux-x86_64-normal-server-release/support/gensrc/java.base/sun/util/cldr/CLDRBaseLocaleDataMetaInfo.java'.  Stop.
  make[2]: *** [java.base-gensrc-src] Error 2
  vmake[1]: *** [main] Error 2
  make: *** [gensrc] Error 2
  </code></pre>