Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8335921

Fix HotSpot VM build without JVMTI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • None
    • hotspot
    • None
    • b07

      Sanne reported on leyden-dev [0] about his experiment to build openjdk without jvmti. He reported compilation failures in the leyden-premain specific code. After fixing those issues the build still failed and the failures are not related to the premain code. The same failures can be reproduced in the mainline code when jvmti feature is excluded during the configure step.

      Steps to reporoduce:

      $ bash ./configure --with-conf-name=no-jvmti-release --with-jvm-features=cds,compiler1,compiler2,g1gc,serialgc,jfr,jni-check,jvmci,management,services --with-jvm-variants=custom

      $ make images CONF=no-jvmti-release

      === Output from failing command(s) repeated here ===
      * For target hotspot_variant-custom_libjvm_objs_BUILD_LIBJVM_run_ld:
      /usr/bin/ld: /home/asmehra/data/ashu-mehra/jdk/build/no-jvmti-release/hotspot/variant-custom/libjvm/objs/jfrJvmtiAgent.o: in function `JvmtiUtil::error_name(int)':
      make/hotspot/src/hotspot/share/prims/jvmtiUtil.hpp:51: undefined reference to `JvmtiUtil::_error_names'
      /usr/bin/ld: /home/asmehra/data/ashu-mehra/jdk/build/no-jvmti-release/hotspot/variant-custom/libjvm/objs/jfrJvmtiAgent.o: in function `JvmtiEnvBase::get_phase()':
      make/hotspot/src/hotspot/share/prims/jvmtiEnvBase.hpp:77: undefined reference to `JvmtiEnvBase::_phase'
      /usr/bin/ld: /home/asmehra/data/ashu-mehra/jdk/build/no-jvmti-release/hotspot/variant-custom/libjvm/objs/jfrPeriodic.o: in function `JfrPeriodicEventSet::requestJavaAgent()':
      make/hotspot/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:294: undefined reference to `JvmtiAgentList::java_agents()'
      /usr/bin/ld: /home/asmehra/data/ashu-mehra/jdk/build/no-jvmti-release/hotspot/variant-custom/libjvm/objs/jfrPeriodic.o: in function `JfrPeriodicEventSet::requestNativeAgent()':
      make/hotspot/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:314: undefined reference to `JvmtiAgentList::native_agents()'
      /usr/bin/ld: make/hotspot/src/hotspot/share/jfr/periodic/jfrPeriodic.cpp:316: undefined reference to `JvmtiAgentList::xrun_agents()'
      /usr/bin/ld: /home/asmehra/data/ashu-mehra/jdk/build/no-jvmti-release/hotspot/variant-custom/libjvm/objs/jvmciCompilerToVMInit.o: in function `CompilerToVM::Data::initialize(JVMCIEnv*)':
      make/hotspot/src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp:233: undefined reference to `JvmtiExport::_should_notify_object_alloc'
      collect2: error: ld returned 1 exit status

      [0] https://mail.openjdk.org/pipermail/leyden-dev/2024-July/000766.html

            kvn Vladimir Kozlov
            asmehra Ashutosh Mehra
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: