Repository: pytorch
Issue: Compilation instructions are not exhaustive: <<parameter packs not expanded with ‘...’>> on Fedora 35/CUDA 11.6
Labels: module: build,triaged

### 🐛 Describe the bug

## Problem description
Compilation of PyTorch from source on Fedora 35 (with CUDA 11.6 support) results in following error: 
```
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                 
```
The same happens, when compiling any CUDA extension on precompiled PyTorch, as installed from Anaconda pytorch channel.

## Steps to reproduce
1. Clone this repo.
2. Create conda environment, using following environment file:
```
name: pytorch_build
channels:
- pytorch
- defaults
dependencies:
- python=3.7
- astunparse
- cffi
- dataclasses
- future
- magma-cuda115
- mkl
- mkl-include
- numpy
- pyyaml
- requests
- setuptools
- six
- typing_extensions
```
3. Activate conda environment and trigger build with
```
python setup.py build
```


Has anyone compiled PyTorch on current Fedora?

### Versions

PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Fedora Linux 35 (Workstation Edition) (x86_64)
GCC version: (GCC) 11.2.1 20211203 (Red Hat 11.2.1-7)
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.17

Python version: 3.7.11 (default, Jul 27 2021, 14:32:16)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.15.14-200.fc35.x86_64-x86_64-with-fedora-35-Thirty_Five
Is CUDA available: N/A
CUDA runtime version: 11.6.55
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 2060
Nvidia driver version: 510.39.01
cuDNN version: Probably one of the following:
/usr/lib64/libcudnn.so.8.3.2
/usr/lib64/libcudnn_adv_infer.so.8.3.2
/usr/lib64/libcudnn_adv_train.so.8.3.2
/usr/lib64/libcudnn_cnn_infer.so.8.3.2
/usr/lib64/libcudnn_cnn_train.so.8.3.2
/usr/lib64/libcudnn_ops_infer.so.8.3.2
/usr/lib64/libcudnn_ops_train.so.8.3.2
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.21.2
[conda] blas                      1.0                         mkl  
[conda] magma-cuda115             2.5.2                         1    pytorch
[conda] mkl                       2021.4.0           h06a4308_640  
[conda] mkl-include               2021.4.0           h06a4308_640  
[conda] mkl-service               2.4.0            py37h7f8727e_0  
[conda] mkl_fft                   1.3.1            py37hd3c417c_0  
[conda] mkl_random                1.2.2            py37h51133e4_0  
[conda] numpy                     1.21.2           py37h20f2e39_0  
[conda] numpy-base                1.21.2           py37h79a1101_0


cc @malfet @seemethere