multimodallearning/pytorch-mask-rcnn

NMS ERROR

fxt960803 opened this issue · 2 comments

(py36) D:\planercnn_customimages-master\planercnn_customimages-master\nms> python build.py
Including CUDA code.
D:\planercnn_customimages-master\planercnn_customimages-master\nms
generating C:\Users\lixujia\AppData\Local\Temp\tmp1kuy2_7f_nms.c
setting the current directory to 'C:\Users\lixujia\AppData\Local\Temp\tmp1kuy2_7f'
running build_ext
building '_nms' extension
creating Release
creating Release\planercnn_customimages-master
creating Release\planercnn_customimages-master\planercnn_customimages-master
creating Release\planercnn_customimages-master\planercnn_customimages-master\nms
creating Release\planercnn_customimages-master\planercnn_customimages-master\nms\src
E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -ID:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib\inc
lude -ID:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib\include\TH -ID:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib\include\THC -ID:\cuda2/include "-IC:\Progra
m Files\NVIDIA Corporation\NvToolsExt/include" -ID:\anaconda\envs\py36\include -ID:\anaconda\envs\py36\include "-IE:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IE:\Program Fi
les (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" "-IC:\Program Files (x
86)\Windows Kits\10\Include\10.0.10240.0\ucrt" -IE:\VS1\VC\Tools\MSVC\14.14.26428\lib\x86 /Tc_nms.c /Fo.\Release_nms.obj -std=c99
cl: 命令行 warning D9002 :忽略未知选项“-std=c99”
_nms.c
E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -ID:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib\inc
lude -ID:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib\include\TH -ID:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib\include\THC -ID:\cuda2/include "-IC:\Progra
m Files\NVIDIA Corporation\NvToolsExt/include" -ID:\anaconda\envs\py36\include -ID:\anaconda\envs\py36\include "-IE:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IE:\Program Fi
les (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" "-IC:\Program Files (x
86)\Windows Kits\10\Include\10.0.10240.0\ucrt" -IE:\VS1\VC\Tools\MSVC\14.14.26428\lib\x86 /TcD:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms.c /Fo.\Release\planercnn_cu
stomimages-master\planercnn_customimages-master\nms\src\nms.obj -std=c99
cl: 命令行 warning D9002 :忽略未知选项“-std=c99”
nms.c
D:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms.c(11): warning C4244: “初始化”: 从“int64_t”转换到“long”,可能丢失数据
D:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms.c(12): warning C4244: “初始化”: 从“int64_t”转换到“long”,可能丢失数据
D:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms.c(14): warning C4133: “初始化”: 从“int64_t *”到“long *”的类型不兼容
D:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms.c(16): warning C4133: “初始化”: 从“int64_t *”到“long *”的类型不兼容
D:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms.c(65): warning C4133: “初始化”: 从“int64_t *”到“long *”的类型不兼容
E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWITH_CUDA -ID:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib\inc
lude -ID:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib\include\TH -ID:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib\include\THC -ID:\cuda2/include "-IC:\Progra
m Files\NVIDIA Corporation\NvToolsExt/include" -ID:\anaconda\envs\py36\include -ID:\anaconda\envs\py36\include "-IE:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IE:\Program Fi
les (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" "-IC:\Program Files (x
86)\Windows Kits\10\Include\10.0.10240.0\ucrt" -IE:\VS1\VC\Tools\MSVC\14.14.26428\lib\x86 /TcD:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms_cuda.c /Fo.\Release\planerc
nn_customimages-master\planercnn_customimages-master\nms\src\nms_cuda.obj -std=c99
cl: 命令行 warning D9002 :忽略未知选项“-std=c99”
nms_cuda.c
D:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms_cuda.c(22): warning C4244: “初始化”: 从“int64_t”转换到“int”,可能丢失数据
D:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms_cuda.c(23): warning C4244: “初始化”: 从“int64_t”转换到“int”,可能丢失数据
D:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms_cuda.c(43): warning C4133: “初始化”: 从“int64_t *”到“long *”的类型不兼容
D:\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms_cuda.c(60): warning C4133: “初始化”: 从“int64_t *”到“long *”的类型不兼容
E:\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:D:\cuda2/lib/x64 "/LIBPATH:C:\Progra
m Files\NVIDIA Corporation\NvToolsExt/lib/x64" /LIBPATH:D:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi....\lib /LIBPATH:D:\anaconda\envs\py36\libs /LIBPATH:D:\anaconda\envs\py36\PCbui
ld\amd64 "/LIBPATH:E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files
(x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" "/L
IBPATH:C:\Program Files (x86)\Windows Kits\8.1\Lib\winv6.3\um\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86" /LIBPATH:E:\VS1\VC\Tools\MSVC\14.14.26428\lib\x86 /E
XPORT:PyInit__nms .\Release_nms.obj .\Release\planercnn_customimages-master\planercnn_customimages-master\nms\src\nms.obj .\Release\planercnn_customimages-master\planercnn_customimages-master\nm
s\src\nms_cuda.obj D:\planercnn_customimages-master\planercnn_customimages-master\nms\src/cuda/nms_kernel.cu.o /OUT:._nms.pyd /IMPLIB:.\Release_nms.lib
_nms.obj : warning LNK4197: 多次指定导出“PyInit__nms”;使用第一个规范
正在创建库 .\Release_nms.lib 和对象 .\Release_nms.exp
LINK : warning LNK4098: 默认库“LIBCMT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
nms.obj : error LNK2001: 无法解析的外部符号 __imp_THFloatTensor_data
nms.obj : error LNK2001: 无法解析的外部符号 __imp_THByteTensor_fill
nms.obj : error LNK2001: 无法解析的外部符号 __imp_THByteTensor_data
nms.obj : error LNK2001: 无法解析的外部符号 __imp_THByteTensor_free
nms.obj : error LNK2001: 无法解析的外部符号 __imp__THArgCheck
nms.obj : error LNK2001: 无法解析的外部符号 __imp_THByteTensor_newWithSize1d
nms.obj : error LNK2001: 无法解析的外部符号 __imp_THLongTensor_isContiguous
nms.obj : error LNK2001: 无法解析的外部符号 __imp_THLongTensor_data
nms.obj : error LNK2001: 无法解析的外部符号 __imp_THFloatTensor_size
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THLongTensor_free
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THLongTensor_newWithSize2d
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaLongTensor_newWithSize2d
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THLongTensor_copyCuda
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THLongTensor_newWithSize1d
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THLongTensor_fill
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaTensor_data
nms_cuda.obj : error LNK2001: 无法解析的外部符号 state
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaTensor_isContiguous
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaLongTensor_data
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaTensor_size
nms_cuda.obj : error LNK2001: 无法解析的外部符号 __imp_THCudaLongTensor_free
nms_kernel.cu.o : error LNK2001: 无法解析的外部符号 cudaConfigureCall
nms_kernel.cu.o : error LNK2001: 无法解析的外部符号 cudaSetupArgument
nms_kernel.cu.o : error LNK2001: 无法解析的外部符号 cudaLaunch
nms_kernel.cu.o : error LNK2001: 无法解析的外部符号 __cudaRegisterFatBinary
nms_kernel.cu.o : error LNK2001: 无法解析的外部符号 __cudaUnregisterFatBinary
nms_kernel.cu.o : error LNK2001: 无法解析的外部符号 __cudaRegisterFunction
._nms.pyd : fatal error LNK1120: 27 个无法解析的外部命令
Traceback (most recent call last):
File "D:\anaconda\envs\py36\lib\distutils_msvccompiler.py", line 519, in link
self.spawn([self.linker] + ld_args)
File "D:\anaconda\envs\py36\lib\distutils_msvccompiler.py", line 542, in spawn
return super().spawn(cmd)
File "D:\anaconda\envs\py36\lib\distutils\ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "D:\anaconda\envs\py36\lib\distutils\spawn.py", line 38, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "D:\anaconda\envs\py36\lib\distutils\spawn.py", line 81, in _spawn_nt
"command %r failed with exit status %d" % (cmd, rc))
distutils.errors.DistutilsExecError: command 'E:\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 "D:\anaconda\envs\py36\lib\site-packages\cffi\ffiplatform.py", line 51, in _build
dist.run_command('build_ext')
File "D:\anaconda\envs\py36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "D:\anaconda\envs\py36\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
_build_ext.run(self)
File "D:\anaconda\envs\py36\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "D:\anaconda\envs\py36\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "D:\anaconda\envs\py36\lib\site-packages\Cython\Distutils\old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "D:\anaconda\envs\py36\lib\distutils\command\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "D:\anaconda\envs\py36\lib\distutils\command\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "D:\anaconda\envs\py36\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "D:\anaconda\envs\py36\lib\distutils\command\build_ext.py", line 558, in build_extension
target_lang=language)
File "D:\anaconda\envs\py36\lib\distutils\ccompiler.py", line 717, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "D:\anaconda\envs\py36\lib\distutils_msvccompiler.py", line 522, in link
raise LinkError(msg)
distutils.errors.LinkError: command 'E:\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 "build.py", line 34, in
ffi.build()
File "D:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi_init_.py", line 189, in build
build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "D:\anaconda\envs\py36\lib\site-packages\torch\utils\ffi_init
.py", line 111, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "D:\anaconda\envs\py36\lib\site-packages\cffi\api.py", line 697, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "D:\anaconda\envs\py36\lib\site-packages\cffi\recompiler.py", line 1520, in recompile
compiler_verbose, debug)
File "D:\anaconda\envs\py36\lib\site-packages\cffi\ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "D:\anaconda\envs\py36\lib\site-packages\cffi\ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: LinkError: command 'E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1120

i also have the problem and I don't know how to handle it

got the same question