-
Notifications
You must be signed in to change notification settings - Fork 74k
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
CMake build without GRPC and Python bindings fails #18931
Comments
Actually it also fails if the python bindings are disabled with
Why exposing these flags in the |
This seems to fix the issue with the Python binding: diff --git a/tensorflow/contrib/cmake/tf_core_framework.cmake b/tensorflow/contrib/cmake/tf_core_framework.cmake
index b47c32f..94dda24 100644
--- a/tensorflow/contrib/cmake/tf_core_framework.cmake
+++ b/tensorflow/contrib/cmake/tf_core_framework.cmake
@@ -127,6 +127,7 @@ file(GLOB_RECURSE tf_protos_cc_srcs RELATIVE ${tensorflow_source_dir}
"${tensorflow_source_dir}/tensorflow/core/*.proto"
"${tensorflow_source_dir}/tensorflow/contrib/boosted_trees/proto/*.proto"
"${tensorflow_source_dir}/tensorflow/contrib/tpu/proto/*.proto"
+ "${tensorflow_source_dir}/tensorflow/python/framework/*.proto"
)
RELATIVE_PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS Regarding the GRPC dependency, this helps: diff --git a/tensorflow/contrib/cmake/tf_core_framework.cmake b/tensorflow/contrib/cmake/tf_core_framework.cmake
index b47c32f..34ed324 100644
--- a/tensorflow/contrib/cmake/tf_core_framework.cmake
+++ b/tensorflow/contrib/cmake/tf_core_framework.cmake
@@ -177,13 +177,16 @@ RELATIVE_PROTOBUF_TEXT_GENERATE_CPP(PROTO_TEXT_SRCS PROTO_TEXT_HDRS
if(WIN32)
add_library(tf_protos_cc ${PROTO_SRCS} ${PROTO_HDRS})
else()
- file(GLOB_RECURSE tf_protos_grpc_cc_srcs RELATIVE ${tensorflow_source_dir}
- "${tensorflow_source_dir}/tensorflow/core/debug/*.proto"
- )
- RELATIVE_PROTOBUF_GENERATE_GRPC_CPP(PROTO_GRPC_SRCS PROTO_GRPC_HDRS
- ${tensorflow_source_dir} ${tf_protos_grpc_cc_srcs}
- )
- add_library(tf_protos_cc ${PROTO_GRPC_SRCS} ${PROTO_GRPC_HDRS} ${PROTO_SRCS} ${PROTO_HDRS})
+ if(tensorflow_ENABLE_GRPC_SUPPORT)
+ file(GLOB_RECURSE tf_protos_grpc_cc_srcs RELATIVE ${tensorflow_source_dir}
+ "${tensorflow_source_dir}/tensorflow/core/debug/*.proto"
+ )
+ RELATIVE_PROTOBUF_GENERATE_GRPC_CPP(PROTO_GRPC_SRCS PROTO_GRPC_HDRS
+ ${tensorflow_source_dir} ${tf_protos_grpc_cc_srcs}
+ )
+ add_library(tf_protos_cc ${PROTO_GRPC_SRCS} ${PROTO_GRPC_HDRS})
+ endif(tensorflow_ENABLE_GRPC_SUPPORT)
+ add_library(tf_protos_cc ${PROTO_SRCS} ${PROTO_HDRS})
endif() However some issues remain with |
We don't build with these options in our continuous integration, so this particular options seems to have rotted. Opening it for community contributions. |
@skydes |
@tilakrayal I am not using TensorFlow anymore so I won't be able to help on this - closing this issue now. |
System information
Problem
The CMake build fails on Ubuntu when GRPC support is disabled.
Command
Logs
The text was updated successfully, but these errors were encountered: