tensorflow: Failed to run Android demo targeting API < 20
I tried to build the demo application for Android for KitKat device (API 20). I was able to modify the app not to use new hardware.camera2 and it worked on Android Lollipops successfully. However there is an issue targeting older Android device.
It turned out that the app crashes right after trying to load the native shared library, tensorflow_demo in my case.
And that’s due to dependency of libpthread.so to libmediandk.so that is not supported for API older than 21. See the following logcat message:
Error: ..dlopen failed: could not load library "libmediandk.so" needed by "libtensorflow_demo.so"; caused by library "libmediandk.so" not found
I also desperately tried to replace the cloned libpthread.so with the same file from my /usr/arm-linux-gnueabi/lib/ directory with no success.
I am using:
1- android-ndk-r10c
2- api_level=20
3- build_tools_version = “20.0.0”
Did I missed anything in that process?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- Added #include <errno.h> Adding this include fixes the compilation for APIs < 20, as described in https://github.com/tensorflow/tensorflow/issues/419 — committed to barantes/tensorflow by barantes 8 years ago
- Merge pull request #419 from yxsamliu/docker Add packages to docker for hip-clang . Failures in `rocm` and `rocm-v2` paths aren't relevant to this PR and had been fixed in other PRs. — committed to darkbuck/tensorflow by whchung 5 years ago
The include tree for the newer NDK APIs must be including errno.h implicitly. Adding it explicitly fixes the build error on older APIs. Fix incoming.
@barantes If you add
#include <errno.h>to the includes list fortensorflow/contrib/android/jni/limiting_file_input_stream.h, does the build error go away?@CalmWaves You can checkout my fork from here enabling API<20.