-
Bug
-
Resolution: Fixed
-
P4
-
None
-
None
-
b20
When statically link JDK native libraries and libjvm (see JDK-8303796 for more details), the linker reports failures due to multiple definitions of 'throwIOException' and friends, including:
- throwByName
- throwOutOfMemoryError
- throwNullPointerException
- throwIOException
- throw_internal_error
E.g. of linker errors:
/.../lib/libj2pcsc.a(pcsc.o): in function `throwOutOfMemoryError':
/.../src/java.smartcardio/share/native/libj2pcsc/pcsc.c:71: multiple definition of `throwOutOfMemoryError'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2gss.a(NativeUtil.o):/.../src/java.security.jgss/share/native/libj2gss/NativeUtil.c:464: first defined here
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pcsc.a(pcsc_md.o): in function `throwByName':
/.../src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c:60: multiple definition of `throwByName'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2gss.a(NativeUtil.o):/.../src/java.security.jgss/share/native/libj2gss/NativeUtil.c:456: first defined here
...
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(p11_util.o): in function `throwByName':
/.../src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c:243: multiple definition of `throwByName'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2gss.a(NativeUtil.o):/.../src/java.security.jgss/share/native/libj2gss/NativeUtil.c:456: first defined here
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(p11_util.o): in function `throwOutOfMemoryError':
/usr/local/google/home/jianglizhou/github/jdk-makefiles-static/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c:254: multiple definition of `throwOutOfMemoryError'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2gss.a(NativeUtil.o):/.../src/java.security.jgss/share/native/libj2gss/NativeUtil.c:464: first defined here
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(p11_util.o): in function `throwNullPointerException':
/.../src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c:262: multiple definition of `throwNullPointerException'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pcsc.a(pcsc_md.o):/.../src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c:71: first defined here
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(p11_util.o): in function `throwIOException':
/.../src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c:270: multiple definition of `throwIOException'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pcsc.a(pcsc_md.o):/.../src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c:79: first defined here
/usr/bin/ld: /.../images/static-libs/lib/libmanagement_ext.a(management_ext.o): in function `throw_internal_error':...
- throwByName
- throwOutOfMemoryError
- throwNullPointerException
- throwIOException
- throw_internal_error
E.g. of linker errors:
/.../lib/libj2pcsc.a(pcsc.o): in function `throwOutOfMemoryError':
/.../src/java.smartcardio/share/native/libj2pcsc/pcsc.c:71: multiple definition of `throwOutOfMemoryError'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2gss.a(NativeUtil.o):/.../src/java.security.jgss/share/native/libj2gss/NativeUtil.c:464: first defined here
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pcsc.a(pcsc_md.o): in function `throwByName':
/.../src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c:60: multiple definition of `throwByName'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2gss.a(NativeUtil.o):/.../src/java.security.jgss/share/native/libj2gss/NativeUtil.c:456: first defined here
...
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(p11_util.o): in function `throwByName':
/.../src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c:243: multiple definition of `throwByName'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2gss.a(NativeUtil.o):/.../src/java.security.jgss/share/native/libj2gss/NativeUtil.c:456: first defined here
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(p11_util.o): in function `throwOutOfMemoryError':
/usr/local/google/home/jianglizhou/github/jdk-makefiles-static/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c:254: multiple definition of `throwOutOfMemoryError'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2gss.a(NativeUtil.o):/.../src/java.security.jgss/share/native/libj2gss/NativeUtil.c:464: first defined here
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(p11_util.o): in function `throwNullPointerException':
/.../src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c:262: multiple definition of `throwNullPointerException'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pcsc.a(pcsc_md.o):/.../src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c:71: first defined here
/usr/bin/ld: /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pkcs11.a(p11_util.o): in function `throwIOException':
/.../src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c:270: multiple definition of `throwIOException'; /.../build/linux-x86_64-server-slowdebug/images/static-libs/lib/libj2pcsc.a(pcsc_md.o):/.../src/java.smartcardio/unix/native/libj2pcsc/pcsc_md.c:79: first defined here
/usr/bin/ld: /.../images/static-libs/lib/libmanagement_ext.a(management_ext.o): in function `throw_internal_error':...
- relates to
-
JDK-8303796 Optionally build fully statically linked JDK image
- Open