JDK-7058133 : Javah should use the freshly built classes instead of those from the BOOTDIR jdk
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-06-22
  • Updated: 2012-04-13
  • Resolved: 2012-04-13
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 7 JDK 8 Other
7u4Fixed 8 b01Fixed OpenJDK6Fixed
Related Reports
Relates :  
Description
After adding one more argument to the native method "nssGetModuleList" of the PKCS11 class sun.security.pkcs11.Secmod, the build fails w/ the following output:

===================================
/build/solaris-i586/tmp/sun/sun.security.pkcs11/j2pkcs11/obj/p11_digest.o  ../../../../src/share/native/sun/security/pkcs11/wrapper/p11_digest.c
"../../../../src/share/native/sun/security/pkcs11/j2secmod.c", line 76: identifier redeclared: Java_sun_security_pkcs11_Secmod_nssGetModuleList
	current : function(pointer to pointer to const struct JNINativeInterface_ {..}, pointer to struct _jobject {..}, long long) returning pointer to struct _jobject {..}
	previous: function(pointer to pointer to const struct JNINativeInterface_ {..}, pointer to struct _jobject {..}, long long, pointer to struct _jobject {..}) returning pointer to struct _jobject {..} : "/w/jfxhudson/hudson-data/jobs/kb-tl/workspace/build/solaris-i586/tmp/sun/sun.security.pkcs11/j2pkcs11/CClassHeaders/sun_security_pkcs11_Secmod.h", line 49
cc: acomp failed for ../../../../src/share/native/sun/security/pkcs11/j2secmod.c
make381[4]: *** [/w/jfxhudson/hudson-data/jobs/kb-tl/workspace/build/solaris-i586/tmp/sun/sun.security.pkcs11/j2pkcs11/obj/j2secmod.o] Error 1
make381[4]: *** Waiting for unfinished jobs....
===================================

This is due to a problem in the sun/security/pkcs11/Makefile and needs to be fixed.

Comments
EVALUATION The PKCS11 Makefile has been updated to use the freshly built PKCS11 classes as part of the fix for 7003952. Now that 7003952 has been integrated into jdk7 b146, we only need to address the remaining two Makefile for sunec and sunmscapi providers.
24-06-2011

EVALUATION In sun/security/pkcs11/Makefile, it has: CLASSDESTDIR = $(TEMPDIR)/classes JAVAHFLAGS += -classpath $(CLASSDESTDIR) This should be changed to the following: CLASSDESTDIR = $(TEMPDIR)/classes JAVAHFLAGS += -Xbootclasspath/p:$(CLASSDESTDIR) Otherwise, the PKCS11 classes from the BOOTDIR jdk are used since they are loaded first, and when there are native changes, the build fails due to this inconsistency. Found the same problems in the following two Makefiles also: make/sun/security/ec/Makefile make/sun/security/mscapi/Makefile All 3 should be fixed.
22-06-2011