Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build the the project for intel x86 and x86_64 instead of armeabi v7? #2

Open
ghost opened this issue Apr 21, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 21, 2016

Hi,
I want to build the project for intel x86 emulator instead of armeabi v7. Since app crashes with intel x86 CPU emulator.

I am using Ubuntu 14.04,
Android Studio 2.0
NDK 10re

Please help me on this issue.

@ghost
Copy link
Author

ghost commented Apr 23, 2016

I tried by changing Makefile like this

build:
ndk-build
install:
cp -r libs/armeabi-v7a/.so ../app/src/main/jniLibs/armeabi-v7a/
cp -r libs/x86/
.so ../app/src/main/jniLibs/x86/
cp -r libs/x86_64/*.so ../app/src/main/jniLibs/x86_64/
clean:
rm -r obj
rm -r libs`

and changing Application.mk file as

APP_ABI := armeabi-v7a x86 x86_64
APP_STL := gnustl_static
APP_PLATFORM := android-21
NDK_TOOLCHAIN_VERSION=4.9`

then I got this error in the make

command kaushalya@kaushalya-HP-350-G1:/TensorFlowAndroidDemo-master/jni-build$ make
ndk-build
Android NDK: WARNING:jni/Android.mk:tensorflow_demo: non-system libraries in linker flags: jni/libs/armeabi-v7a/libandroid_tensorflow_lib.a jni/libs/armeabi-v7a/libre2.a jni/libs/armeabi-v7a/libprotos_all_cc.a jni/libs/armeabi-v7a/libprotobuf.a jni/libs/armeabi-v7a/libprotobuf_lite.a /home/kaushalya/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_static.a /home/kaushalya/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libsupc++.a
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:jni/Android.mk:tensorflow_demo: non-system libraries in linker flags: jni/libs/x86/libandroid_tensorflow_lib.a jni/libs/x86/libre2.a jni/libs/x86/libprotos_all_cc.a jni/libs/x86/libprotobuf.a jni/libs/x86/libprotobuf_lite.a /home/kaushalya/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libgnustl_static.a /home/kaushalya/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/libsupc++.a
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
Android NDK: WARNING:jni/Android.mk:tensorflow_demo: non-system libraries in linker flags: jni/libs/x86_64/libandroid_tensorflow_lib.a jni/libs/x86_64/libre2.a jni/libs/x86_64/libprotos_all_cc.a jni/libs/x86_64/libprotobuf.a jni/libs/x86_64/libprotobuf_lite.a /home/kaushalya/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/libgnustl_static.a /home/kaushalya/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86_64/libsupc++.a
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
make[1]: Entering directory /home/kaushalya/TensorFlowAndroidDemo-master/jni-build' [armeabi-v7a] Compile++ arm : tensorflow_demo <= tensorflow_jni.cc [armeabi-v7a] Compile++ arm : tensorflow_demo <= imageutils_jni.cc [armeabi-v7a] Compile++ arm : tensorflow_demo <= jni_utils.cc [armeabi-v7a] Compile++ arm : tensorflow_demo <= rgb2yuv.cc [armeabi-v7a] Compile++ arm : tensorflow_demo <= yuv2rgb.cc [armeabi-v7a] SharedLibrary : libtensorflow_demo.so [armeabi-v7a] Install : libtensorflow_demo.so => libs/armeabi-v7a/libtensorflow_demo.so [x86] Compile++ : tensorflow_demo <= tensorflow_jni.cc i686-linux-android-g++: error: unrecognized command line option '-mfpu=vfpv3-d16' i686-linux-android-g++: error: unrecognized command line option '-mfloat-abi=softfp' i686-linux-android-g++: error: unrecognized command line option '-mfpu=neon' make[1]: *** [obj/local/x86/objs/tensorflow_demo/./tensorflow_jni.o] Error 1 make[1]: Leaving directory/home/kaushalya/TensorFlowAndroidDemo-master/jni-build'
make: *** [build] Error 2
kaushalya@kaushalya-HP-350-G1:
/TensorFlowAndroidDemo-master/jni-build$

Please help me, you are the one who can help me on this Miyoshi

@miyosuda
Copy link
Owner

I've replied this at TensorFlow issue thread
tensorflow/tensorflow#2035 (comment)

@ghost
Copy link
Author

ghost commented Apr 28, 2016

Can you please answer my last 2 comments before thread closes in tensorflow#issue2035_comment0 and tensorflow#issue2035_comment1 in this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant