Unable to install Preview (Nightly) on M1 macOS: "Symbol not found"
Labels: oncall: binaries

### 🐛 Describe the bug

The conda installation command to install from `-c pytorch-nightly` does not recognize `torchaudio`.

```
(temp) speech-modes % conda install pytorch torchvision torchaudio -c pytorch-nightly
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - torchaudio

Current channels:

  - https://conda.anaconda.org/pytorch-nightly/osx-arm64
  - https://conda.anaconda.org/pytorch-nightly/noarch
  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.
```

So I install with `pip`:

```
(temp) speech-modes % pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/nightly/cpu
Collecting torch
  Downloading https://download.pytorch.org/whl/nightly/cpu/torch-1.13.0.dev20220601-cp39-none-macosx_11_0_arm64.whl (48.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 MB 20.2 MB/s eta 0:00:00
Collecting torchvision
  Downloading https://download.pytorch.org/whl/nightly/cpu/torchvision-0.14.0a0%2Bf9f721d-cp39-cp39-macosx_11_0_arm64.whl (804 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 804.3/804.3 kB 15.0 MB/s eta 0:00:00
Collecting torchaudio
  Downloading https://download.pytorch.org/whl/nightly/cpu/torchaudio-0.14.0.dev20220601-cp39-cp39-macosx_11_0_arm64.whl (2.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 20.2 MB/s eta 0:00:00
Collecting typing-extensions
  Using cached typing_extensions-4.2.0-py3-none-any.whl (24 kB)
Collecting numpy
  Downloading numpy-1.23.0rc2-cp39-cp39-macosx_11_0_arm64.whl (13.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.3/13.3 MB 22.5 MB/s eta 0:00:00
Collecting pillow!=8.3.*,>=5.3.0
  Using cached Pillow-9.1.1-cp39-cp39-macosx_11_0_arm64.whl (2.8 MB)
Collecting requests
  Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
Collecting charset-normalizer~=2.0.0
  Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.5.18.1-py3-none-any.whl (155 kB)
Installing collected packages: urllib3, typing-extensions, pillow, numpy, idna, charset-normalizer, certifi, torch, requests, torchvision, torchaudio
Successfully installed certifi-2022.5.18.1 charset-normalizer-2.0.12 idna-3.3 numpy-1.23.0rc2 pillow-9.1.1 requests-2.27.1 torch-1.13.0.dev20220601 torchaudio-0.14.0.dev20220601 torchvision-0.14.0a0+f9f721d typing-extensions-4.2.0 urllib3-1.26.9
```

Running my script fails when importing `torchaudio`:

```
(temp) speech-modes % ./run.sh
Traceback (most recent call last):
  File "/Users/redacted/speech-modes/speech_modes/main.py", line 8, in <module>
    import torchaudio
  File "/opt/homebrew/Caskroom/miniforge/base/envs/temp/lib/python3.9/site-packages/torchaudio/__init__.py", line 1, in <module>
    from torchaudio import (  # noqa: F401
  File "/opt/homebrew/Caskroom/miniforge/base/envs/temp/lib/python3.9/site-packages/torchaudio/_extension.py", line 101, in <module>
    _init_extension()
  File "/opt/homebrew/Caskroom/miniforge/base/envs/temp/lib/python3.9/site-packages/torchaudio/_extension.py", line 86, in _init_extension
    _load_lib("libtorchaudio")
  File "/opt/homebrew/Caskroom/miniforge/base/envs/temp/lib/python3.9/site-packages/torchaudio/_extension.py", line 51, in _load_lib
    torch.ops.load_library(path)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/temp/lib/python3.9/site-packages/torch/_ops.py", line 255, in load_library
    ctypes.CDLL(path)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/temp/lib/python3.9/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/homebrew/Caskroom/miniforge/base/envs/temp/lib/python3.9/site-packages/torchaudio/lib/libtorchaudio.so, 0x0006): Symbol not found: __ZN2at14RecordFunctionC1ENS_11RecordScopeEb
  Referenced from: /opt/homebrew/Caskroom/miniforge/base/envs/temp/lib/python3.9/site-packages/torchaudio/lib/libtorchaudio.so
  Expected in: /opt/homebrew/Caskroom/miniforge/base/envs/temp/lib/python3.9/site-packages/torch/lib/libtorch_cpu.dylib
```

### Versions

```
(temp) speech-modes % python collect_env.py
Collecting environment information...
PyTorch version: 1.13.0.dev20220601
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.4 (arm64)
GCC version: Could not collect
Clang version: 12.0.5 (clang-1205.0.22.9)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:01:00)  [Clang 13.0.1 ] (64-bit runtime)
Python platform: macOS-12.4-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
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] numpy==1.23.0rc2
[pip3] torch==1.13.0.dev20220601
[pip3] torchaudio==0.14.0.dev20220601
[pip3] torchvision==0.14.0a0+f9f721d
[conda] numpy                     1.23.0rc2                pypi_0    pypi
[conda] torch                     1.13.0.dev20220601          pypi_0    pypi
[conda] torchaudio                0.14.0.dev20220601          pypi_0    pypi
[conda] torchvision               0.14.0a0+f9f721d          pypi_0    pypi
```

cc @ezyang @seemethere @malfet