ndk-build throwing error relating to libcrypto.so

2019-08-11 21:43发布

问题:

I don't know where to start with this, so let me know if you need anything else. Thanks.

I am using ndk-build to build a native component for my Android project.

$ ndk-build -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-apple-darwin

I am getting this when I run ndk-build (just the errors are shown):

/Users/me/android-platform/out/target/product/generic/system/lib//libcrypto.so:
error: undefined reference to '__strlen_chk'
/Users/me/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
/Users/me/android-platform/out/target/product/generic/system/lib//libcrypto.so:
error: undefined reference to '__strrchr_chk'
/Users/me/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
/Users/me/android-platform/out/target/product/generic/system/lib//libcrypto.so:
error: undefined reference to '__strchr_chk'
/Users/me/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
/Users/me/android-platform/out/target/product/generic/system/lib//libcrypto.so:
error: undefined reference to '__sprintf_chk'
/Users/me/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
/Users/me/android-platform/out/target/product/generic/system/lib//libcrypto.so:
error: undefined reference to '__strncpy_chk2'
/Users/me/android-ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld:
/Users/me/android-platform/out/target/product/generic/system/lib//libcrypto.so:
error: undefined reference to '__strcat_chk'