RFR 9 8031708: Windows x86 build failure: JNU_ThrowOutOfMemoryError undefined
Chris Hegarty
chris.hegarty at oracle.com
Tue Jan 14 13:56:59 UTC 2014
A recent change, JDK-8029007 introduced JNU_ThrowOutOfMemoryError into MessageUtils. The Windows x86 build subsequently fails as follows:
Warning (shows the root cause):
c:/jprt/T/P1/113753.chhegar/s/jdk/src/share/native/sun/misc/MessageUtils.c(58) : warning C4013: 'JNU_ThrowOutOfMemoryError' undefined; assuming extern returning int
Actual linkage failure:
...
Creating library c:/cygwin/home/chhegar/sbdata/repos/jdk9/dev/dev/build/windows-x86-normal-server-release/jdk/objs/libjava/java.lib and object c:/cygwin/home/chhegar/sbdata/repos/jdk9/dev/dev/build/windows-x86-normal-server-release/jdk/objs/libjava/java.exp
MessageUtils.obj : error LNK2019: unresolved external symbol _JNU_ThrowOutOfMemoryError referenced in function _printToFile
c:/cygwin/home/chhegar/sbdata/repos/jdk9/dev/dev/build/windows-x86-normal-server-release/jdk/bin/java.dll : fatal error LNK1120: 1 unresolved externals
lib/CoreLibraries.gmk:185: recipe for target `/cygdrive/c/cygwin/home/chhegar/sbdata/repos/jdk9/dev/dev/build/windows-x86-normal-server-release/jdk/bin/java.dll' failed
make[2]: *** [/cygdrive/c/cygwin/home/chhegar/sbdata/repos/jdk9/dev/dev/build/windows-x86-normal-server-release/jdk/bin/java.dll] Error 96
BuildJdk.gmk:70: recipe for target `libs-only' failed
make[1]: *** [libs-only] Error 2
/cygdrive/c/cygwin/home/chhegar/sbdata/repos/jdk9/dev/dev//make/Main.gmk:115: recipe for target `jdk-only' failed
make: *** [jdk-only] Error 2
Trivial fix. Include the header that defines the function ( whose return type is void ):
diff --git a/src/share/native/sun/misc/MessageUtils.c b/src/share/native/sun/misc/MessageUtils.c
--- a/src/share/native/sun/misc/MessageUtils.c
+++ b/src/share/native/sun/misc/MessageUtils.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include <jni.h>
+#include <jni_util.h>
#include <jlong.h>
#include <stdio.h>
#include <jvm.h>
-Chris.
More information about the core-libs-dev
mailing list