From 07a641900c55652d71018c0c1474aba20059432a Mon Sep 17 00:00:00 2001 From: Scott Mitchell Date: Tue, 27 Jun 2017 15:54:04 -0400 Subject: [PATCH] transport-native-kqueue libraries should not lazy link Motivation: We rely upon the linker being non-lazy to test compatibility the native library compatibility for kqueue, but the default mode of operation is to lazy link. Modifications: - We should modify the build scripts to inform the linker that this library should not be lazy linked - Error messages changes dyld: lazy symbol binding failed: Symbol not found: _clock_gettime java.lang.UnsatisfiedLinkError: unsupported JNI version 0xFFFFFFFF required by .../libnetty-transport-native-kqueue.dylib Result: Link errors are detected upon library load time. --- transport-native-kqueue/pom.xml | 6 +++++- transport-native-unix-common/pom.xml | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/transport-native-kqueue/pom.xml b/transport-native-kqueue/pom.xml index 5a0d83ba2f..c6bdda2874 100644 --- a/transport-native-kqueue/pom.xml +++ b/transport-native-kqueue/pom.xml @@ -79,6 +79,10 @@ ${jni.compiler.args.ldflags} ${jni.compiler.args.cflags} + + MACOSX_DEPLOYMENT_TARGET=10.2 @@ -353,7 +357,7 @@ ${unix.common.lib.dir}/META-INF/native/lib ${unix.common.lib.dir}/META-INF/native/include CFLAGS=-O3 -Werror -fno-omit-frame-pointer -Wunused-variable -I${unix.common.include.unpacked.dir} - LDFLAGS=-L${unix.common.lib.unpacked.dir} -Wl,--whole-archive -l${unix.common.lib.name} -Wl,--no-whole-archive + LDFLAGS=-z now -L${unix.common.lib.unpacked.dir} -Wl,--whole-archive -l${unix.common.lib.name} -Wl,--no-whole-archive true diff --git a/transport-native-unix-common/pom.xml b/transport-native-unix-common/pom.xml index 3f14ae1e06..66f9578c6a 100644 --- a/transport-native-unix-common/pom.xml +++ b/transport-native-unix-common/pom.xml @@ -102,6 +102,10 @@ + +