Skip to content
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

warnings (please do not import '@grpc//third_party/nanopb:pb_common.c' directly ; depends on deprecated target ; ...) during build from source #26191

Closed
Thajobe opened this issue Feb 28, 2019 · 5 comments
Assignees
Labels
stat:awaiting response Status - Awaiting response from author subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues type:build/install Build and install issues

Comments

@Thajobe
Copy link

Thajobe commented Feb 28, 2019

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04.2 LTS
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
  • TensorFlow installed from (source or binary): source
  • TensorFlow version: r1.12
  • Python version: Python 3.6.8 :: Anaconda, Inc.
  • Installed using virtualenv? pip? conda?: conda
  • Bazel version (if compiling from source): 0.19.2
  • GCC/Compiler version (if compiling from source): 6.5.0
  • CUDA/cuDNN version: 9.0 / 7.5.0
  • GPU model and memory: GeForce GT 650M / 2 GB

Describe the problem
I try to compile TF from source to get compute capability 3.0 support.
Therefore I followed more or less the guide on this site.
But I get warnings and the compilation failed.

Provide the exact sequence of commands / steps that you executed before running into the problem
./configure

bazel build --config=opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package

(see details below)

Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

Not sure if important but I added import /home/jonathan/tensorflow/tools/bazel.rc on top line of(hide file) "/home/jonathan/tensorflow/.bazelrc " as stated here.

$ ./configure
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 0.19.2 installed.
Please specify the location of python. [Default is /home/jonathan/anaconda2/envs/tf_cu90/bin/python]: 


Found possible Python library paths:
  /home/jonathan/anaconda2/envs/tf_cu90/lib/python3.6/site-packages
Please input the desired Python library path to use.  Default is [/home/jonathan/anaconda2/envs/tf_cu90/lib/python3.6/site-packages]

Do you wish to build TensorFlow with Apache Ignite support? [Y/n]: 
Apache Ignite support will be enabled for TensorFlow.

Do you wish to build TensorFlow with XLA JIT support? [Y/n]: 
XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: 
No OpenCL SYCL support will be enabled for TensorFlow.

Do you wish to build TensorFlow with ROCm support? [y/N]: 
No ROCm support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.

Please specify the CUDA SDK version you want to use. [Leave empty to default to CUDA 9.0]: 


Please specify the location where CUDA 9.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/local/cuda-9.0


Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7]: 


Please specify the location where cuDNN 7 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda-9.0]: /usr/lib/x86_64-linux-gnu


Do you wish to build TensorFlow with TensorRT support? [y/N]: 
No TensorRT support will be enabled for TensorFlow.

Please specify the NCCL version you want to use. If NCCL 2.2 is not installed, then you can use version 1.3 that can be fetched automatically but it may have worse performance with multiple GPUs. [Default is 2.2]: 1.3


Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size. [Default is: 3.0]: 


Do you want to use clang as CUDA compiler? [y/N]: 
nvcc will be used as CUDA compiler.

Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: /usr/bin/gcc-6


Do you wish to build TensorFlow with MPI support? [y/N]: 
No MPI support will be enabled for TensorFlow.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]: 


Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: 
Not configuring the WORKSPACE for Android builds.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See tools/bazel.rc for more details.
	--config=mkl         	# Build with MKL support.
	--config=monolithic  	# Config for mostly static monolithic build.
	--config=gdr         	# Build with GDR support.
	--config=verbs       	# Build with libverbs support.
	--config=ngraph      	# Build with Intel nGraph support.
Configuration finished

$ bazel build --config=opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" //tensorflow/tools/pip_package:build_pip_package

Loading: 
Loading: 0 packages loaded
Analyzing: target //tensorflow/tools/pip_package:build_pip_package (0 packages loaded, 0 targets configured)
WARNING: /home/jonathan/.cache/bazel/_bazel_jonathan/e7c09fc463511989ded3d56396c466d4/external/grpc/BUILD:1992:1: in srcs attribute of cc_library rule @grpc//:grpc_nanopb: please do not import '@grpc//third_party/nanopb:pb_common.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'grpc_generate_one_off_targets', the error might have been caused by the macro implementation in /home/jonathan/.cache/bazel/_bazel_jonathan/e7c09fc463511989ded3d56396c466d4/external/grpc/bazel/grpc_build_system.bzl:172:12
WARNING: /home/jonathan/.cache/bazel/_bazel_jonathan/e7c09fc463511989ded3d56396c466d4/external/grpc/BUILD:1992:1: in srcs attribute of cc_library rule @grpc//:grpc_nanopb: please do not import '@grpc//third_party/nanopb:pb_decode.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'grpc_generate_one_off_targets', the error might have been caused by the macro implementation in /home/jonathan/.cache/bazel/_bazel_jonathan/e7c09fc463511989ded3d56396c466d4/external/grpc/bazel/grpc_build_system.bzl:172:12
WARNING: /home/jonathan/.cache/bazel/_bazel_jonathan/e7c09fc463511989ded3d56396c466d4/external/grpc/BUILD:1992:1: in srcs attribute of cc_library rule @grpc//:grpc_nanopb: please do not import '@grpc//third_party/nanopb:pb_encode.c' directly. You should either move the file to this package or depend on an appropriate rule there. Since this rule was created by the macro 'grpc_generate_one_off_targets', the error might have been caused by the macro implementation in /home/jonathan/.cache/bazel/_bazel_jonathan/e7c09fc463511989ded3d56396c466d4/external/grpc/bazel/grpc_build_system.bzl:172:12
WARNING: /home/jonathan/tensorflow/tensorflow/contrib/learn/BUILD:17:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:exporter': No longer supported. Switch to SavedModel immediately.
WARNING: /home/jonathan/tensorflow/tensorflow/contrib/learn/BUILD:17:1: in py_library rule //tensorflow/contrib/learn:learn: target '//tensorflow/contrib/learn:learn' depends on deprecated target '//tensorflow/contrib/session_bundle:gc': No longer supported. Switch to SavedModel immediately.
WARNING: /home/jonathan/tensorflow/tensorflow/contrib/timeseries/python/timeseries/BUILD:354:1: in py_library rule //tensorflow/contrib/timeseries/python/timeseries:ar_model: target '//tensorflow/contrib/timeseries/python/timeseries:ar_model' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /home/jonathan/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/BUILD:73:1: in py_library rule //tensorflow/contrib/timeseries/python/timeseries/state_space_models:kalman_filter: target '//tensorflow/contrib/timeseries/python/timeseries/state_space_models:kalman_filter' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /home/jonathan/tensorflow/tensorflow/contrib/timeseries/python/timeseries/state_space_models/BUILD:230:1: in py_library rule //tensorflow/contrib/timeseries/python/timeseries/state_space_models:filtering_postprocessor: target '//tensorflow/contrib/timeseries/python/timeseries/state_space_models:filtering_postprocessor' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /home/jonathan/tensorflow/tensorflow/contrib/bayesflow/BUILD:17:1: in py_library rule //tensorflow/contrib/bayesflow:bayesflow_py: target '//tensorflow/contrib/bayesflow:bayesflow_py' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /home/jonathan/tensorflow/tensorflow/contrib/seq2seq/BUILD:23:1: in py_library rule //tensorflow/contrib/seq2seq:seq2seq_py: target '//tensorflow/contrib/seq2seq:seq2seq_py' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
WARNING: /home/jonathan/tensorflow/tensorflow/contrib/BUILD:13:1: in py_library rule //tensorflow/contrib:contrib_py: target '//tensorflow/contrib:contrib_py' depends on deprecated target '//tensorflow/contrib/distributions:distributions_py': TensorFlow Distributions has migrated to TensorFlow Probability (https://github.com/tensorflow/probability). Deprecated copies remaining in tf.contrib.distributions are unmaintained, unsupported, and will be removed by late 2018. You should update all usage of `tf.contrib.distributions` to `tfp.distributions`.
INFO: Analysed target //tensorflow/tools/pip_package:build_pip_package (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
[0 / 4] [-----] ProtoCompile tensorflow/core/example/example_pb2.py
[5 / 21] Compiling tensorflow/core/ops/nn_ops.cc [for host]; 2s local ... (8 actions running)
[6 / 22] Compiling tensorflow/core/ops/nn_ops.cc [for host]; 6s local ... (7 actions running)
[13 / 35] Compiling tensorflow/core/ops/nn_ops.cc [for host]; 9s local ... (8 actions running)
[17 / 37] Compiling tensorflow/contrib/tensor_forest/hybrid/core/ops/routing_gradient_op.cc; 6s local ... (8 actions running)
[24 / 46] Compiling tensorflow/contrib/tensor_forest/hybrid/core/ops/k_feature_gradient_op.cc [for host]; 6s local ... (8 actions running)
[38 / 73] Compiling tensorflow/python/framework/python_op_gen_internal.cc [for host]; 7s local ... (8 actions, 7 running)
INFO: From Compiling tensorflow/python/framework/python_op_gen_internal.cc [for host]:
tensorflow/python/framework/python_op_gen_internal.cc: In member function 'virtual std::__cxx11::string tensorflow::python_op_gen_internal::GenPythonOp::Code()':
tensorflow/python/framework/python_op_gen_internal.cc:542:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = op_def_.input_arg_size(); i < params_no_default.size(); ++i) {
                                          ~~^~~~~~~~~~~~~~~~~~~~~~~~~~
tensorflow/python/framework/python_op_gen_internal.cc:545:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < params_with_default.size(); ++i) {
                   ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
INFO: From Compiling tensorflow/python/framework/python_op_gen.cc [for host]:
tensorflow/python/framework/python_op_gen.cc: In function 'std::__cxx11::string tensorflow::{anonymous}::VectorToTuple(const std::vector<std::__cxx11::basic_string<char> >&)':
tensorflow/python/framework/python_op_gen.cc:65:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < l.size(); ++i) {
                   ~~^~~~~~~~~~
tensorflow/python/framework/python_op_gen.cc: In function 'void tensorflow::{anonymous}::Unflatten(const string&, const std::vector<std::__cxx11::basic_string<char> >&, const string&, std::__cxx11::string*)':
tensorflow/python/framework/python_op_gen.cc:77:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < output_sizes.size(); ++i) {
                   ~~^~~~~~~~~~~~~~~~~~~~~

[...]


ERROR: /home/jonathan/tensorflow/tensorflow/core/kernels/BUILD:2951:1: output 'tensorflow/core/kernels/_objs/cwise_op_gpu/cwise_op_gpu_bitwise_and.cu.pic.o' was not created
INFO: From Compiling tensorflow/core/kernels/cwise_op_gpu_ceil.cu.cc [for host]:
./tensorflow/core/kernels/cwise_ops.h(190): warning: __host__ annotation on a defaulted function("scalar_left") is ignored

./tensorflow/core/kernels/cwise_ops.h(190): warning: __device__ annotation on a defaulted function("scalar_left") is ignored

./tensorflow/core/kernels/cwise_ops.h(220): warning: __host__ annotation on a defaulted function("scalar_right") is ignored

./tensorflow/core/kernels/cwise_ops.h(220): warning: __device__ annotation on a defaulted function("scalar_right") is ignored

./tensorflow/core/kernels/cwise_ops.h(190): warning: __host__ annotation on a defaulted function("scalar_left") is ignored

./tensorflow/core/kernels/cwise_ops.h(190): warning: __device__ annotation on a defaulted function("scalar_left") is ignored

./tensorflow/core/kernels/cwise_ops.h(220): warning: __host__ annotation on a defaulted function("scalar_right") is ignored

./tensorflow/core/kernels/cwise_ops.h(220): warning: __device__ annotation on a defaulted function("scalar_right") is ignored

ERROR: /home/jonathan/tensorflow/tensorflow/core/kernels/BUILD:2951:1: output 'tensorflow/core/kernels/_objs/cwise_op_gpu/cwise_op_gpu_mul.cu.pic.o' was not created
ERROR: /home/jonathan/tensorflow/tensorflow/core/kernels/BUILD:2951:1: not all outputs were created or valid
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 10303.024s, Critical Path: 9226.48s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 1813 processes: 1813 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully

for full log-file see
log.txt

@jvishnuvardhan jvishnuvardhan self-assigned this Feb 28, 2019
@jvishnuvardhan jvishnuvardhan added type:build/install Build and install issues subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues labels Feb 28, 2019
@jvishnuvardhan
Copy link
Contributor

@Thajobe Please check tested build configuration for your system here. For TF1.12, Bazel 0.15.0 is recommended. Could you downgrade it from Bazel 0.19.0 to 0.15.0 and follow instructions listed here. Another suggestion is to start fresh. So it is better to uninstall python and tensorflow and then follow the instruction in the listed doc. Please let me know how it progresses. Thanks!

@jvishnuvardhan jvishnuvardhan added the stat:awaiting response Status - Awaiting response from author label Feb 28, 2019
@Thajobe
Copy link
Author

Thajobe commented Mar 1, 2019

@jvishnuvardhan thank you for your support.
I tried with Bazel 0.15.0 and with fresh tensorflow (r1.12) download in a new conda environment but this doesn't help.
With Bazel 0.15.0 I get additional problems (the other problems still persist):

DEBUG: /home/jonathan/.cache/bazel/_bazel_jonathan/e7c09fc463511989ded3d56396c466d4/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:115:5: 
Auto-Configuration Warning: 'TMP' environment variable is not set, using 'C:\Windows\Temp' as default

what was one reason I used 0.19.2 as mentioned here.

Also I tried with NCCL 2.2.13 installed though it's optional for multiple GPU. But it didn't help.
Any other ideas?

@tensorflowbutler tensorflowbutler removed the stat:awaiting response Status - Awaiting response from author label Mar 1, 2019
@jvishnuvardhan jvishnuvardhan added the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Mar 1, 2019
@gunan gunan removed their assignment Sep 28, 2020
@sanatmpa1
Copy link

@Thajobe,

As we have the latest stable version of tensorflow 2.6.0, Can you try to build from source using the guide and let us know if it works fine. Thanks!

@sanatmpa1 sanatmpa1 self-assigned this Aug 18, 2021
@sanatmpa1 sanatmpa1 added stat:awaiting response Status - Awaiting response from author and removed stat:awaiting tensorflower Status - Awaiting response from tensorflower labels Aug 18, 2021
@Thajobe
Copy link
Author

Thajobe commented Aug 18, 2021

@sanatmpa1 Thank you for your late response. I didnt't even expected it now, because as you said the latest version is 2.6.2 way beyond the 1.12.
That's why I didnt't close the issue, or forgot about it.
Back than I coudn't get it to work with gpu, but I was able to work on a remote server instead.
I currently not even have the same computer any more, so I can't try if I would work with the current version.
As I'm not trying to compile TF from source right now, I will close this issue.

@Thajobe Thajobe closed this as completed Aug 18, 2021
@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Status - Awaiting response from author subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

5 participants