Bazel构建Tensorflow服务在Mac中失败

时间:2017-10-09 11:56:08

标签: macos tensorflow tensorflow-serving

我有一台运行Sierra的Mac。我安装了tensorflow服务的所有先决条件,如此处所述。

https://www.tensorflow.org/serving/setup

但是当我尝试像他们提到的那样构建张量流时,我得到3个错误并且构建停止。

error use of undeclared identifier 'pthread_mach_thread_np'

1 个答案:

答案 0 :(得分:1)

插入以下代码行

#ifndef _MACH_PORT_T
#define _MACH_PORT_T
#include <sys/_types.h> /* __darwin_mach_port_t */
typedef __darwin_mach_port_t mach_port_t;
#include <pthread.h>
mach_port_t pthread_mach_thread_np(pthread_t);
#endif /* _MACH_PORT_T */

进入档案:

  

/库/开发商/ CommandLineTools的/ usr /包括/ C ++ / V1 / __ threading_support

我们讨论了这个问题in this thread

相关问题