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
android:tensorflow_demo build error - external/fft2d/fft/fftsg.c:641:10: fatal error: 'math.h' file not found #13729
Comments
It looks like there's something wrong in your toolchain. Did you follow the instructions for Mac? /CC: @mhyttsten |
I used the ndk-bundle (v16), which was downloaded via the sdk manager of the Android studio. This version seems to be a compatibility issue. So I used the standalone Android NDK 14b as a guide.
Then build succeeded. Incidentally, it only builds in Python2. In Python3, the build did not complete because of an execution error in resource_extractor.py. Anyway, this is a problem with Android NDK version compatibility. I will close Issue. |
@bbongcol @drpngx I'm having a similar issue when building |
tensorflow still relies on GCC i think, since ndk-r15 GCC is no longer supported. |
I get this error
|
Hi
I succeeded build and install TensorFlow from sources with the link below.
https://www.tensorflow.org/install/install_sources
But, I could not build 'android: tensorflow_demo' under the guidance of the link below.
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android
System information
tf.VERSION = 1.4.0-rc0
tf.GIT_VERSION = b'v1.3.0-rc1-3399-g7cdd26f'
tf.COMPILER_VERSION = b'v1.3.0-rc1-3399-g7cdd26f'
bazel build -c opt //tensorflow/examples/android:tensorflow_demo
Describe the problem
I could not build 'android: tensorflow_demo' under the guidance of the link below.
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/android
bazel build -c opt //tensorflow/examples/android:tensorflow_demo
My System OSX system has 'math.h' header in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/math.h folder.
And I can check fftsg.o, fftsg.d file below path.
bazel-out/host/bin/external/fft2d/_objs/fft2d/external/fft2d/fft/
And fftsg.d have math.h path.
vi fftsg.d
bazel-out/host/bin/external/fft2d/_objs/fft2d/external/fft2d/fft/fftsg.o:
external/fft2d/fft/fftsg.c
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/math.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/sys/cdefs.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/sys/_symbol_aliasing.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/sys/_posix_availability.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/Availability.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/AvailabilityInternal.h
By the way, why do errors occur when building tensorflow_demo?
Source code / logs
ERROR: /private/var/tmp/_bazel_leebongjun/3584e4473c72a5166d05587429923d11/external/fft2d/BUILD.bazel:21:1: C++ compilation of rule '@fft2d//:fft2d' failed (Exit 1).
external/fft2d/fft/fftsg.c:641:10: fatal error: 'math.h' file not found
#include <math.h>
^~~~~~~~
1 error generated.
Target //tensorflow/examples/android:tensorflow_demo failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 2.271s, Critical Path: 0.39s
The text was updated successfully, but these errors were encountered: