bazel icon indicating copy to clipboard operation
bazel copied to clipboard

bazelisk build --config=opt //tensorflow/tools/pip_package:build_pip_package failed

Open zhousheng89 opened this issue 1 year ago • 2 comments

Description of the bug:

(tfm_env) zhousheng@zhoushengdeMacBook-Pro tensorflow % bazelisk build --config=opt //tensorflow/tools/pip_package:build_pip_package

2024/05/16 19:44:06 WARN: Fallback to x86_64 because arm64 is not supported on Apple Silicon until 4.1.0 INFO: Options provided by the client: Inherited 'common' options: --isatty=1 --terminal_columns=80 INFO: Reading rc options for 'build' from /Users/zhousheng/tensorflow/.bazelrc: Inherited 'common' options: --experimental_repo_remote_exec INFO: Reading rc options for 'build' from /Users/zhousheng/tensorflow/.bazelrc: 'build' options: --define framework_shared_object=true --java_toolchain=@tf_toolchains//toolchains/java:tf_java_toolchain --host_java_toolchain=@tf_toolchains//toolchains/java:tf_java_toolchain --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true INFO: Reading rc options for 'build' from /Users/zhousheng/tensorflow/.tf_configure.bazelrc: 'build' options: --action_env PYTHON_BIN_PATH=/Applications/anaconda3/envs/tfm_env/bin/python --action_env PYTHON_LIB_PATH=/Applications/anaconda3/envs/tfm_env/lib/python3.10/site-packages --python_path=/Applications/anaconda3/envs/tfm_env/bin/python INFO: Reading rc options for 'build' from /Users/zhousheng/tensorflow/.bazelrc: 'build' options: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/common,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/fallback,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils INFO: Found applicable config definition build:short_logs in file /Users/zhousheng/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING INFO: Found applicable config definition build:v2 in file /Users/zhousheng/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1 INFO: Found applicable config definition build:opt in file /Users/zhousheng/tensorflow/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare INFO: Found applicable config definition build:macos in file /Users/zhousheng/tensorflow/.bazelrc: --apple_platform_type=macos --copt=-DGRPC_BAZEL_BUILD --copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 INFO: Repository llvm-raw instantiated at: /Users/zhousheng/tensorflow/WORKSPACE:11:14: in /Users/zhousheng/tensorflow/tensorflow/workspace3.bzl:42:9: in workspace /Users/zhousheng/tensorflow/third_party/llvm/workspace.bzl:10:20: in repo /Users/zhousheng/tensorflow/third_party/repo.bzl:113:21: in tf_http_archive Repository rule _tf_http_archive defined at: /Users/zhousheng/tensorflow/third_party/repo.bzl:66:35: in INFO: Repository tf_toolchains instantiated at: /Users/zhousheng/tensorflow/WORKSPACE:11:14: in /Users/zhousheng/tensorflow/tensorflow/workspace3.bzl:18:17: in workspace Repository rule http_archive defined at: /private/var/tmp/_bazel_zhousheng/1cd5efd2f0a5a37de23f9ef87043ec43/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in INFO: Repository tf_runtime instantiated at: /Users/zhousheng/tensorflow/WORKSPACE:11:14: in /Users/zhousheng/tensorflow/tensorflow/workspace3.bzl:28:15: in workspace /Users/zhousheng/tensorflow/third_party/tf_runtime/workspace.bzl:12:20: in repo /Users/zhousheng/tensorflow/third_party/repo.bzl:113:21: in tf_http_archive Repository rule _tf_http_archive defined at: /Users/zhousheng/tensorflow/third_party/repo.bzl:66:35: in INFO: Repository io_bazel_rules_closure instantiated at: /Users/zhousheng/tensorflow/WORKSPACE:11:14: in /Users/zhousheng/tensorflow/tensorflow/workspace3.bzl:8:17: in workspace Repository rule http_archive defined at: /private/var/tmp/_bazel_zhousheng/1cd5efd2f0a5a37de23f9ef87043ec43/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in WARNING: Download from http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/64c92c8013b557087351c91b5423b6046d10f206.tar.gz failed: class java.io.IOException Proxy address 127.0.0.1:7890 is not a valid URL WARNING: Download from https://github.com/tensorflow/runtime/archive/64c92c8013b557087351c91b5423b6046d10f206.tar.gz failed: class java.io.IOException Proxy address 127.0.0.1:7890 is not a valid URL ERROR: An error occurred during the fetch of repository 'tf_runtime': Traceback (most recent call last): File "/Users/zhousheng/tensorflow/third_party/repo.bzl", line 53, column 33, in _tf_http_archive_impl ctx.download_and_extract( Error in download_and_extract: java.io.IOException: Error downloading [http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/64c92c8013b557087351c91b5423b6046d10f206.tar.gz, https://github.com/tensorflow/runtime/archive/64c92c8013b557087351c91b5423b6046d10f206.tar.gz] to /private/var/tmp/_bazel_zhousheng/1cd5efd2f0a5a37de23f9ef87043ec43/external/tf_runtime/temp16315227037004296578/64c92c8013b557087351c91b5423b6046d10f206.tar.gz: Proxy address 127.0.0.1:7890 is not a valid URL ERROR: no such package '@tf_runtime//': java.io.IOException: Error downloading [http://mirror.tensorflow.org/github.com/tensorflow/runtime/archive/64c92c8013b557087351c91b5423b6046d10f206.tar.gz, https://github.com/tensorflow/runtime/archive/64c92c8013b557087351c91b5423b6046d10f206.tar.gz] to /private/var/tmp/_bazel_zhousheng/1cd5efd2f0a5a37de23f9ef87043ec43/external/tf_runtime/temp16315227037004296578/64c92c8013b557087351c91b5423b6046d10f206.tar.gz: Proxy address 127.0.0.1:7890 is not a valid URL INFO: Elapsed time: 26.141s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded)

Which category does this issue belong to?

Configurability

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which operating system are you running Bazel on?

No response

What is the output of bazel info release?

No response

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

zhousheng89 avatar May 16 '24 11:05 zhousheng89

@zhousheng89 Could you please provide sample code to reproduce this issue?

iancha1992 avatar May 16 '24 21:05 iancha1992

@zhousheng89您能否提供示例代码来重现此问题? The device is a mac m1 git clone -b v2.7.2 https://github.com/tensorflow/tensorflow.git cd tensorflow ./configure bazel build //tensorflow/tools/pip_package:build_pip_package

zhousheng89 avatar May 17 '24 01:05 zhousheng89

It seems you are using a http proxy, how do you set it exactly? It may be that the protocol is missing.

meisterT avatar Oct 08 '24 09:10 meisterT