Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7124640

Build error in OpenJDK pkcs11 package

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: OpenJDK6
    • Fix Version/s: OpenJDK6
    • Component/s: infrastructure
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      FULL PRODUCT VERSION :
      OpenJDK 6

      ADDITIONAL OS VERSION INFORMATION :
      Linux 2.6.32-37-generic #81-Ubuntu SMP Fri Dec 2 20:32:42 UTC 2011 x86_64 GNU/Linux


      A DESCRIPTION OF THE PROBLEM :
      Building OpenJDK 6 from source with bundle openjdk-6-src-b24-14_nov_2011.tar.gz leads to a compile error in the sun/security/pkcs11 package. I am using a Sun JDK 1.6.0_26 as the boot JDK.

      I'm not an expert on the OpenJDK makefile system, but the error appears to be that the javac destdir is set to a location under TEMPDIR but javah is not told to look there, so finds an incompatible Secmod.class on the classpath somewhere and builds C headers that don't match the native code. See the excerpts from the build output posted below. In particular, note the -d option to javac and the -bootclasspath option to javah do not match.


      >>>Recursively making pkcs11 all @ Thu Dec 22 13:16:12 CST 2011 ...
      make[5]: Entering directory `/home/mabbott/Dev/openjdk6/jdk/make/sun/security/pkcs11'
      # Java sources to be compiled: (listed in file /home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/.classes.list)
      ../../../../src/share/classes/sun/security/pkcs11/P11Mac.java
      ../../../../src/share/classes/sun/security/pkcs11/Secmod.java
      ../../../../src/share/classes/sun/security/pkcs11/SunPKCS11.java
      ../../../../src/share/classes/sun/security/pkcs11/P11RSACipher.java
      ../../../../src/share/classes/sun/security/pkcs11/P11ECKeyFactory.java

      [snip]

      ../../../../src/share/classes/sun/security/pkcs11/P11ECDHKeyAgreement.java
      ../../../../src/share/classes/sun/security/pkcs11/P11Signature.java
      # Running javac:
      /usr/lib/jvm/java-6-sun/bin/java -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m -Xbootclasspath/p:/home/mabbott/Dev/openjdk6/build/linux-amd64/langtools/dist/bootstrap/lib/javac.jar -jar /home/mabbott/Dev/openjdk6/build/linux-amd64/langtools/dist/bootstrap/lib/javac.jar -source 1.5 -target 5 -encoding ascii -Xbootclasspath:/home/mabbott/Dev/openjdk6/build/linux-amd64/classes -sourcepath /home/mabbott/Dev/openjdk6/build/linux-amd64/gensrc:../../../../src/solaris/classes:../../../../src/share/classes -d /home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/classes @/home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/.classes.list
      Note: Some input files use or override a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      Note: Some input files use unchecked or unsafe operations.
      Note: Recompile with -Xlint:unchecked for details.
      /bin/mkdir -p /home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/obj64
      rm -f /home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/obj64/.class.headers.amd64
      # Running javah:
      /usr/lib/jvm/java-6-sun/bin/java -Xmx896m -Xms128m -XX:PermSize=32m -XX:MaxPermSize=160m "-Xbootclasspath/p:/home/mabbott/Dev/openjdk6/build/linux-amd64/langtools/dist/bootstrap/lib/javah.jar:/home/mabbott/Dev/openjdk6/build/linux-amd64/langtools/dist/bootstrap/lib/javadoc.jar:/home/mabbott/Dev/openjdk6/build/linux-amd64/langtools/dist/bootstrap/lib/javac.jar" -jar /home/mabbott/Dev/openjdk6/build/linux-amd64/langtools/dist/bootstrap/lib/javah.jar -bootclasspath /home/mabbott/Dev/openjdk6/build/linux-amd64/classes -d /home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/CClassHeaders/ sun.security.pkcs11.wrapper.PKCS11 sun.security.pkcs11.Secmod
      Begin parallel compiles: /home/mabbott/Dev/openjdk6/jdk/make/sun/security/pkcs11
      make[6]: Entering directory `/home/mabbott/Dev/openjdk6/jdk/make/sun/security/pkcs11'
      /usr/bin/gcc -O2 -fno-strict-aliasing -fPIC -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -DLINUX -DRELEASE='"1.6.0-internal"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -D_LP64=1 -I. -I/home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/CClassHeaders -I../../../../src/solaris/javavm/export -I../../../../src/share/javavm/export -I../../../../src/share/javavm/include -I../../../../src/solaris/javavm/include -I../../../../src/share/native/sun/security/pkcs11/wrapper -I../../../../src/solaris/native/sun/security/pkcs11/wrapper -I../../../../src/share/native/common -I../../../../src/solaris/native/common -I../../../../src/share/native/sun/security/pkcs11 -I../../../../src/solaris/native/sun/security/pkcs11 -c -o /home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/obj64/j2secmod.o ../../../../src/share/native/sun/security/pkcs11/j2secmod.c
      /usr/bin/gcc -O2 -fno-strict-aliasing -fPIC -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -DLINUX -DRELEASE='"1.6.0-internal"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -D_LP64=1 -I. -I/home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/CClassHeaders -I../../../../src/solaris/javavm/export -I../../../../src/share/javavm/export -I../../../../src/share/javavm/include -I../../../../src/solaris/javavm/include -I../../../../src/share/native/sun/security/pkcs11/wrapper -I../../../../src/solaris/native/sun/security/pkcs11/wrapper -I../../../../src/share/native/common -I../../../../src/solaris/native/common -I../../../../src/share/native/sun/security/pkcs11 -I../../../../src/solaris/native/sun/security/pkcs11 -c -o /home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/obj64/j2secmod_md.o ../../../../src/solaris/native/sun/security/pkcs11/j2secmod_md.c
      ../../../../src/share/native/sun/security/pkcs11/j2secmod.c:76: error: conflicting types for 'Java_sun_security_pkcs11_Secmod_nssGetModuleList'
      /home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/CClassHeaders/sun_security_pkcs11_Secmod.h:49: note: previous declaration of 'Java_sun_security_pkcs11_Secmod_nssGetModuleList' was here
      make[6]: *** [/home/mabbott/Dev/openjdk6/build/linux-amd64/tmp/sun/sun.security.pkcs11/j2pkcs11/obj64/j2secmod.o] Error 1



      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            • Assignee:
              sergei Sergei Sapozhnikov
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: