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

Resolve miscellaneous multiple symbol definition issues when statically linking JDK/VM natives with standard launcher

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • core-libs
    • None
    • b21
    • generic
    • generic

      This bug is to resolve the remaining miscellaneous symbol collisions
      when statically linking JDK/VM natives with the standard Java launcher binary (see JDK-8303796 for more details). The symbols include:

      - debug
      - findFunction
      - jvm (if it's desirable to statically linking with libawt_xawt, was not addressed in JDK-8305761)

      E.g.

      /usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(j2secmod_md.o): in function `findFunction':
      /.../src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/j2secmod_md.c:37: multiple definition of `findFunction'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pcsc.a(pcsc_md.o):/.../src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c:78: first defined here
      /usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/hotspot/variant-server/libjvm/objs/static/libjvm.a(debug.o): in function `debug':
      /.../src/hotspot/share/utilities/debug.cpp:486: multiple definition of `debug'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(p11_general.o):/.../src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_general.c:78: first defined here
      ...
      /usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libawt_xawt.a(XlibWrapper.o):/.../src/java.desktop/unix/native/libawt_xawt/xawt/XlibWrapper.c:1328: multiple definition of `jvm'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libawt.a(awt_LoadLibrary.o):/.../src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c:52: first defined here
      collect2: error: ld returned 1 exit status

            jiangli Jiangli Zhou
            jiangli Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: