Repository: pytorch
Issue: Compilation from source fails (PYTORCH 1.13.1)
Labels: module: build,triaged

### 🐛 Describe the bug

When compiling using the "python setup.py develop" command I get the following error(s):

(torch_compilation) C:\mmm_libs\pytorch>python setup.py develop
Building wheel torch-1.13.0a0+git49444c3
-- Building version 1.13.0a0+git49444c3
cmake --build . --target install --config Release
[2/178] Building CXX object functorch\CMakeFiles\functorch.dir\csrc\dim\dim.cpp.obj
FAILED: functorch/CMakeFiles/functorch.dir/csrc/dim/dim.cpp.obj
C:\PROGRA~1\MICROS~4\2022\COMMUN~1\VC\Tools\MSVC\1439~1.335\bin\Hostx64\x64\cl.exe  /nologo /TP -DFUNCTORCH_BUILD_MAIN_LIB -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -DUSE_C10D_GLOO -DUSE_DISTRIBUTED -DUSE_EXTERNAL_MZCRC -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE=1 -Dfunctorch_EXPORTS -IC:\mmm_libs\pytorch\build\aten\src -IC:\mmm_libs\pytorch\aten\src -IC:\mmm_libs\pytorch\build -IC:\mmm_libs\pytorch -IC:\mmm_libs\pytorch\cmake\..\third_party\benchmark\include -IC:\mmm_libs\pytorch\third_party\onnx -IC:\mmm_libs\pytorch\build\third_party\onnx -IC:\mmm_libs\pytorch\third_party\foxi -IC:\mmm_libs\pytorch\build\third_party\foxi -IC:\mmm_libs\pytorch\functorch -IC:\mmm_libs\pytorch\torch\csrc\api -IC:\mmm_libs\pytorch\torch\csrc\api\include -IC:\mmm_libs\pytorch\c10\.. -IC:\mmm_libs\pytorch\torch\.. -IC:\mmm_libs\pytorch\torch\..\aten\src -IC:\mmm_libs\pytorch\torch\..\aten\src\TH -IC:\mmm_libs\pytorch\build\caffe2\aten\src -IC:\mmm_libs\pytorch\build\third_party -IC:\mmm_libs\pytorch\torch\..\third_party\valgrind-headers -IC:\mmm_libs\pytorch\torch\..\third_party\gloo -IC:\mmm_libs\pytorch\torch\..\third_party\onnx -IC:\mmm_libs\pytorch\torch\..\third_party\flatbuffers\include -IC:\mmm_libs\pytorch\torch\..\third_party\kineto\libkineto\include -IC:\mmm_libs\pytorch\torch\csrc -IC:\mmm_libs\pytorch\torch\lib -IC:\mmm_libs\pytorch\torch\lib\libshm_windows -external:IC:\mmm_libs\pytorch\build\third_party\gloo -external:IC:\mmm_libs\pytorch\cmake\..\third_party\gloo -external:IC:\mmm_libs\pytorch\cmake\..\third_party\googletest\googlemock\include -external:IC:\mmm_libs\pytorch\cmake\..\third_party\googletest\googletest\include -external:IC:\mmm_libs\pytorch\third_party\protobuf\src -external:IC:\mmm_libs\pytorch\third_party\XNNPACK\include -external:IC:\mmm_libs\pytorch\third_party\ittapi\include -external:IC:\mmm_libs\pytorch\cmake\..\third_party\eigen -external:IC:\mmm_libs\pytorch\third_party\ideep\mkl-dnn\third_party\oneDNN\include -external:IC:\mmm_libs\pytorch\third_party\ideep\include -external:IC:\Users\rizzo\miniconda3\envs\torch_compilation\include -external:IC:\mmm_libs\pytorch\cmake\..\third_party\pybind11\include -external:W0 /DWIN32 /D_WINDOWS /GR /EHsc /w /bigobj -DUSE_PTHREADPOOL -openmp:experimental -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO /MD /O2 /Ob2 /DNDEBUG /w /bigobj -DNDEBUG -std:c++14 -DCAFFE2_USE_GLOO -DTH_HAVE_THREAD /EHsc /DNOMINMAX /wd4267 /wd4251 /wd4522 /wd4838 /wd4305 /wd4244 /wd4190 /wd4101 /wd4996 /wd4275 /bigobj /showIncludes /Fofunctorch\CMakeFiles\functorch.dir\csrc\dim\dim.cpp.obj /Fdfunctorch\CMakeFiles\functorch.dir\ /FS -c C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(836): error C2440: 'initializing': cannot convert from 'const char [4]' to 'int'
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(836): note: There is no context in which this conversion is possible
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(836): error C2440: 'initializing': cannot convert from 'const char *const [4]' to 'const char *'
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(836): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(1018): error C2440: 'initializing': cannot convert from 'const char [2]' to 'int'
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(1018): note: There is no context in which this conversion is possible
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(1018): error C2440: 'initializing': cannot convert from 'const char *const [2]' to 'const char *'
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(1018): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(1049): error C2440: 'initializing': cannot convert from 'const char [2]' to 'int'
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(1049): note: There is no context in which this conversion is possible
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(1049): error C2440: 'initializing': cannot convert from 'const char *const [2]' to 'const char *'
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(1049): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(3013): error C2440: 'initializing': cannot convert from 'const char [8]' to 'int'
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(3013): note: There is no context in which this conversion is possible
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(3013): error C2440: 'initializing': cannot convert from 'const char *const [7]' to 'const char *'
C:\mmm_libs\pytorch\functorch\csrc\dim\dim.cpp(3013): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or parenthesized function-style cast

### 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: Microsoft Windows 11 Home
GCC version: (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r5) 13.2.0
Clang version: 17.0.6
CMake version: version 3.26.4
Libc version: N/A

Python version: 3.12.3 | packaged by Anaconda, Inc. | (main, May  6 2024, 19:42:21) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-11-10.0.22631-SP0
Is CUDA available: N/A
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

Versions of relevant libraries:
[pip3] numpy==1.26.4
[conda] blas                      1.0                         mkl
[conda] mkl                       2023.1.0         h6b88ed4_46358
[conda] mkl-include               2023.1.0         haa95532_46358
[conda] mkl-service               2.4.0           py312h2bbff1b_1
[conda] mkl_fft                   1.3.8           py312h2bbff1b_0
[conda] mkl_random                1.2.4           py312h59b6b97_0
[conda] numpy                     1.26.4          py312hfd52020_0
[conda] numpy-base                1.26.4          py312h4dde369_0

cc @malfet @seemethere