multimodallearning/pytorch-mask-rcnn

error: run "python build.py" in “nms”

LuisStruggle opened this issue · 2 comments

`C:\Users\dell\Anaconda3\python.exe C:/Users/dell/Desktop/Mask-RCNN-master/Mask-RCNN-master/nms/build.py
Including CUDA code.
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms
generating C:\Users\dell\AppData\Local\Temp\tmp29alsaqj_nms.c
setting the current directory to 'C:\Users\dell\AppData\Local\Temp\tmp29alsaqj'
running build_ext
building '_nms' extension
creating Release
creating Release\Users
creating Release\Users\dell
creating Release\Users\dell\Desktop
creating Release\Users\dell\Desktop\Mask-RCNN-master
creating Release\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master
creating Release\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms
creating Release\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -IC:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib\include -IC:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib\include\TH -IC:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0/include" -IC:\Users\dell\Anaconda3\include -IC:\Users\dell\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /Tc_nms.c /Fo.\Release_nms.obj
_nms.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -IC:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib\include -IC:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib\include\TH -IC:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0/include" -IC:\Users\dell\Anaconda3\include -IC:\Users\dell\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /TcC:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.c /Fo.\Release\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.obj
nms.c
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.c(7): warning C4133: 'function': incompatible types - from 'THFloatTensor *' to 'const THLongTensor *'
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.c(9): warning C4133: 'function': incompatible types - from 'THFloatTensor *' to 'const THLongTensor *'
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.c(11): warning C4244: 'initializing': conversion from 'int64_t' to 'long', possible loss of data
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.c(12): warning C4244: 'initializing': conversion from 'int64_t' to 'long', possible loss of data
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.c(14): warning C4133: 'initializing': incompatible types - from 'int64_t *' to 'long *'
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.c(16): warning C4133: 'initializing': incompatible types - from 'int64_t *' to 'long *'
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.c(65): warning C4133: 'initializing': incompatible types - from 'int64_t *' to 'long *'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -IC:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib\include -IC:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib\include\TH -IC:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0/include" -IC:\Users\dell\Anaconda3\include -IC:\Users\dell\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /TcC:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms_cuda.c /Fo.\Release\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms_cuda.obj
nms_cuda.c
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms_cuda.c(22): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms_cuda.c(23): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible loss of data
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms_cuda.c(43): warning C4133: 'initializing': incompatible types - from 'int64_t *' to 'long *'
C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms_cuda.c(60): warning C4133: 'initializing': incompatible types - from 'int64_t *' to 'long *'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0/lib/x64" /LIBPATH:C:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi....\lib /LIBPATH:C:\Users\dell\Anaconda3\libs /LIBPATH:C:\Users\dell\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\um\x64" /EXPORT:PyInit__nms .\Release_nms.obj .\Release\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms.obj .\Release\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src\nms_cuda.obj C:\Users\dell\Desktop\Mask-RCNN-master\Mask-RCNN-master\nms\src/cuda/nms_kernel.cu.o /OUT:._nms.pyd /IMPLIB:.\Release_nms.lib
_nms.obj : warning LNK4197: export 'PyInit__nms' specified multiple times; using first specification
Creating library .\Release_nms.lib and object .\Release_nms.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
nms.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_data
nms.obj : error LNK2001: unresolved external symbol __imp_THByteTensor_fill
nms.obj : error LNK2001: unresolved external symbol __imp_THByteTensor_data
nms.obj : error LNK2001: unresolved external symbol __imp_THByteTensor_free
nms.obj : error LNK2001: unresolved external symbol __imp__THArgCheck
nms.obj : error LNK2001: unresolved external symbol __imp_THByteTensor_newWithSize1d
nms.obj : error LNK2001: unresolved external symbol __imp_THLongTensor_isContiguous
nms.obj : error LNK2001: unresolved external symbol __imp_THLongTensor_data
nms.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_size
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THLongTensor_free
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THLongTensor_newWithSize2d
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THCudaLongTensor_newWithSize2d
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THLongTensor_copyCuda
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THLongTensor_newWithSize1d
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THLongTensor_fill
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THCudaTensor_data
nms_cuda.obj : error LNK2001: unresolved external symbol state
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THCudaTensor_isContiguous
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THCudaLongTensor_data
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THCudaTensor_size
nms_cuda.obj : error LNK2001: unresolved external symbol __imp_THCudaLongTensor_free
nms_kernel.cu.o : error LNK2001: unresolved external symbol cudaConfigureCall
nms_kernel.cu.o : error LNK2001: unresolved external symbol cudaSetupArgument
nms_kernel.cu.o : error LNK2001: unresolved external symbol cudaLaunch
nms_kernel.cu.o : error LNK2001: unresolved external symbol __cudaRegisterFatBinary
nms_kernel.cu.o : error LNK2001: unresolved external symbol __cudaUnregisterFatBinary
nms_kernel.cu.o : error LNK2001: unresolved external symbol __cudaRegisterFunction
._nms.pyd : fatal error LNK1120: 27 unresolved externals
Traceback (most recent call last):
File "C:\Users\dell\Anaconda3\lib\distutils_msvccompiler.py", line 519, in link
self.spawn([self.linker] + ld_args)
File "C:\Users\dell\Anaconda3\lib\distutils_msvccompiler.py", line 542, in spawn
return super().spawn(cmd)
File "C:\Users\dell\Anaconda3\lib\distutils\ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "C:\Users\dell\Anaconda3\lib\distutils\spawn.py", line 38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "C:\Users\dell\Anaconda3\lib\distutils\spawn.py", line 81, in _spawn_nt
"command %r failed with exit status %d" % (cmd, rc))
distutils.errors.DistutilsExecError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\dell\Anaconda3\lib\site-packages\cffi\ffiplatform.py", line 51, in _build
dist.run_command('build_ext')
File "C:\Users\dell\Anaconda3\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\dell\Anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 75, in run
_build_ext.run(self)
File "C:\Users\dell\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "C:\Users\dell\Anaconda3\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Users\dell\Anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 194, in build_extensions
self.build_extension(ext)
File "C:\Users\dell\Anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Users\dell\Anaconda3\lib\distutils\command\build_ext.py", line 558, in build_extension
target_lang=language)
File "C:\Users\dell\Anaconda3\lib\distutils\ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "C:\Users\dell\Anaconda3\lib\distutils_msvccompiler.py", line 522, in link
raise LinkError(msg)
distutils.errors.LinkError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/dell/Desktop/Mask-RCNN-master/Mask-RCNN-master/nms/build.py", line 34, in
ffi.build()
File "C:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi_init_.py", line 184, in build
build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "C:\Users\dell\Anaconda3\lib\site-packages\torch\utils\ffi_init
.py", line 108, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "C:\Users\dell\Anaconda3\lib\site-packages\cffi\api.py", line 690, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "C:\Users\dell\Anaconda3\lib\site-packages\cffi\recompiler.py", line 1515, in recompile
compiler_verbose, debug)
File "C:\Users\dell\Anaconda3\lib\site-packages\cffi\ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "C:\Users\dell\Anaconda3\lib\site-packages\cffi\ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: LinkError: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120

Process finished with exit code 1
`

Help me look at this problem. Thank you!

I met same problem after trying torch0.4.0,have you solved this probiem? could someone give me some help