SeanNaren / warp-ctc

Pytorch Bindings for warp-ctc
Apache License 2.0
757 stars 271 forks source link

make step error #143

Open scaler2017 opened 5 years ago

scaler2017 commented 5 years ago

cmake之后使用make命令后报错:报错如下: /home/powerop/work/hd/warp-ctc-pytorch_bindings/src/ctc_entrypoint.cu(1): error: this declaration has no storage class or type specifier

/home/powerop/work/hd/warp-ctc-pytorch_bindings/src/ctc_entrypoint.cu(1): error: expected a ";"

2 errors detected in the compilation of "/tmp/tmpxft_0000184a_00000000-13_ctc_entrypoint.compute_70.cpp1.ii". CMake Error at warpctc_generated_ctc_entrypoint.cu.o.cmake:266 (message): Error generating file /home/powerop/work/hd/warp-ctc-pytorch_bindings/build/CMakeFiles/warpctc.dir/src/./warpctc_generated_ctc_entrypoint.cu.o

CMakeFiles/warpctc.dir/build.make:63: 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

879255897 commented 5 years ago

我遇到了跟您同样的问题,请问您这个问题是怎么解决的呢?感谢!

xieziyan commented 4 years ago

同问,我用的ubuntu 16.04 gtx1660 cuda10.2 pytorch 1.3.1

yjiangling commented 4 years ago

遇到相同的问题,有解决方案吗?要崩溃了,前面Cmake结果是不是中间有个step Test CMAKE_HAVE_LIBC_PTHREAD没成功?不知道是不是这个原因导致的,后面再make就会出现上面的报错,一直没解决,哎,不知道咋搞了 -- The C compiler identification is GNU 4.9.3 -- The CXX compiler identification is GNU 4.9.3 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found CUDA: /usr/local/cuda-9.0/ (found version "9.0") -- cuda found TRUE -- Building shared library with GPU support -- Configuring done -- Generating done

jjz-learning commented 4 years ago

遇到相同的问题,有解决方案吗?要崩溃了,前面Cmake结果是不是中间有个step Test CMAKE_HAVE_LIBC_PTHREAD没成功?不知道是不是这个原因导致的,后面再make就会出现上面的报错,一直没解决,哎,不知道咋搞了 -- The C compiler identification is GNU 4.9.3 -- The CXX compiler identification is GNU 4.9.3 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found CUDA: /usr/local/cuda-9.0/ (found version "9.0") -- cuda found TRUE -- Building shared library with GPU support -- Configuring done -- Generating done

https://www.cnblogs.com/jjz-ocr/p/11906911.html maybe you can see this blog, hope it can help you!

yjiangling commented 4 years ago

@jjz-learning Thanks for your help, but the bolg saied: -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed this fail has no influence on the next step make and setup installtion. Maybe the error in make step is not caused by this. I'll try the solution mentioned in the: **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” #49 Hope it will work.

yjiangling commented 4 years ago

@jjz-learning I have tried the method of create symlink for ctc_entrypoint.cu mentioned in **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” #49 , but unfortunately, it still doesn't work.

https://github.com/baidu-research/warp-ctc/issues/49#issuecomment-344307435

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.

jjz-learning commented 4 years ago

@jjz-learning I have tried the method of create symlink for ctc_entrypoint.cu mentioned in **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” #49 , but unfortunately, it still doesn't work. baidu-research/warp-ctc#49 (comment) 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.

Ok, thank you very much! I will keep an eye on your solutions, as I havn't met these problems. And I think the version of modules make big differences when we do something on it. Thanks again!

yjiangling commented 4 years ago

@jjz-learning I have tried the method of create symlink for ctc_entrypoint.cu mentioned in **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” #49 , but unfortunately, it still doesn't work. baidu-research/warp-ctc#49 (comment) 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.

Ok, thank you very much! I will keep an eye on your solutions, as I havn't met these problems. And I think the version of modules make big differences when we do something on it. Thanks again!

Yeah, Thank you. I think maybe the GCC/G++ version is still the root cause. The server have only 4.9.3 and 5.3.1 GCC/G++ version. I'll try other verisons. If it works, I'll give you the feedback.