Giter Site home page Giter Site logo

Comments (6)

Venkat6871 avatar Venkat6871 commented on July 19, 2024

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!

from tensorflow.

dingjieliu avatar dingjieliu commented on July 19, 2024

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!!

from tensorflow.

dingjieliu avatar dingjieliu commented on July 19, 2024

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

from tensorflow.

Venkat6871 avatar Venkat6871 commented on July 19, 2024

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!

from tensorflow.

dingjieliu avatar dingjieliu commented on July 19, 2024

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/[email protected]/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/[email protected]/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!

from tensorflow.

dingjieliu avatar dingjieliu commented on July 19, 2024

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/[email protected]/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/[email protected]/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.

from tensorflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.