-
Bug
-
Resolution: Fixed
-
P4
-
9
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084736 | emb-9 | Volker Simonis | P4 | Resolved | Fixed | team |
In jigsaw M2, the logic used for importing hotspot files into the jdk build changed. A side effect of this change is that the build will fail if sa-jdi.jar is not present in the hotspot output directory. As noted in the following mail to build-dev, there are valid hotspot configurations where sa-jdi.jar is not built:
Hi Chris!
The build changes introduced a new dependency that sa-jdi.jar is always built.
The sa-jdi.jar do not get built for Zero and Itanium builds.
Zero is built using the --with-jvm-interpreter=cpp --with-jvm-variants=zero configure options.
The sa-jdi.jar also do not exist if you use the --with-import-hotspot= to import alternative OpenJDK JVM such as
a pre-compiled CACAO JVM or JamVM libjvm.so .
I would suggest to change the jdk/make/Import.gmk and jdk/make/gensrc/Gensrc-jdk.jdi.gmk to first check if sa-jdi.jar
exist before adding it to the SA_TARGETS and GENSRC_JDK_JDI something like this:
Index: openjdk-jdk9-b38/jdk/make/Import.gmk
===================================================================
--- openjdk-jdk9-b38.orig/jdk/make/Import.gmk 2014-11-17 17:34:13.830175424 +0100
+++ openjdk-jdk9-b38/jdk/make/Import.gmk 2014-11-18 09:10:25.420715300 +0100
@@ -221,6 +221,8 @@
# even if zip is already unpacked.
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services: $(HOTSPOT_DIST)/lib/sa-jdi.jar
+# sa-jdi.jar do not exist for Itanium and zero
+if [ -a $(HOTSPOT_DIST)/lib/sa-jdi.jar ] ; \
SA_TARGETS += $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
Index: openjdk-jdk9-b38/jdk/make/gensrc/Gensrc-jdk.jdi.gmk
===================================================================
--- openjdk-jdk9-b38.orig/jdk/make/gensrc/Gensrc-jdk.jdi.gmk 2014-11-18 08:57:26.504852865 +0100
+++ openjdk-jdk9-b38/jdk/make/gensrc/Gensrc-jdk.jdi.gmk 2014-11-18 09:10:43.348804201 +0100
@@ -78,12 +78,10 @@
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
$(install-file)
+# sa-jdi.jar do not exist for Itanium and zero
+if [ -a $(HOTSPOT_DIST)/lib/sa-jdi.jar ] ; \
GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
$(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector
Cheers
Xerxes
Hi Chris!
The build changes introduced a new dependency that sa-jdi.jar is always built.
The sa-jdi.jar do not get built for Zero and Itanium builds.
Zero is built using the --with-jvm-interpreter=cpp --with-jvm-variants=zero configure options.
The sa-jdi.jar also do not exist if you use the --with-import-hotspot= to import alternative OpenJDK JVM such as
a pre-compiled CACAO JVM or JamVM libjvm.so .
I would suggest to change the jdk/make/Import.gmk and jdk/make/gensrc/Gensrc-jdk.jdi.gmk to first check if sa-jdi.jar
exist before adding it to the SA_TARGETS and GENSRC_JDK_JDI something like this:
Index: openjdk-jdk9-b38/jdk/make/Import.gmk
===================================================================
--- openjdk-jdk9-b38.orig/jdk/make/Import.gmk 2014-11-17 17:34:13.830175424 +0100
+++ openjdk-jdk9-b38/jdk/make/Import.gmk 2014-11-18 09:10:25.420715300 +0100
@@ -221,6 +221,8 @@
# even if zip is already unpacked.
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services: $(HOTSPOT_DIST)/lib/sa-jdi.jar
+# sa-jdi.jar do not exist for Itanium and zero
+if [ -a $(HOTSPOT_DIST)/lib/sa-jdi.jar ] ; \
SA_TARGETS += $(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/_the.sa.jar.unpacked \
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/_the.sa.services
Index: openjdk-jdk9-b38/jdk/make/gensrc/Gensrc-jdk.jdi.gmk
===================================================================
--- openjdk-jdk9-b38.orig/jdk/make/gensrc/Gensrc-jdk.jdi.gmk 2014-11-18 08:57:26.504852865 +0100
+++ openjdk-jdk9-b38/jdk/make/gensrc/Gensrc-jdk.jdi.gmk 2014-11-18 09:10:43.348804201 +0100
@@ -78,12 +78,10 @@
$(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
$(install-file)
+# sa-jdi.jar do not exist for Itanium and zero
+if [ -a $(HOTSPOT_DIST)/lib/sa-jdi.jar ] ; \
GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
$(JDK_OUTPUTDIR)/modules/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector
Cheers
Xerxes
- backported by
-
JDK-8084736 Make importing sa-jdi.jar optional on its existance
-
- Resolved
-