Failed to build tensorflow 2.14 on Apple silicon.
cc: @kulinseth  Exact same issue here Similar for me on MacOS 2.14.0 (x86-64), running XCode 15. Log:

```
ERROR: /Users/feranick/Desktop/tensorflow/tensorflow/python/BUILD:607:24: Linking tensorflow/python/_pywrap_tensorflow_internal.so failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //tensorflow/python:_pywrap_tensorflow_internal.so) 
  (cd /private/var/tmp/_bazel_feranick/50b852099a3bf3aaa184abce166f8e34/execroot/org_tensorflow && \
  exec env - \
    APPLE_SDK_PLATFORM=MacOSX \
    APPLE_SDK_VERSION_OVERRIDE=14.0 \
    PATH=/opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin:/opt/usr/local/bin/:/Users/feranick/Documents/Work/c/android-sdk/platform-tools:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Library/TeX/texbin \
    PYTHON_BIN_PATH=/opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3 \
    PYTHON_LIB_PATH=/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages \
    TF2_BEHAVIOR=1 \
    XCODE_VERSION_OVERRIDE=15.0.0.15A240d \
    ZERO_AR_DATE=1 \
  external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-opt/bin/tensorflow/python/_pywrap_tensorflow_internal.so-2.params)
# Configuration: 907b626e9403f9220dbcd58dca264ff964f627822c5119cf4ce0d178d799fedc
# Execution platform: @local_execution_config_platform//:platform
ld: building exports trie: duplicate symbol '__FE_DFL_DISABLE_SSE_DENORMS_ENV'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in child process '/usr/bin/xcrun'. 1
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 409.983s, Critical Path: 302.11s
INFO: 1355 processes: 519 internal, 836 local.
FAILED: Build did NOT complete successfully
``` Same issue here. 

For my opinion, the reason is a new linker released with clang 15.0. Probably, libraries dependencies should be reviewed by project maintainer. But as temporary solution I use "-**ld_classic**" linker flag, that restores old linker's behavior, as before version 15. Please note, this flag is temporary available and will be removed in next releases.

The patch is attached.
[tensorflow.patch](https://github.com/tensorflow/tensorflow/files/13215155/tensorflow.patch)
 @srg70 This method is very useful; it can be successfully built with `tensorflow 2.14/2.15`. > Same issue here.
> 
> For my opinion, the reason is a new linker released with clang 15.0. Probably, libraries dependencies should be reviewed by project maintainer. But as temporary solution I use "-**ld_classic**" linker flag, that restores old linker's behavior, as before version 15. Please note, this flag is temporary available and will be removed in next releases.
> 
> The patch is attached. [tensorflow.patch](https://github.com/tensorflow/tensorflow/files/13215155/tensorflow.patch)

The linker issue is has been resolved = since XCode 14.3 (and as recently as 15.3). Besides this, are people still having issue with Apple Silicon with TF 2.16.1? If not, this should be closed. @sun1638650145 , Could you please try the latest TensorFlow version 2.16.1 and let us know if you're still facing issue.

You can follow the table here for dependency details, https://www.tensorflow.org/install/source#macos @sachinprasadhs Thank you very much for your reminder, the issue has finally been resolved! Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62001">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/62001">No</a>

### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

tf 2.14

### Custom code

No

### OS platform and distribution

macOS 14.0

### Mobile device

None

### Python version

3.9, 3.10, 3.11

### Bazel version

6.1.0-homebrew

### GCC/compiler version

Apple clang version 15.0.0 (clang-1500.0.40.1)

### CUDA/cuDNN version

None

### GPU model and memory

None

### Current behavior?

I am trying to build `tensorflow 2.14` on Python `3.9`, `3.10`, and `3.11`, but I am encountering an error that says `ld: building exports trie: duplicate symbol '_copy_printf_domain'`, which is causing the build to fail.

### Standalone code to reproduce the issue

Default settings used for all options.

```shell
bazel build //tensorflow/tools/pip_package:build_pip_package
```


### Relevant log output

```shell
WARNING: while reading option defaults file '/Users/sunruiqi/Desktop/tensorflow-2.14.0/.bazelrc':
  invalid command name 'startup:windows'.
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=80
INFO: Reading rc options for 'build' from /Users/sunruiqi/Desktop/tensorflow-2.14.0/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /Users/sunruiqi/Desktop/tensorflow-2.14.0/.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 --features=-force_no_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/sunruiqi/Desktop/tensorflow-2.14.0/.tf_configure.bazelrc:
  'build' options: --action_env PYTHON_BIN_PATH=/Users/sunruiqi/miniforge3/envs/tensorflow-macos/bin/python3 --action_env PYTHON_LIB_PATH=/Users/sunruiqi/miniforge3/envs/tensorflow-macos/lib/python3.10/site-packages --python_path=/Users/sunruiqi/miniforge3/envs/tensorflow-macos/bin/python3
INFO: Found applicable config definition build:short_logs in file /Users/sunruiqi/Desktop/tensorflow-2.14.0/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /Users/sunruiqi/Desktop/tensorflow-2.14.0/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:macos in file /Users/sunruiqi/Desktop/tensorflow-2.14.0/.bazelrc: --apple_platform_type=macos --copt=-DGRPC_BAZEL_BUILD --features=archive_param_file --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 --config=no_tfrt
INFO: Found applicable config definition build:no_tfrt in file /Users/sunruiqi/Desktop/tensorflow-2.14.0/.bazelrc: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/ir,tensorflow/compiler/mlir/tfrt/ir/mlrt,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/mlrt,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/compiler/mlir/tfrt/transforms/mlrt,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/runtime_fallback/test,tensorflow/core/runtime_fallback/test/gpu,tensorflow/core/runtime_fallback/test/saved_model,tensorflow/core/runtime_fallback/test/testdata,tensorflow/core/tfrt/stubs,tensorflow/core/tfrt/tfrt_session,tensorflow/core/tfrt/mlrt,tensorflow/core/tfrt/mlrt/attribute,tensorflow/core/tfrt/mlrt/kernel,tensorflow/core/tfrt/mlrt/bytecode,tensorflow/core/tfrt/mlrt/interpreter,tensorflow/compiler/mlir/tfrt/translate/mlrt,tensorflow/compiler/mlir/tfrt/translate/mlrt/testdata,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,tensorflow/core/tfrt/saved_model/python,tensorflow/core/tfrt/graph_executor/python,tensorflow/core/tfrt/saved_model/utils
DEBUG: /Users/sunruiqi/Desktop/tensorflow-2.14.0/tensorflow/tools/toolchains/python/python_repo.bzl:21:14: 
TF_PYTHON_VERSION variable was not set correctly, using default version. 3.10 Python
will be used.

To set Python version, run
export TF_PYTHON_VERSION=3.9
WARNING: while reading option defaults file '/Users/sunruiqi/Desktop/tensorflow-2.14.0/.bazelrc':
  invalid command name 'startup:windows'.
INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (646 packages loaded, 41360 targets configured).
INFO: Found 1 target...
ERROR: /Users/sunruiqi/Desktop/tensorflow-2.14.0/tensorflow/python/BUILD:607:24: Linking tensorflow/python/_pywrap_tensorflow_internal.so failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target //tensorflow/python:_pywrap_tensorflow_internal.so) external/local_config_cc/cc_wrapper.sh @bazel-out/darwin_arm64-opt/bin/tensorflow/python/_pywrap_tensorflow_internal.so-2.params
ld: building exports trie: duplicate symbol '_copy_printf_domain'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error in child process '/usr/bin/xcrun'. 1
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: 4492.049s, Critical Path: 233.85s
INFO: 19651 processes: 4801 internal, 14850 local.
FAILED: Build did NOT complete successfully
```
