United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7058133 Javah should use the freshly built classes instead of those from the BOOTDIR jdk
7058133 : Javah should use the freshly built classes instead of those from the BOOTDIR jdk

Details
Type:
Bug
Submit Date:
2011-06-22
Status:
Closed
Updated Date:
2012-04-13
Project Name:
JDK
Resolved Date:
2012-04-13
Component:
security-libs
OS:
generic
Sub-Component:
javax.crypto
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:
8

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

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.
                                     
2011-06-24
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.
                                     
2011-06-22



Hardware and Software, Engineered to Work Together