JDK-8222082 : Build of test/jdk/java/lang/reflect/exeCallerAccessTest/exeCallerAccessTest.c still failing on Windows
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang:reflect
  • Affected Version: 13
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2019-04-07
  • Updated: 2019-07-31
  • Resolved: 2019-04-07
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 12 JDK 13
12.0.2Fixed 13 b16Fixed
Related Reports
Relates :  
Relates :  
Description
Now the compiler error is fixed we have a linker error on Windows:

jib > === Output from failing command(s) repeated here ===
jib > * For target support_test_jdk_jtreg_native_support_exeCallerAccessTest_BUILD_TEST_exeCallerAccessTest_link:
jib > LINK : warning LNK4044: unrecognized option '/ljvm'; ignored
jib > exeCallerAccessTest.obj : error LNK2019: unresolved external symbol __imp_JNI_CreateJavaVM referenced in function main
jib > t:/workspace/build/windows-x64-open/support/test/jdk/jtreg/native/bin/CallerAccessTest.exe : fatal error LNK1120: 1 unresolved externals

This addition to the makefile is only valid on non-windows

+ BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeCallerAccessTest := -ljvm

not clear yet what the correct form is for Windows
Comments
Fix Request for 12 See the request for JDK-8221530
15-04-2019

diff --git a/make/test/JtregNativeJdk.gmk b/make/test/JtregNativeJdk.gmk --- a/make/test/JtregNativeJdk.gmk +++ b/make/test/JtregNativeJdk.gmk @@ -61,6 +61,7 @@ BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA) WIN_LIB_JLI := $(SUPPORT_OUTPUTDIR)/native/java.base/libjli/jli.lib BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJliLaunchTest := $(WIN_LIB_JLI) + BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeCallerAccessTest := jvm.lib else BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava @@ -70,10 +71,9 @@ BUILD_JDK_JTREG_LIBRARIES_LIBS_libInheritedChannel := -ljava -lsocket -lnsl endif BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJliLaunchTest := -ljli + BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeCallerAccessTest := -ljvm endif -BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeCallerAccessTest := -ljvm - ifeq ($(call isTargetOs, macosx), true) BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libTestMainKeyWindow := -ObjC BUILD_JDK_JTREG_LIBRARIES_LIBS_libTestMainKeyWindow := -framework JavaVM \
07-04-2019