laughtervv / DepthAwareCNN

Depth-aware CNN for RGB-D Segmentation, ECCV 2018
MIT License
304 stars 81 forks source link

VerificationError: CompileError: command 'cl.exe' failed with exit status 2 #11

Open li91yang opened 6 years ago

li91yang commented 6 years ago

When trying to compile C extension in depthconv Folder, I got error( VerificationError: CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2), and tried all the methods mentioned, but all can't fix it. Is there anyone know how to fix it? OS: Windows 10 PyTorch version: 0.4.1 How you installed PyTorch (conda, pip, source): conda Python version: Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:05:27) [MSC v.1900 64 bit (AMD64)] on win32 CUDA/cuDNN version: CUDA-9.0 GPU models and configuration: VS 2015

generating C:\Users\liyang\AppData\Local\Temp\tmp65k1yok8_my_lib.c setting the current directory to 'C:\Users\liyang\AppData\Local\Temp\tmp65k1yok8' running build_ext building '_my_lib' extension creating Release creating Release\models creating Release\models\ops creating Release\models\ops\learn creating Release\models\ops\learn\11 creating Release\models\ops\learn\11\src C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\torch\utils\ffi....\lib\include -IC:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\torch\utils\ffi....\lib\include\TH -IC:\Users\liyang\Anaconda3\pkgs\pytorch-cpu-0.4.1-py35_cpuhe774522_1\Lib\site-packages\torch\lib\include -IC:\Users\liyang\Anaconda3\envs\pytorch41\include -IC:\Users\liyang\Anaconda3\envs\pytorch41\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tc_my_lib.c /Fo.\Release_my_lib.obj -std=c99 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\torch\utils\ffi....\lib\include -IC:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\torch\utils\ffi....\lib\include\TH -IC:\Users\liyang\Anaconda3\pkgs\pytorch-cpu-0.4.1-py35_cpuhe774522_1\Lib\site-packages\torch\lib\include -IC:\Users\liyang\Anaconda3\envs\pytorch41\include -IC:\Users\liyang\Anaconda3\envs\pytorch41\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /TpI:\D435\DepthCNN\models\ops\learn\11\src\my_lib.cpp /Fo.\Release\D435\DepthCNN\models\ops\learn\11\src\my_lib.obj -std=c99 Traceback (most recent call last):

File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 668, in runfile execfile(filename, namespace)

File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "I:/models/ops/learn/11/build.py", line 38, in ffi.build()

File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\torch\utils\ffi__init__.py", line 189, in build _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)

File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\torch\utils\ffi__init__.py", line 111, in _build_extension outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)

File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\cffi\api.py", line 697, in compile compiler_verbose=verbose, debug=debug, **kwds)

File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\cffi\recompiler.py", line 1520, in recompile compiler_verbose, debug)

File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\cffi\ffiplatform.py", line 22, in compile outputfilename = _build(tmpdir, ext, compiler_verbose, debug)

File "C:\Users\liyang\Anaconda3\envs\pytorch41\lib\site-packages\cffi\ffiplatform.py", line 58, in _build raise VerificationError('%s: %s' % (e.class.name, e))

VerificationError: CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2

smmdream commented 6 years ago

You might use pytorch 0.4.0 to compile depthconv and depthpool

li91yang commented 6 years ago

Thank you for your reply. I tried pytorch 0.4.0 just now, but same error appeared again. @smmdream

anheidelonghu commented 6 years ago

@li91yang this problem may be solved by add $vs_root/VC/bin to system environment, but after this is solved, more error will occur. in windows.

li91yang commented 6 years ago

@anheidelonghu Thank you for your reply. so, Is it mean it can't used on windows?

anheidelonghu commented 6 years ago

@li91yang You can use the code on windows after you solve a serial of problems.