aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xconfigure31
-rw-r--r--tensorflow/core/BUILD1
-rw-r--r--tensorflow/core/platform/default/build_config.bzl3
-rw-r--r--tensorflow/python/BUILD1
4 files changed, 34 insertions, 2 deletions
diff --git a/configure b/configure
index 95f67e5379..c2401252dd 100755
--- a/configure
+++ b/configure
@@ -55,10 +55,41 @@ while true; do
done
if is_windows; then
+ TF_NEED_GCP=0
TF_NEED_HDFS=0
TF_NEED_OPENCL=0
fi
+while [ "$TF_NEED_GCP" == "" ]; do
+ read -p "Do you wish to build TensorFlow with "\
+"Google Cloud Platform support? [y/N] " INPUT
+ case $INPUT in
+ [Yy]* ) echo "Google Cloud Platform support will be enabled for "\
+"TensorFlow"; TF_NEED_GCP=1;;
+ [Nn]* ) echo "No Google Cloud Platform support will be enabled for "\
+"TensorFlow"; TF_NEED_GCP=0;;
+ "" ) echo "No Google Cloud Platform support will be enabled for "\
+"TensorFlow"; TF_NEED_GCP=0;;
+ * ) echo "Invalid selection: " $INPUT;;
+ esac
+done
+
+if [ "$TF_NEED_GCP" == "1" ]; then
+ ## Verify that libcurl header files are available.
+ # Only check Linux, since on MacOS the header files are installed with XCode.
+ if [[ $(uname -a) =~ Linux ]] && [[ ! -f "/usr/include/curl/curl.h" ]]; then
+ echo "ERROR: It appears that the development version of libcurl is not "\
+"available. Please install the libcurl3-dev package."
+ exit 1
+ fi
+
+ # Update Bazel build configuration.
+ sed -i -e "s/WITH_GCP_SUPPORT = False/WITH_GCP_SUPPORT = True/" tensorflow/core/platform/default/build_config.bzl
+else
+ # Update Bazel build configuration.
+ sed -i -e "s/WITH_GCP_SUPPORT = True/WITH_GCP_SUPPORT = False/" tensorflow/core/platform/default/build_config.bzl
+fi
+
while [ "$TF_NEED_HDFS" == "" ]; do
read -p "Do you wish to build TensorFlow with "\
"Hadoop File System support? [y/N] " INPUT
diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD
index ddad3da6f6..95b111f23b 100644
--- a/tensorflow/core/BUILD
+++ b/tensorflow/core/BUILD
@@ -1351,7 +1351,6 @@ tf_cuda_library(
":protos_all_cc",
"//third_party/eigen3",
"//tensorflow/core/kernels:required",
- "//tensorflow/core/platform/cloud:gcs_file_system",
] + tf_additional_lib_deps(),
alwayslink = 1,
)
diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl
index 92d205772f..abad729d8b 100644
--- a/tensorflow/core/platform/default/build_config.bzl
+++ b/tensorflow/core/platform/default/build_config.bzl
@@ -4,6 +4,7 @@ load("@protobuf//:protobuf.bzl", "cc_proto_library")
load("@protobuf//:protobuf.bzl", "py_proto_library")
# configure may change the following lines to True
+WITH_GCP_SUPPORT = False
WITH_HDFS_SUPPORT = False
# Appends a suffix to a list of deps.
@@ -176,6 +177,8 @@ def tf_kernel_tests_linkstatic():
def tf_additional_lib_deps():
deps = []
+ if WITH_GCP_SUPPORT:
+ deps.append("//tensorflow/core/platform/cloud:gcs_file_system")
if WITH_HDFS_SUPPORT:
deps.append("//tensorflow/core/platform/hadoop:hadoop_file_system")
return deps
diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD
index 70b35ea4b1..8fc4f8cc93 100644
--- a/tensorflow/python/BUILD
+++ b/tensorflow/python/BUILD
@@ -2339,7 +2339,6 @@ tf_py_wrap_cc(
"//tensorflow/core:lib",
"//tensorflow/core/debug",
"//tensorflow/core/distributed_runtime:server_lib",
- "//tensorflow/core/platform/cloud:gcs_file_system",
"//tensorflow/tools/tfprof/internal:print_model_analysis",
"//util/python:python_headers",
] + tf_additional_lib_deps() + tf_additional_plugin_deps(),