[8u] RFR: 8252975: [8u] JDK-8252395 breaks the build for --with-native-debug-symbols=internal

Andrew Hughes gnu.andrew at redhat.com
Fri Sep 18 05:40:22 UTC 2020


On 20:16 Wed 09 Sep     , Severin Gehwolf wrote:
> Hi,
> 
> Please review this 8u (jdk8u/jdk8u-dev tree) fix for JDK-8252395 that
> I've pushed today. Thanks for Zhengyu Gu for noticing it. The pushed
> fix added the java.debuginfo and unpack.debuginfo make targets on the
> condition of ENABLE_DEBUG_SYMBOLS=true, which is insufficient. It needs
> another check on POST_STRIP_CMD which is set to non-empty for --with-
> native-debug-symbols={external,zipped}, and is indeed empty for --with-
> native-debug-symbols=internal. For the --with-native-debug-symbols=none 
> case we have ENABLE_DEBUG_SYMBOLS=false.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8252975
> webrev: https://cr.openjdk.java.net/~sgehwolf/webrevs/JDK-8252975/01/webrev/
> 
> Testing: Builds with --with-native-debug-symbols={none,internal,external,zipped} on Linux x86_64
> 
> OK?
> 
> Thanks,
> Severin
> 

Build is still broken for me with this patch:

/usr/bin/cp /home/ahughes/builder/8u-dev/jdk/objs/java_objs/java.diz /home/ahughes/builder/8u-dev/jdk/bin/java.diz
/usr/bin/cp: cannot stat '/home/ahughes/builder/8u-dev/jdk/objs/java_objs/java.diz': No such file or directory

where --with-native-debug-symbols is not set (pre-JDK-8207324)

The use of these two conditionals seems odd to me. What we want to know
is whether zipped debuginfo is in use. This is not the same as debug symbols
in general being enabled. Also, DEBUGINFO_EXT is only being set when
ZIP_DEBUGINFO_FILES is true!

POST_STRIP_CMD seems to only be used in image creation, so I don't
think checking this is appropriate either.

Instead, we should mirror what is done in make/common/NativeCompilation.gmk when
creating the .diz files:

-ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
-  ifneq ($(POST_STRIP_CMD), )
+ifeq ($(ZIP_DEBUGINFO_FILES), true)
+  ifneq ($(STRIP_POLICY), no_strip)

The second check is necessary because ZIP_DEBUGINFO_FILES is set by default,
and so may be true even if STRIP_POLICY has been set to no_strip.

The attached patch fixed the build for me.

Thanks,
-- 
Andrew :)

Senior Free Java Software Engineer
OpenJDK Package Owner
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
-------------- next part --------------
diff --git a/make/CompileLaunchers.gmk b/make/CompileLaunchers.gmk
--- a/make/CompileLaunchers.gmk
+++ b/make/CompileLaunchers.gmk
@@ -247,8 +247,8 @@
 	$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(DEBUGINFO_EXT) $@
 
 BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
-ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
-  ifneq ($(POST_STRIP_CMD), )
+ifeq ($(ZIP_DEBUGINFO_FILES), true)
+  ifneq ($(STRIP_POLICY), no_strip)
     BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(DEBUGINFO_EXT)
   endif
 endif
@@ -557,8 +557,8 @@
 	$(call install-file)
 
 BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX)
-ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
-  ifneq ($(POST_STRIP_CMD), )
+ifeq ($(ZIP_DEBUGINFO_FILES), true)
+  ifneq ($(STRIP_POLICY), no_strip)
     BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(DEBUGINFO_EXT)
   endif
 endif


More information about the build-dev mailing list