Build from Source Issues on MacOS Ventura 13.2
Labels: module: build, triaged, module: macos

### 🐛 Describe the bug

If I build Pytorch from source on MacOS 13.2 using 'MACOSX_DEPLOYMENT_TARGET=11.0 '  I get these linker errors:
```
Undefined symbols for architecture x86_64:
  "unsigned short caffe2::TypeMeta::addTypeMetaData<std::__1::unique_ptr<std::__1::atomic<bool>, std::__1::default_delete<std::__1::atomic<bool> > > >()", referenced from:
      std::__1::unique_ptr<std::__1::atomic<bool>, std::__1::default_delete<std::__1::atomic<bool> > >* caffe2::Blob::GetMutable<std::__1::unique_ptr<std::__1::atomic<bool>, std::__1::default_delete<std::__1::atomic<bool> > > >() in atomic_ops.cc.o
      std::__1::unique_ptr<std::__1::atomic<bool>, std::__1::default_delete<std::__1::atomic<bool> > > const& caffe2::Blob::Get<std::__1::unique_ptr<std::__1::atomic<bool>, std::__1::default_delete<std::__1::atomic<bool> > > >() const in atomic_ops.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

```
If I build Pytorch from source on MacOS 13.2 using 'MACOSX_DEPLOYMENT_TARGET=10.9 '  I get these linker errors:
```
ld: warning: -pie being ignored. It is only used when linking a main executable
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/Users/davidlaxer/anaconda3/envs/AI-Feynman/bin/x86_64-apple-darwin13.4.0-clang' failed with exit code 1

```

I found this thread on the error message ' unsupported tapi file type '!tapi-tbd' in YAML file' on Apple Developer Support:

https://developer.apple.com/forums/thread/699629

The problem may be in this version of clang:
Python version: 3.10.9 (main, Jan 11 2023, 09:18:20) [Clang 14.0.6 ] (64-bit runtime)

Any suggestions?

### Versions

```
% python collect_env.py
Collecting environment information...
PyTorch version: 2.0.0a0+git2f0b0c5
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 13.2 (x86_64)
GCC version: Could not collect
Clang version: 14.0.0 (clang-1400.0.29.202)
CMake version: version 3.22.1
Libc version: N/A

Python version: 3.10.9 (main, Jan 11 2023, 09:18:20) [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] audiolm-pytorch==0.0.1
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.23.5
[pip3] pytorch-transformers==1.1.0
[pip3] torch==2.0.0a0+gitf8b2879
[pip3] torch-struct==0.5
[pip3] torch-summary==1.4.5
[pip3] torch-utils==0.1.2
[pip3] torchaudio==0.13.0.dev20221015
[pip3] torchtraining-nightly==1604016577
[pip3] torchvision==0.15.0a0+8985b59
[pip3] vector-quantize-pytorch==0.9.2
[conda] nomkl                     3.0                           0  
[conda] numpy                     1.23.5          py310he50c29a_0  
[conda] numpy-base                1.23.5          py310h992e150_0  
[conda] pytorch-transformers      1.1.0                    pypi_0    pypi
[conda] torch                     2.0.0a0+gitf8b2879          pypi_0    pypi
[conda] torch-struct              0.5                      pypi_0    pypi
[conda] torch-summary             1.4.5                    pypi_0    pypi
[conda] torch-utils               0.1.2                    pypi_0    pypi
[conda] torchaudio                0.13.0.dev20221015          pypi_0    pypi
[conda] torchtraining-nightly     1604016577               pypi_0    pypi
[conda] torchvision               0.15.0a0+8985b59          pypi_0    pypi
[conda] vector-quantize-pytorch   0.9.2                    pypi_0    pypi
```
[output.txt](https://github.com/pytorch/pytorch/files/10527902/output.txt)


cc @malfet @seemethere @albanD