JDK-8206135 : Building jvm with AOT but without JVMCI should fail at configure time
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-07-02
  • Updated: 2019-09-13
  • Resolved: 2018-07-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11 b22Fixed 12Fixed
Related Reports
Relates :  
Description
From Martin Buchholz (see JDK-8206113)
"If I try instead
 --with-jvm-features=-graal,-jvmci
I get
/home/martin/ws/jdk11/src/hotspot/share/utilities/macros.hpp:277:4: error: #error "Must have JVMCI for AOT"

---

If I try instead
 --with-jvm-features=-graal,-aot,-jvmci
the build succeeds, but attempts to run jtreg fail with:


java.lang.NullPointerException
Error: failed to get JDK properties for /home/martin/ws/jdk11/build/linux-x86_64-normal-server-release/images/jdk/bin/java -enablesystemassertions -Djava.library.path=/home/martin/ws/jdk11/build/linux-x86_64-normal-server-release/images/jdk/../test/jdk/jtreg/native; exit code 1

---

All of these configure variants should Just Work. 
"

From Vladimir
"
Yes, it should be config error.
We seems missing check HOTSPOT_CHECK_JVM_FEATURE(jvmci) in autoconf/hotspot.m4 when setting ENABLE_AOT. 
"
Comments
Main problem is related values specified with --with-jvm-features were ignored. For example, JVMCI module was still built even with --with-jvm-features=-jvmci but JVMCI code was excluded from Hotspot VM. AOT tool will be build but Hotspot compilation fails (as in bug report) when jvmci or graal was disabled. Note, jvmci and Graal modules build and Hotspot code are controlled only by --with-jvm-features flag. AOT is controlled by special --enable-aot/--diable-aot flag and --with-jvm-features (inclusion of AOT code in Hotspot is controlled by jvm-features check). But configure AOT code ignored --with-jvm-features aot settings. Fixes: 1. Exclude jdk.internal.vm.ci module build when --with-jvm-features=-jvmci specified 2. Removed duplicated message for forced aot disabling. 3. Check DISABLED_JVM_FEATURES list (negative values listed in --with-jvm-features) for jvmci, graal and aot to disable them. 4. Disable aot if graal is disabled and issue error if aot build was explicitly enabled by --enable-aot. 5. Issue error if --with-jvm-features=aot is specified by aot can't be build or is disabled. --enable-aot should be used instead of --with-jvm-features=aot because it has additional checks (presence of sources).
11-07-2018

Testing --with-jvm-features=-jvmci hit one new failure in test compiler/profiling/TestTypeProfiling.java Filed JDK-8206953. It is is existing issue in Hotspot and not caused by this changes.
10-07-2018

Testing --with-jvm-features=-graal passed clean.
10-07-2018

Regular testing hs-tier1,hs-tier2 passed clean.
10-07-2018

http://cr.openjdk.java.net/~kvn/8206135/webrev.00/
10-07-2018

I prepared fix and I am thinking to push into jdk 11. The suggested workaround: --with-jvm-features=-graal,-aot,-jvmci does not work since we still try to build AOT. You need to add --disable-aot to configure command.
10-07-2018

ILW = Build fails with non-default configure args (should fail at configure time), with AOT but without JVMCI, no workaround = MLH = P4
02-07-2018