I try to compile openssl 1.0.2h in my project
I made those steps for use Openssl
To add the libraries to my project as prebuilt static libraries, I created an openssl folder under my jni directory containing lib/ (which contain the .a files for the architectures I support), include/ which has the necessary includes (you can find that under the openssl version you downloaded) and Android.mk which has the following:
include $(CLEAR_VARS)
LOCAL_MODULE := libssl
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libssl.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := libcrypto
LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libcrypto.a
include $(PREBUILT_STATIC_LIBRARY)
Then, to use the library within another jni module I added the following to its Android.mk file:
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := libssl libcrypto
and I get this:
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigfillset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
jni/openssl/lib/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'
jni/openssl/lib/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'signal'
jni/openssl/lib/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
jni/openssl/lib/armeabi-v7a/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/armeabi-v7a/libpjsipjni.so] Error 1
make[1]: *** Waiting for unfinished jobs....
jni/openssl/lib/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'
jni/openssl/lib/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'signal'
jni/openssl/lib/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
jni/openssl/lib/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/armeabi/libpjsipjni.so] Error 1
jni/openssl/lib/x86/libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'
jni/openssl/lib/x86/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'signal'
jni/openssl/lib/x86/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
jni/openssl/lib/x86/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
collect2: error: ld returned 1 exit status
make[1]: *** [obj/local/x86/libpjsipjni.so] Error 1
jni/openssl/lib/mips/libcrypto.a(ui_openssl.o): In function `open_console':
ui_openssl.c:(.text.open_console+0xb4): undefined reference to `tcgetattr'
jni/openssl/lib/mips/libcrypto.a(ui_openssl.o): In function `read_string_inner':
ui_openssl.c:(.text.read_string_inner+0xf0): undefined reference to `signal'
ui_openssl.c:(.text.read_string_inner+0x2c0): undefined reference to `tcsetattr'
ui_openssl.c:(.text.read_string_inner+0x39c): undefined reference to `tcsetattr'
collect2: error: ld returned 1 exit status
Please, I need help