1

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'
Dulax
  • 553
  • 3
  • 20
  • It looks like this person is having the same problem, not sure if this thread is any help: https://groups.google.com/forum/#!msg/android-ndk/9do2ELH1rBU/p6DRJ3ghx94J – krsteeve Oct 07 '13 at 20:53
  • I'm running into the same problem with android-4.4_r1. I've spent a long time looking at that same webpage, but without any luck. – GrandAdmiral Jun 04 '14 at 21:05
  • If I remember correctly, this was an issue related to newer code security additions added to the AOSP, or that you could no longer link against Android's openssl library. Specifically, I was trying to build a VPN client which linked against openssl found in Android. In the end, the maintainer told me that it was no longer possible to link against it in newer versions of Android -- see this thread if it applies: https://groups.google.com/forum/#!topic/android-ndk/cW1yqOO9vQU – Dulax Jun 05 '14 at 12:51

0 Answers0