Home > front end >  test/make/TestMake.gmk: No such file or directory when compile the jdk 12
test/make/TestMake.gmk: No such file or directory when compile the jdk 12

Time:04-04

I am tried to compile the JDK 12(wget -c https://hg.openjdk.java.net/jdk/jdk12/archive/tip.tar.gz) in my own MacBook Pro 2019 with Intel Chip(macOS Monterey 12.3.1). Fisrt step I run the configure command:

bash configure --with-boot-jdk='/Users/dolphin/.sdkman/candidates/java/11.0.10.hs-adpt' --with-debug-level=slowdebug --with-target-bits=64 --disable-warnings-as-errors --enable-dtrace --with-jvm-variants=server

the output looks like this:

checking if build directory is on local disk... yes
checking JVM features for JVM variant 'server'... "cds cmsgc compiler1 compiler2 dtrace epsilongc g1gc graal jfr jni-check jvmci jvmti management nmt parallelgc serialgc services shenandoahgc vm-structs"
configure: creating /Users/dolphin/source/third-party/jdk12-06222165c35f/build/macosx-x86_64-server-slowdebug/configure-support/config.status
config.status: creating /Users/dolphin/source/third-party/jdk12-06222165c35f/build/macosx-x86_64-server-slowdebug/spec.gmk
config.status: creating /Users/dolphin/source/third-party/jdk12-06222165c35f/build/macosx-x86_64-server-slowdebug/bootcycle-spec.gmk
config.status: creating /Users/dolphin/source/third-party/jdk12-06222165c35f/build/macosx-x86_64-server-slowdebug/buildjdk-spec.gmk
config.status: creating /Users/dolphin/source/third-party/jdk12-06222165c35f/build/macosx-x86_64-server-slowdebug/compare.sh
config.status: creating /Users/dolphin/source/third-party/jdk12-06222165c35f/build/macosx-x86_64-server-slowdebug/Makefile

====================================================
The existing configuration has been successfully updated in
/Users/dolphin/source/third-party/jdk12-06222165c35f/build/macosx-x86_64-server-slowdebug
using configure arguments '--with-boot-jdk=/Users/dolphin/.sdkman/candidates/java/11.0.10.hs-adpt --with-debug-level=slowdebug --with-target-bits=64 --disable-warnings-as-errors --enable-dtrace --with-jvm-variants=server'.

Configuration summary:
* Debug level:    slowdebug
* HS debug level: debug
* JVM variants:   server
* JVM features:   server: 'cds cmsgc compiler1 compiler2 dtrace epsilongc g1gc graal jfr jni-check jvmci jvmti management nmt parallelgc serialgc services shenandoahgc vm-structs'
* OpenJDK target: OS: macosx, CPU architecture: x86, address length: 64
* Version string: 12-internal 0-adhoc.dolphin.jdk12-06222165c35f (12-internal)

Tools summary:
* Boot JDK:       openjdk version "11.0.10" 2021-01-19 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10 9) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10 9, mixed mode)  (at /Users/dolphin/.sdkman/candidates/java/11.0.10.hs-adpt)
* Toolchain:      clang (clang/LLVM from Xcode 13.2.1)
* C Compiler:     Version 13.0.0 (at /usr/bin/clang)
* C   Compiler:   Version 13.0.0 (at /usr/bin/clang  )

Build performance summary:
* Cores to use:   12
* Memory limit:   16384 MB

there is no error output. When I build the project using this command:

make CONF=macosx-x86_64-server-slowdebug compile-commands

shows error like this:

$ make CONF=macosx-x86_64-server-slowdebug compile-commands                                                                                                                                   ‹ruby-2.7.2›
make[1]: /Users/dolphin/source/third-party/jdk12-06222165c35f/test/make/TestMake.gmk: No such file or directory
make[1]: *** No rule to make target `/Users/dolphin/source/third-party/jdk12-06222165c35f/test/make/TestMake.gmk'.  Stop.
/usr/local/bin/bash: line 1: /Users/dolphin/source/third-party/jdk12-06222165c35f/build/macosx-x86_64-server-slowdebug/make-support/main-targets.gmk: No such file or directory
make[1]: *** [create-main-targets-include] Error 1
make: *** No rule to make target `compile-commands'.  Stop.

I also tried:

$ make CONF=macosx-x86_64-server-slowdebug                                                                                                                                                    ‹ruby-2.7.2›
make[1]: /Users/dolphin/source/third-party/jdk12-06222165c35f/test/make/TestMake.gmk: No such file or directory
make[1]: *** No rule to make target `/Users/dolphin/source/third-party/jdk12-06222165c35f/test/make/TestMake.gmk'.  Stop.
/usr/local/bin/bash: line 1: /Users/dolphin/source/third-party/jdk12-06222165c35f/build/macosx-x86_64-server-slowdebug/make-support/main-targets.gmk: No such file or directory
make[1]: *** [create-main-targets-include] Error 1
make: Nothing to be done for `default'.

what should I do to fix this problem?

CodePudding user response:

The errors look like they might be from missing rules:

make: *** No rule to make target `compile-commands'.  Stop.
make: Nothing to be done for `default'.

The command you want to make a jdk is:

make images

The output will be in build/<config>/images/jdk

You could try that instead.


Another thing to verify is if the file test/make/TestMake.gmk exists, I see it here on GitHub: https://github.com/openjdk/jdk12u/tree/master/test/make but maybe something went wrong with downloading/extracting the archive you got from hg.openjdk.java.net?

  • Related