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

Installaition question“/home/geff/kaldi-ctc-master/tools/warp-ctc/src/ctc_entrypoint.cu(1): error: this declaration has no storage class or type specifier”

Open gyingqiang opened this issue 8 years ago • 17 comments

Hello,when i install warp-ctc ,i get this question: [ 14%] Building NVCC (Device) object CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o /home/geff/kaldi-ctc-master/tools/warp-ctc/src/ctc_entrypoint.cu(1): error: this declaration has no storage class or type specifier

/home/geff/kaldi-ctc-master/tools/warp-ctc/src/ctc_entrypoint.cu(1): error: expected a ";"

2 errors detected in the compilation of "/tmp/tmpxft_00001c98_00000000-16_ctc_entrypoint.compute_52.cpp1.ii". CMake Error at warpctc_generated_ctc_entrypoint.cu.o.cmake:266 (message): Error generating file /home/geff/kaldi-ctc-master/tools/warp-ctc/build/CMakeFiles/warpctc.dir/src/./warpctc_generated_ctc_entrypoint.cu.o

CMakeFiles/warpctc.dir/build.make:187: recipe for target 'CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o' failed make[2]: *** [CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o] Error 1 CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/warpctc.dir/all' failed make[1]: *** [CMakeFiles/warpctc.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

anyone has encountered such problem? Can you give me some advices on this ?Any help would be appreciated .thanks

gyingqiang avatar Oct 26 '16 06:10 gyingqiang

Can you give more details such as which OS you are on (i.e. Ubuntu version, etc.) and which CUDA version you are using? Have you modified the source in any way or is this a clean checkout?

jaredcasper avatar Oct 31 '16 22:10 jaredcasper

Thank you for your reply, the error has been resolved, it seems that I did not install torch. After the installation,the error does not reappear.

gyingqiang avatar Nov 01 '16 03:11 gyingqiang

I get a similar error (see below). I'm running CentOS 7, CUDA 7.5. Any solution that doesn't involve installing Torch? I'm attempting to use with TensorFlow, so I'd rather not go through the Torch hoops if I don't have to.

make [ 14%] Building NVCC (Device) object CMakeFiles/warpctc.dir/src/warpctc_generated_reduce.cu.o [ 28%] Building NVCC (Device) object CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o /home/jrein/warp-ctc/src/ctc_entrypoint.cu(1): error: this declaration has no storage class or type specifier

/home/jrein/warp-ctc/src/ctc_entrypoint.cu(1): error: expected a ";"

2 errors detected in the compilation of "/tmp/tmpxft_00004086_00000000-16_ctc_entrypoint.compute_52.cpp1.ii". CMake Error at warpctc_generated_ctc_entrypoint.cu.o.cmake:282 (message): Error generating file /home/jrein/warp-ctc/build/CMakeFiles/warpctc.dir/src/./warpctc_generated_ctc_entrypoint.cu.o

make[2]: *** [CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o] Error 1 make[1]: *** [CMakeFiles/warpctc.dir/all] Error 2 make: *** [all] Error 2

jonrein avatar Nov 22 '16 16:11 jonrein

Can you post the nvcc command line that it is using the try to compile ctc_entrypoint.cu (you can get it show you using make VERBOSE=1. Just wondering if cmake is throwing something weird in there since I haven't been able to reproduce this.

Are you using gcc 4.8.2 and glibc 2.17?

jaredcasper avatar Nov 22 '16 19:11 jaredcasper

nvcc command line is below. Note that it's a non-standard CUDA_BIN_PATH, if that's relevant. gcc version 6.1.0 glibc version 2.17

/cm/shared/apps/cuda75/toolkit/7.5.18/bin/nvcc /home/jrein/warp-ctc/src/ctc_entrypoint.cu -c -o /home/jrein/warp-ctc/build/CMakeFiles/warpctc.dir/src/./warpctc_generated_ctc_entrypoint.cu.o -ccbin /usr/bin/cc -m64 -Dwarpctc_EXPORTS -Xcompiler ,"-fopenmp","-O2","-fPIC","-g" -gencode arch=compute_30,code=sm_30 -O2 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 --std=c++11 -Xcompiler -fopenmp -DNVCC -I/cm/shared/apps/cuda75/toolkit/7.5.18/include -I/home/jrein/warp-ctc/include

jonrein avatar Nov 22 '16 20:11 jonrein

I suspect the problem comes from using gcc 6.1 which is not supported by cuda. For cuda 7.5 on CentOS 7.x, only gcc 4.8.2 is supported. I don't think gcc 6 is supported by any cuda version on any platforms yet.

jaredcasper avatar Nov 22 '16 21:11 jaredcasper

I get the same error building with gcc 4.8.5, which is what my HPC's cuda was built with. I suppose 4.8.5 > 4.8.2, but the cuda test scripts and TensorFlow seem to be running fine, so I'm not sure that a cuda compilation error is the issue.

jonrein avatar Nov 23 '16 16:11 jonrein

Update: I ended up installing Torch in the hopes that the original poster's fix would work, but no luck; same error.

jonrein avatar Nov 28 '16 20:11 jonrein

I experienced this same issue and fixed it. The problem is that the ctc_entrypoint.cu file needs to be a symlink. So, go to src dir and run:

rm ctc_entrypoint.cu ln -s ctc_entrypoint.cpp ctc_entrypoint.cu

Then run make.

rachelmint avatar Nov 14 '17 16:11 rachelmint

@rachelmint I have the same problem, and I tried your method, but it didn't work. Here is the Error message:

make -- cuda found TRUE -- Building shared library with GPU support -- Configuring done -- Generating done -- Build files have been written to: /warp-ctc-pytorch_bindings/build [ 16%] Building NVCC (Device) object CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o

nvcc error : 'cicc' died due to signal 11 (Invalid memory reference) nvcc error : 'cicc' core dumped CMake Error at warpctc_generated_ctc_entrypoint.cu.o.cmake:264 (message): Error generating file /warp-ctc-pytorch_bindings/build/CMakeFiles/warpctc.dir/src/./warpctc_generated_ctc_entrypoint.cu.o

make[2]: *** [CMakeFiles/warpctc.dir/src/warpctc_generated_ctc_entrypoint.cu.o] Error 1 make[1]: *** [CMakeFiles/warpctc.dir/all] Error 2

jmluu avatar Jul 31 '18 10:07 jmluu

I experienced this same issue and fixed it. The problem is that the ctc_entrypoint.cu file needs to be a symlink. So, go to src dir and run:

rm ctc_entrypoint.cu ln -s ctc_entrypoint.cpp ctc_entrypoint.cu

Then run make.

that work,thanks

sangenan avatar Mar 09 '19 06:03 sangenan

ctc_entrypoint

thanks a lot

Pythonisfun avatar Mar 12 '19 12:03 Pythonisfun

I experienced this same issue and fixed it. The problem is that the ctc_entrypoint.cu file needs to be a symlink. So, go to src dir and run:

rm ctc_entrypoint.cu ln -s ctc_entrypoint.cpp ctc_entrypoint.cu

Then run make.

@sangenan @jjz-learning Thank you very much. this solution works. Sorry, I mistaked the src dir befor.

yjiangling avatar Dec 19 '19 09:12 yjiangling

i run this instruction 'ln -s ctc_entrypoint.cpp ctc_entrypoint.cu' but i got this error image can you help me please

chafikblm avatar Apr 02 '20 19:04 chafikblm

Same issue as @chafikblm

yash-bhat avatar May 24 '20 23:05 yash-bhat

@yash-bhat for me, I solved it my problem was in the directory which the file called "ctc_entrypoint.cu" and "ctc_entrypoint.cpp" exist, I had whitespace

the character " " in the directory so, make sure you don't have whitespace character " " in both of the directories of file "ctc_entrypoint.cu" and "ctc_entrypoint.cpp" like that: path1/to/ctc_entrypoint.cu# without whitespace character " " path2/to/ctc_entrypoint.cpp # without whitespace character " "

then you can run :

ln -s ctc_entrypoint.cpp ctc_entrypoint.cu

Will work.

chafikblm avatar May 28 '20 16:05 chafikblm

我通过以下方法解决了问题: 如果要使用最新的pytorch 1.8,请安装cuda 10.2而不是cuda11。如果确实使用cuda 11,则需要注释掉CMakeList.txt文件中的第35-38行,也就是这些代码# set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_30,code=sm_30 -O2") # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_35,code=sm_35") # set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -gencode arch=compute_50,code=sm_50")

jkfaner avatar May 16 '21 09:05 jkfaner