Compilation Failure with TensorFlow using XNNPack
wei-v-wang opened this issue · comments
Hi,
While trying to build TensorFlow, we seem to encounter the following timestamp related build errors.
5:18:50 external/XNNPACK/src/xnnpack/subgraph.h:291:17: error: array type has incomplete element type 'xnn_timestamp {aka struct timespec}'
15:18:50 xnn_timestamp end_ts[XNN_MAX_OPERATOR_OBJECTS];
15:18:50 ^~~~~~
15:18:50 external/XNNPACK/src/xnnpack/subgraph.h:330:17: error: field 'start_ts' has incomplete type
15:18:50 xnn_timestamp start_ts;
15:18:50 ^~~~~~~~
15:18:50 �[31m�[1mERROR: �[0m/home/tensorflow_ci_jenkins/workspace/workspace/workspace/tensorflow-oob-linux-cpu/bazel-ci_build-cache/.cache/bazel/_bazel_tensorflow_ci_jenkins/eab0d61a99b6696edb3d2aff87b585e8/external/XNNPACK/BUILD.bazel:10391:19: Compiling src/subgraph/argmax-pooling-2d.c failed: (Exit 1): gcc failed: error executing command
Any suggestions how we can fix such issues to unblock TensorFlow building? Thank you!
Hi, thanks for reporting this. Could you try to paste
#define _POSIX_C_SOURCE 199309L
At the top of runtime.c before the includes and let me know if that works?
What OS and compiler are you running using?
Thank you @alankelly for your reply! We figured out a work-around to update ubuntu 16 to ubuntu 18. The test is in progress. If it (https://tensorflow-ci.intel.com/job/tensorflow-oob-linux-cpu/3053/consoleFull) succeeds, I will close the issue.
We used ubuntu16 and gcc7, the update to ubuntu18 and other changes are found in this PR: Intel-tensorflow/tensorflow#60
Closing as the above workaround of upgrading to ubuntu18 succeeded.
Hello @alankelly @wei-v-wang , How can we fix this issue if we are sticking to ubuntu 16 & gcc 5.4.0 ? I have tried #define _POSIX_C_SOURCE 199309L as suggested by @alankelly but it doesn't work.