简体   繁体   English

Bazel构建Tensorflow服务在Mac中失败

[英]Bazel build Tensorflow Serving fails in Mac

I've a Mac which runs Sierra. 我有一台运行Sierra的Mac。 I installed all pre-requisites for tensorflow serving as mentioned here. 我安装了这里提到的tensorflow服务的所有前提条件。

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

But when I try to bazel build tensorflow serving as they mentioned, I get 3 errors and the build stops. 但是,当我尝试破坏他们提到的构建Tensorflow时,我遇到了3个错误并且构建停止了。

error use of undeclared identifier 'pthread_mach_thread_np'

Inserting following lines of code 插入以下代码行

#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 */

into file: 进入文件:

/Library/Developer/CommandLineTools/usr/include/c++/v1/__threading_support /库/开发商/ CommandLineTools的/ usr /包括/ C ++ / V1 / __ threading_support

This issue is discussed in this thread . 线程中讨论了此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM