[go: nahoru, domu]

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

error: no such file or directory: 'v2' when Bazel build for macOS #69786

Open
dingjieliu opened this issue Jun 14, 2024 · 6 comments
Open

error: no such file or directory: 'v2' when Bazel build for macOS #69786

dingjieliu opened this issue Jun 14, 2024 · 6 comments
Assignees
Labels
subtype:macOS macOS Build/Installation issues TF 2.13 For issues related to Tensorflow 2.13 type:build/install Build and install issues

Comments

@dingjieliu
Copy link

Issue type

Build/Install

Have you reproduced the bug with TensorFlow Nightly?

No

Source

source

TensorFlow version

tf 2.13.1

Custom code

No

OS platform and distribution

macOS 14.3.1

Mobile device

no

Python version

3.9

Bazel version

5.3.0

GCC/compiler version

Apple clang version 15.0.0 (clang-1500.1.0.2.5)

CUDA/cuDNN version

np

GPU model and memory

no

Current behavior?

Hi, I am trying to install TensorFlow C lib with Bazel as recommended.

I run:
git clone
git checkout v2.13.1
bazel build --config opt //tensorflow/tools/lib_package:libtensorflow

it says:

INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=118
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --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 --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/Library/Developer/CommandLineTools/usr/bin/python3 --action_env PYTHON_LIB_PATH=/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages --python_path=/Library/Developer/CommandLineTools/usr/bin/python3
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,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/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/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils,tensorflow/core/tfrt/utils/debug
INFO: Found applicable config definition build:short_logs in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:opt in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc: --copt=v2 --host_copt=v2
INFO: Found applicable config definition build:macos in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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++17 --host_cxxopt=-std=c++17
WARNING: Download from https://golang.org/dl/?mode=json&include=all failed: class java.io.IOException connect timed out
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/openxla/stablehlo/archive/43d81c6883ade82052920bd367c61f9e52f09954.zip failed: class java.io.FileNotFoundException GET returned 404 Not Found
INFO: Analyzed target //tensorflow/tools/lib_package:libtensorflow (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_dingjieliu/26c94a9dc96bfc87ddc8b7c634b4a3d0/external/com_google_protobuf/BUILD.bazel:364:11: Compiling src/google/protobuf/compiler/code_generator.cc failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 44 arguments skipped)
clang: error: no such file or directory: 'v2'
Target //tensorflow/tools/lib_package:libtensorflow failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.202s, Critical Path: 0.05s
INFO: 10 processes: 10 internal.
FAILED: Build did NOT complete successfully

Standalone code to reproduce the issue

just release version.

Relevant log output

INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=118
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --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 --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/Library/Developer/CommandLineTools/usr/bin/python3 --action_env PYTHON_LIB_PATH=/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages --python_path=/Library/Developer/CommandLineTools/usr/bin/python3
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,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/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/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils,tensorflow/core/tfrt/utils/debug
INFO: Found applicable config definition build:short_logs in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:opt in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc: --copt=v2 --host_copt=v2
INFO: Found applicable config definition build:macos in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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++17 --host_cxxopt=-std=c++17
WARNING: Download from https://golang.org/dl/?mode=json&include=all failed: class java.io.IOException connect timed out
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/openxla/stablehlo/archive/43d81c6883ade82052920bd367c61f9e52f09954.zip failed: class java.io.FileNotFoundException GET returned 404 Not Found
INFO: Analyzed target //tensorflow/tools/lib_package:libtensorflow (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_dingjieliu/26c94a9dc96bfc87ddc8b7c634b4a3d0/external/com_google_protobuf/BUILD.bazel:364:11: Compiling src/google/protobuf/compiler/code_generator.cc failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 44 arguments skipped)
clang: error: no such file or directory: 'v2'
Target //tensorflow/tools/lib_package:libtensorflow failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.202s, Critical Path: 0.05s
INFO: 10 processes: 10 internal.
FAILED: Build did NOT complete successfully
@google-ml-butler google-ml-butler bot added the type:build/install Build and install issues label Jun 14, 2024
@Venkat6871 Venkat6871 added subtype:macOS macOS Build/Installation issues TF 2.13 For issues related to Tensorflow 2.13 labels Jun 17, 2024
@Venkat6871
Copy link
Contributor

Hi @dingjieliu ,

  • I found version compatibility here. Could you please go through this documentation once. You need to use Clang 16.0.0 for tf 2.13.1. But you are using other version. Please update the version.

Thank you!

@Venkat6871 Venkat6871 added the stat:awaiting response Status - Awaiting response from author label Jun 17, 2024
@dingjieliu
Copy link
Author

Hi Venkat @Venkat6871

I have updated the Clang version to 16.0.0 as recommended. Besides, I run the commend with:

bazel build --config opt --compiler /usr/local/bin/clang //tensorflow/tools/lib_package:libtensorflow

I met an error said no toolchain is configured. (detailed info will be post later)

So I modify .bazelrc file by changing build:tf_fuzztest --action_env=CC=/usr/local/bin/clang and build:tf_fuzztest --action_env=CXX=/usr/local/bin/clang++ but the error remaines:

% git diff .bazelrc
diff --git a/.bazelrc b/.bazelrc
index d78d0a862da..9300a1cc1db 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -700,8 +700,8 @@ build:tfrt --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/
try-import fuzztest.bazelrc
run:tf_fuzztest --config=fuzztest
# Should aim to remove these
-build:tf_fuzztest --action_env=CC=clang
-build:tf_fuzztest --action_env=CXX=clang++
+build:tf_fuzztest --action_env=CC=/usr/local/bin/clang
+build:tf_fuzztest --action_env=CXX=/usr/local/bin/clang++
build:tf_fuzztest --spawn_strategy=sandboxed
build:tf_fuzztest --config=monolithic

How should I do to set the toolchain configs? Thanks for your help!!

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Status - Awaiting response from author label Jun 18, 2024
@dingjieliu
Copy link
Author

I just found the Chinese and English pages are different significantly. I will try later. Thanks!

@Venkat6871
Copy link
Contributor

Hi @dingjieliu ,

  • I guess Chinese page documentation may be not updated. Could you please try to follow the english documentation page as it updated?

Thank you!

@Venkat6871 Venkat6871 added the stat:awaiting response Status - Awaiting response from author label Jun 18, 2024
@dingjieliu
Copy link
Author

Hi @Venkat6871 ,

I have updated my clang to 16.0.0

% clang --version
clang version 16.0.0 (https://github.com/llvm/llvm-project.git 08d094a0e457360ad8b94b017d2dc277e697ca76)
Target: arm64-apple-darwin23.3.0
Thread model: posix
InstalledDir: /usr/local/bin

Then I run Bazel to build:

bazel clean --expunge 
./configure
bazel build --config opt //tensorflow/tools/lib_package:libtensorflow

it says:

% bazel build --config opt //tensorflow/tools/lib_package:libtensorflow
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=118
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --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 --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/opt/homebrew/bin/python3.11 --action_env PYTHON_LIB_PATH=/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages --python_path=/opt/homebrew/bin/python3.11
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,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/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/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils,tensorflow/core/tfrt/utils/debug
INFO: Found applicable config definition build:short_logs in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:opt in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare
INFO: Found applicable config definition build:macos in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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++17 --host_cxxopt=-std=c++17
WARNING: Download from https://golang.org/dl/?mode=json&include=all failed: class java.io.IOException connect timed out
INFO: Analyzed target //tensorflow/tools/lib_package:libtensorflow (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_dingjieliu/26c94a9dc96bfc87ddc8b7c634b4a3d0/external/com_google_protobuf/BUILD.bazel:75:11: Compiling src/google/protobuf/any.cc failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 44 arguments skipped)
external/com_google_protobuf/src/google/protobuf/any.cc:51:14: error: no matching member function for call to 'Set'
  type_url_->Set(
  ~~~~~~~~~~~^~~
/usr/local/include/google/protobuf/arenastring.h:190:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(const std::string* default_value, ConstStringParam value,
       ^
/usr/local/include/google/protobuf/arenastring.h:192:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(const std::string* default_value, std::string&& value,
       ^
/usr/local/include/google/protobuf/arenastring.h:194:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(EmptyDefault, ConstStringParam value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:195:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(EmptyDefault, std::string&& value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:196:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(NonEmptyDefault, ConstStringParam value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:197:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(NonEmptyDefault, std::string&& value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:199:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  void Set(FirstParam p1, const char* str, ::google::protobuf::Arena* arena) {
       ^
/usr/local/include/google/protobuf/arenastring.h:209:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  void Set(FirstParam p1,
       ^
/usr/local/include/google/protobuf/arenastring.h:203:8: note: candidate function template not viable: requires 4 arguments, but 2 were provided
  void Set(FirstParam p1, const char* str, size_t size,
       ^
external/com_google_protobuf/src/google/protobuf/any.cc:53:44: error: no matching member function for call to 'Mutable'
  return message.SerializeToString(value_->Mutable(arena));
                                   ~~~~~~~~^~~~~~~
/usr/local/include/google/protobuf/arenastring.h:238:16: note: candidate function not viable: requires 2 arguments, but 1 was provided
  std::string* Mutable(EmptyDefault, ::google::protobuf::Arena* arena);
               ^
/usr/local/include/google/protobuf/arenastring.h:240:16: note: candidate function not viable: requires 2 arguments, but 1 was provided
  std::string* Mutable(const LazyString& default_value, ::google::protobuf::Arena* arena);
               ^
2 errors generated.
Target //tensorflow/tools/lib_package:libtensorflow failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.928s, Critical Path: 0.73s
INFO: 12 processes: 11 internal, 1 local.
FAILED: Build did NOT complete successfully
dingjieliu@dingjiedeair tensorflow % bazel build --config opt //tensorflow/tools/lib_package:libtensorflow
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=118
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --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 --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/opt/homebrew/bin/python3.11 --action_env PYTHON_LIB_PATH=/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages --python_path=/opt/homebrew/bin/python3.11
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,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/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/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils,tensorflow/core/tfrt/utils/debug
INFO: Found applicable config definition build:short_logs in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:opt in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare
INFO: Found applicable config definition build:macos in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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++17 --host_cxxopt=-std=c++17
WARNING: Download from https://golang.org/dl/?mode=json&include=all failed: class java.io.IOException connect timed out
INFO: Analyzed target //tensorflow/tools/lib_package:libtensorflow (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_dingjieliu/26c94a9dc96bfc87ddc8b7c634b4a3d0/external/com_google_protobuf/BUILD.bazel:75:11: Compiling src/google/protobuf/any.cc failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 44 arguments skipped)
external/com_google_protobuf/src/google/protobuf/any.cc:51:14: error: no matching member function for call to 'Set'
  type_url_->Set(
  ~~~~~~~~~~~^~~
/usr/local/include/google/protobuf/arenastring.h:190:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(const std::string* default_value, ConstStringParam value,
       ^
/usr/local/include/google/protobuf/arenastring.h:192:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(const std::string* default_value, std::string&& value,
       ^
/usr/local/include/google/protobuf/arenastring.h:194:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(EmptyDefault, ConstStringParam value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:195:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(EmptyDefault, std::string&& value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:196:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(NonEmptyDefault, ConstStringParam value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:197:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(NonEmptyDefault, std::string&& value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:199:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  void Set(FirstParam p1, const char* str, ::google::protobuf::Arena* arena) {
       ^
/usr/local/include/google/protobuf/arenastring.h:209:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  void Set(FirstParam p1,
       ^
/usr/local/include/google/protobuf/arenastring.h:203:8: note: candidate function template not viable: requires 4 arguments, but 2 were provided
  void Set(FirstParam p1, const char* str, size_t size,
       ^
external/com_google_protobuf/src/google/protobuf/any.cc:53:44: error: no matching member function for call to 'Mutable'
  return message.SerializeToString(value_->Mutable(arena));
                                   ~~~~~~~~^~~~~~~
/usr/local/include/google/protobuf/arenastring.h:238:16: note: candidate function not viable: requires 2 arguments, but 1 was provided
  std::string* Mutable(EmptyDefault, ::google::protobuf::Arena* arena);
               ^
/usr/local/include/google/protobuf/arenastring.h:240:16: note: candidate function not viable: requires 2 arguments, but 1 was provided
  std::string* Mutable(const LazyString& default_value, ::google::protobuf::Arena* arena);
               ^
2 errors generated.
Target //tensorflow/tools/lib_package:libtensorflow failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.948s, Critical Path: 0.77s
INFO: 10 processes: 10 internal.
FAILED: Build did NOT complete successfully

How should I do? Is it caused by wrong protobuf version or failed download or something else? Does it have some version requirement for protobuf?

Thank you!

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Status - Awaiting response from author label Jun 18, 2024
@dingjieliu
Copy link
Author

Hi @Venkat6871 ,

I have updated my clang to 16.0.0

% clang --version
clang version 16.0.0 (https://github.com/llvm/llvm-project.git 08d094a0e457360ad8b94b017d2dc277e697ca76)
Target: arm64-apple-darwin23.3.0
Thread model: posix
InstalledDir: /usr/local/bin

Then I run Bazel to build:

bazel clean --expunge 
./configure
bazel build --config opt //tensorflow/tools/lib_package:libtensorflow

it says:

% bazel build --config opt //tensorflow/tools/lib_package:libtensorflow
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=118
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --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 --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/opt/homebrew/bin/python3.11 --action_env PYTHON_LIB_PATH=/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages --python_path=/opt/homebrew/bin/python3.11
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,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/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/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils,tensorflow/core/tfrt/utils/debug
INFO: Found applicable config definition build:short_logs in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:opt in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare
INFO: Found applicable config definition build:macos in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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++17 --host_cxxopt=-std=c++17
WARNING: Download from https://golang.org/dl/?mode=json&include=all failed: class java.io.IOException connect timed out
INFO: Analyzed target //tensorflow/tools/lib_package:libtensorflow (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_dingjieliu/26c94a9dc96bfc87ddc8b7c634b4a3d0/external/com_google_protobuf/BUILD.bazel:75:11: Compiling src/google/protobuf/any.cc failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 44 arguments skipped)
external/com_google_protobuf/src/google/protobuf/any.cc:51:14: error: no matching member function for call to 'Set'
  type_url_->Set(
  ~~~~~~~~~~~^~~
/usr/local/include/google/protobuf/arenastring.h:190:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(const std::string* default_value, ConstStringParam value,
       ^
/usr/local/include/google/protobuf/arenastring.h:192:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(const std::string* default_value, std::string&& value,
       ^
/usr/local/include/google/protobuf/arenastring.h:194:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(EmptyDefault, ConstStringParam value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:195:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(EmptyDefault, std::string&& value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:196:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(NonEmptyDefault, ConstStringParam value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:197:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(NonEmptyDefault, std::string&& value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:199:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  void Set(FirstParam p1, const char* str, ::google::protobuf::Arena* arena) {
       ^
/usr/local/include/google/protobuf/arenastring.h:209:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  void Set(FirstParam p1,
       ^
/usr/local/include/google/protobuf/arenastring.h:203:8: note: candidate function template not viable: requires 4 arguments, but 2 were provided
  void Set(FirstParam p1, const char* str, size_t size,
       ^
external/com_google_protobuf/src/google/protobuf/any.cc:53:44: error: no matching member function for call to 'Mutable'
  return message.SerializeToString(value_->Mutable(arena));
                                   ~~~~~~~~^~~~~~~
/usr/local/include/google/protobuf/arenastring.h:238:16: note: candidate function not viable: requires 2 arguments, but 1 was provided
  std::string* Mutable(EmptyDefault, ::google::protobuf::Arena* arena);
               ^
/usr/local/include/google/protobuf/arenastring.h:240:16: note: candidate function not viable: requires 2 arguments, but 1 was provided
  std::string* Mutable(const LazyString& default_value, ::google::protobuf::Arena* arena);
               ^
2 errors generated.
Target //tensorflow/tools/lib_package:libtensorflow failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.928s, Critical Path: 0.73s
INFO: 12 processes: 11 internal, 1 local.
FAILED: Build did NOT complete successfully
dingjieliu@dingjiedeair tensorflow % bazel build --config opt //tensorflow/tools/lib_package:libtensorflow
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=118
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_header_only=true --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 --experimental_cc_shared_library --experimental_link_static_libraries_once=false --incompatible_enforce_config_setting_visibility
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/opt/homebrew/bin/python3.11 --action_env PYTHON_LIB_PATH=/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages --python_path=/opt/homebrew/bin/python3.11
INFO: Reading rc options for 'build' from /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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/ir,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_jitrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,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/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/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/graph_executor,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils,tensorflow/core/tfrt/utils/debug
INFO: Found applicable config definition build:short_logs in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:opt in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/tensorflow/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare
INFO: Found applicable config definition build:macos in file /Users/dingjieliu/Desktop/workspace/auto_vision/third_party/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++17 --host_cxxopt=-std=c++17
WARNING: Download from https://golang.org/dl/?mode=json&include=all failed: class java.io.IOException connect timed out
INFO: Analyzed target //tensorflow/tools/lib_package:libtensorflow (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /private/var/tmp/_bazel_dingjieliu/26c94a9dc96bfc87ddc8b7c634b4a3d0/external/com_google_protobuf/BUILD.bazel:75:11: Compiling src/google/protobuf/any.cc failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics ... (remaining 44 arguments skipped)
external/com_google_protobuf/src/google/protobuf/any.cc:51:14: error: no matching member function for call to 'Set'
  type_url_->Set(
  ~~~~~~~~~~~^~~
/usr/local/include/google/protobuf/arenastring.h:190:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(const std::string* default_value, ConstStringParam value,
       ^
/usr/local/include/google/protobuf/arenastring.h:192:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(const std::string* default_value, std::string&& value,
       ^
/usr/local/include/google/protobuf/arenastring.h:194:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(EmptyDefault, ConstStringParam value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:195:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(EmptyDefault, std::string&& value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:196:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(NonEmptyDefault, ConstStringParam value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:197:8: note: candidate function not viable: requires 3 arguments, but 2 were provided
  void Set(NonEmptyDefault, std::string&& value, ::google::protobuf::Arena* arena);
       ^
/usr/local/include/google/protobuf/arenastring.h:199:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  void Set(FirstParam p1, const char* str, ::google::protobuf::Arena* arena) {
       ^
/usr/local/include/google/protobuf/arenastring.h:209:8: note: candidate function template not viable: requires 3 arguments, but 2 were provided
  void Set(FirstParam p1,
       ^
/usr/local/include/google/protobuf/arenastring.h:203:8: note: candidate function template not viable: requires 4 arguments, but 2 were provided
  void Set(FirstParam p1, const char* str, size_t size,
       ^
external/com_google_protobuf/src/google/protobuf/any.cc:53:44: error: no matching member function for call to 'Mutable'
  return message.SerializeToString(value_->Mutable(arena));
                                   ~~~~~~~~^~~~~~~
/usr/local/include/google/protobuf/arenastring.h:238:16: note: candidate function not viable: requires 2 arguments, but 1 was provided
  std::string* Mutable(EmptyDefault, ::google::protobuf::Arena* arena);
               ^
/usr/local/include/google/protobuf/arenastring.h:240:16: note: candidate function not viable: requires 2 arguments, but 1 was provided
  std::string* Mutable(const LazyString& default_value, ::google::protobuf::Arena* arena);
               ^
2 errors generated.
Target //tensorflow/tools/lib_package:libtensorflow failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.948s, Critical Path: 0.77s
INFO: 10 processes: 10 internal.
FAILED: Build did NOT complete successfully

How should I do? Is it caused by wrong protobuf version or failed download or something else? Does it have some version requirement for protobuf?

Thank you!

tried with v2.12.1 and the error remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subtype:macOS macOS Build/Installation issues TF 2.13 For issues related to Tensorflow 2.13 type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

2 participants