阅读背景:

调用OpenSSL报错:libcrypto.a(armcap.o):armcap.c:undefined reference to 'sigfillset'

来源:互联网 

在调用OpenSSL的某些函数的时候,编译后报错如下:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /Users/BLT/Develop/adt-bundle-mac-x86_64-20140702/android-sdk-macosx/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/BLT/Downloads/OpenSSL/TestOpenSsl/app/.externalNativeBuild/cmake/debug/armeabi-v7a --target native-lib}
  [1/3] Building C object CMakeFiles/native-lib.dir/gmssl-armeabi-v7a/GmsslCertTools.c.o
  [2/3] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
  [3/3] Linking CXX shared library ../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libnative-lib.so
  FAILED: : && /Users/BLT/Develop/adt-bundle-mac-x86_64-20140702/android-sdk-macosx/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++  --target=armv7-none-linux-androideabi --gcc-toolchain=/Users/BLT/Develop/adt-bundle-mac-x86_64-20140702/android-sdk-macosx/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/BLT/Develop/adt-bundle-mac-x86_64-20140702/android-sdk-macosx/ndk-bundle/sysroot -fPIC -isystem /Users/BLT/Develop/adt-bundle-mac-x86_64-20140702/android-sdk-macosx/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=14 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb -Wa,--noexecstack -Wformat -Werror=format-security   -O0 -fno-limit-debug-info  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot /Users/BLT/Develop/adt-bundle-mac-x86_64-20140702/android-sdk-macosx/ndk-bundle/platforms/android-14/arch-arm -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libnative-lib.so -o ../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libnative-lib.so CMakeFiles/native-lib.dir/gmssl-armeabi-v7a/GmsslCertTools.c.o CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a -llog -latomic -lm "/Users/BLT/Develop/adt-bundle-mac-x86_64-20140702/android-sdk-macosx/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a" && :
  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigfillset'
  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a(armcap.o):armcap.c:function OPENSSL_cpuid_setup: error: undefined reference to 'sigdelset'
  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'signal'
  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
  ../../../../gmssl-armeabi-v7a/libs/libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 2sFAILURE: Build fa



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: