warp-ctc icon indicating copy to clipboard operation
warp-ctc copied to clipboard

Cmake error with windows 10, VS 2017

Open tvnhan opened this issue 5 years ago • 14 comments

Hi there, I try to build on window 10, but I got the error: -- Building shared library with GPU support CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: CUDA_curand_LIBRARY (ADVANCED) linked by target "test_gpu" in directory C:/Users/ABC/warp-ctc

The detail as bellow: $ cmake ..
-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.18204.
-- The C compiler identification is MSVC 19.15.26729.0
-- The CXX compiler identification is MSVC 19.15.26729.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2 (found suitable version "9.2", minimum required is "6.5")
-- cuda found TRUE
-- Building shared library with GPU support
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_curand_LIBRARY (ADVANCED)
linked by target "test_gpu" in directory C:/Users/ABC/warp-ctc

-- Configuring incomplete, errors occurred!
See also "C:/Users/ABC/warp-ctc/build/CMakeFiles/CMakeOutput.log".

tvnhan avatar Sep 20 '18 04:09 tvnhan

我也是win10 +cuda9.2+vs2017 。cmake 我是正常的,只是vs2017编译的时候,通过vs2017编译成功了3个文件,warpctc.dll,warpctc.exp,warpctc.lib,生成项目“test_gpu.vcxproj”的操作 - 失败。生成项目“test_cpu.vcxproj”的操作 - 失败。

然后我把编译成功了3个文件,warpctc.dll,warpctc.exp,warpctc.lib全部复制到C:\ Users \ WWWW \ warp-ctc \ build目录下,运行C:\ Users \ WWWW \ warp-ctc \ pytorch_binding> python setup.py安装

不知道您搞定了没有?请加QQ2737499951 沟通交流一下,谢谢

QQ2737499951 avatar Sep 23 '18 10:09 QQ2737499951

@tvnhan make sure you've added set(BUILD_USE_64BITS on) in your warp-ctc/CMakeLists.txt.

Don't forget to clear the build directory before running cmake .. to re-configure

Hope it can help

AssKicker0214 avatar Nov 13 '18 12:11 AssKicker0214

This version of code can't generate correct warpctc.dll in windows, miss some export functions. I have resolve the errors, and code commit to https://github.com/amberblade/warp-ctc/

amberblade avatar Nov 23 '18 10:11 amberblade

Hi,

I tried to install warp_ctc on windows 10 CPU from https://github.com/amberblade/warp-ctc/ as @amberblade mentioned.

But python setup.py install needs caffe2_gpu.lib : here is the error LINK : warning LNK4044: unrecognized option '/Wl,-rpath,D:\Paul\libs_sources\warpCTC\warp_ctc_amberblade\build\release'; ignored LINK : fatal error LNK1181: cannot open input file 'caffe2_gpu.lib'

I don't have GPU so no caffe2_gpu.lib

Can you please change the setup process for CPU only ?

Thanks.

kvcuong avatar Dec 13 '18 16:12 kvcuong

Add this line in CMakeLists.txt: set(CUDA_curand_LIBRARY "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2/lib/x64/curand.lib")

akshay-verma avatar Mar 31 '19 23:03 akshay-verma

CMakeLists.txt中添加此行: set(CUDA_curand_LIBRARY“C:/ Program Files / NVIDIA GPU Computing Toolkit / CUDA / v9.2 / lib / x64 / curand.lib”)

您已经在win10 编译安装成功了吗?

QQ2737499951 avatar Apr 07 '19 04:04 QQ2737499951

I found this problem in ubuntu16.04 too, help

Uncle-Justice avatar Oct 11 '19 13:10 Uncle-Justice

缺少某些导出功能,此版本的代码无法在Windows中生成正确的warpctc.dll。我已经解决了错误,并将代码提交到https://github.com/amberblade/warp-ctc/

HI, I used your method, but the libwarpctc.so file was not generated after the build, Can you tell me why this not generated and help me solve this problem, Thank you very much

ICT-XY avatar Mar 05 '20 19:03 ICT-XY

缺少某些导出功能,此版本的代码无法在Windows中生成正确的warpctc.dll。我已经解决了错误,并将代码提交到https://github.com/amberblade/warp-ctc/

HI, I used your method, but the libwarpctc.so file was not generated after the build, Can you tell me why this not generated and help me solve this problem, Thank you very much

Could you please show me your output?

amberblade avatar Mar 06 '20 04:03 amberblade

CMakeLists.txt中添加此行: set(CUDA_curand_LIBRARY“C:/ Program Files / NVIDIA GPU Computing Toolkit / CUDA / v9.2 / lib / x64 / curand.lib”)

您已经在win10 编译安装成功了吗?

我也遇到了同样的问题,按照你的说法在在CMakeLists.txt中添加此行: set(CUDA_curand_LIBRARY“C:/ Program Files / NVIDIA GPU Computing Toolkit / CUDA / v9.2 / lib / x64 / curand.lib”) 当然路径是按照我电脑上的路径修改了,因为我电脑上安装的cuda是10.2的版本,所以路径不一样。 仍然报错:LINK : fatal error LNK1181: 无法打开输入文件“caffe2_gpu.lib”。 后来我发现setup.py文件中libraries中包含caffe2_gpu,我将caffe2_gpu替换成curand,报错:找不到curand.lib,发现library_dirs中没有cuda的安装路径,我只能把curand.lib复制到python的lib路径下,接着报错找不到caffe2.lib,因为setup.py文件中libraries中包含caffe2,咋办呢?caffe2_gpu用curand替代,caffe2用啥替代呢?

gengchaole avatar Apr 03 '22 03:04 gengchaole

这是来自AAAAAAAAAAAAAA  

QQ2737499951 avatar Apr 03 '22 03:04 QQ2737499951

CMakeLists.txt中添加此行: set(CUDA_curand_LIBRARY“C:/ Program Files / NVIDIA GPU Computing Toolkit / CUDA / v9.2 / lib / x64 / curand.lib”)

您已经在win10 编译安装成功了吗?

我也遇到了同样的问题,按照你的说法在在CMakeLists.txt中添加此行: set(CUDA_curand_LIBRARY“C:/ Program Files / NVIDIA GPU Computing Toolkit / CUDA / v9.2 / lib / x64 / curand.lib”) 当然路径是按照我电脑上的路径修改了,因为我电脑上安装的cuda是10.2的版本,所以路径不一样。 仍然报错:LINK : fatal error LNK1181: 无法打开输入文件“caffe2_gpu.lib”。 后来我发现setup.py文件中libraries中包含caffe2_gpu,我将caffe2_gpu替换成curand,报错:找不到curand.lib,发现library_dirs中没有cuda的安装路径,我只能把curand.lib复制到python的lib路径下,接着报错找不到caffe2.lib,因为setup.py文件中libraries中包含caffe2,咋办呢?caffe2_gpu用curand替代,caffe2用啥替代呢?

我理解报错找不到caffe2.lib,可能是以为我没有安装caffe2,我就安装caffe2. pip install caffe2, 报错:ModuleNotFoundError: No module named 'tools.setup_helpers' 先报错找不到tools,tools安装成功了,疯了,不知道咋整了。

gengchaole avatar Apr 03 '22 03:04 gengchaole

CMakeLists.txt中添加此行: set(CUDA_curand_LIBRARY“C:/ Program Files / NVIDIA GPU Computing Toolkit / CUDA / v9.2 / lib / x64 / curand.lib”)

您已经在win10 编译安装成功了吗?

我也遇到了同样的问题,按照你的说法在在CMakeLists.txt中添加此行: set(CUDA_curand_LIBRARY“C:/ Program Files / NVIDIA GPU Computing Toolkit / CUDA / v9.2 / lib / x64 / curand.lib”) 当然路径是按照我电脑上的路径修改了,因为我电脑上安装的cuda是10.2的版本,所以路径不一样。 仍然报错:LINK : fatal error LNK1181: 无法打开输入文件“caffe2_gpu.lib”。 后来我发现setup.py文件中libraries中包含caffe2_gpu,我将caffe2_gpu替换成curand,报错:找不到curand.lib,发现library_dirs中没有cuda的安装路径,我只能把curand.lib复制到python的lib路径下,接着报错找不到caffe2.lib,因为setup.py文件中libraries中包含caffe2,咋办呢?caffe2_gpu用curand替代,caffe2用啥替代呢?

我理解报错找不到caffe2.lib,可能是以为我没有安装caffe2,我就安装caffe2. pip install caffe2, 报错:ModuleNotFoundError: No module named 'tools.setup_helpers' 先报错找不到tools,tools安装成功了,疯了,不知道咋整了。

我看到setup.py的ext_modules中libraries=['warpctc', 'curand', '_c', 'caffe2'],下面是libraries=['warpctc'],被注释了,我把上面的的注释掉,把libraries=['warpctc']打开,再编译,又报错: LINK : fatal error LNK1181: 无法打开输入文件“C:\warp-ctc\pytorch_binding\build\temp.win-amd64-3.6\Release\src\binding.obj” C:\warp-ctc\pytorch_binding\build\temp.win-amd64-3.6\Release\src文件夹啥也没有,不懂了,有大神帮我解决一下吗?

gengchaole avatar Apr 04 '22 02:04 gengchaole

Add this line in CMakeLists.txt: set(CUDA_curand_LIBRARY "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2/lib/x64/curand.lib")

I use your method, but the error is the same: link: fatal error lnk1181: cannot open input file 'caffe2_ gpu. lib'.

I found in 'setup.py' file Libraries = ['warpctc ']' is commented out under libraries = ['caffe2_gpu ',' curand ',' u c ',' caffe2 '].

I open the comments of libraries = ['warpctc '], comment out libraries = ['caffe2_gpu', 'curand', 'u c', 'caffe2'], and execute Python setup py install

Error: unable to open the input file "C: \ warp CTC \ pytorch_binding \ build \ temp. Win-amd64-3.6 \ release \ SRC \ binding. Obj". I found that there is nothing in C: \ warp CTC \ pytorch_binding \ build \ temp. Win-amd64-3.6 \ release \ SRC folder, please help!

gengchaole avatar Apr 05 '22 00:04 gengchaole