HawkAaron / warp-transducer

A fast parallel implementation of RNN Transducer.
Apache License 2.0
307 stars 124 forks source link

error in make #37

Closed jackson1895 closed 4 years ago

jackson1895 commented 5 years ago

Hello, according to your prompt, when executing the make command, the following error occurs, how can I solve this problem, thank you. /home/gaoliqing/lhb/warp-transducer-master/src/rnnt_entrypoint.cu(1): error: this declaration has no storage class or type specifier

/home/gaoliqing/lhb/warp-transducer-master/src/rnnt_entrypoint.cu(1): error: expected a ";"

2 errors detected in the compilation of "/tmp/tmpxft_000014f2_00000000-13_rnnt_entrypoint.compute_70.cpp1.ii". CMake Error at warprnnt_generated_rnnt_entrypoint.cu.o.cmake:266 (message): Error generating file /home/gaoliqing/lhb/warp-transducer-master/build/CMakeFiles/warprnnt.dir/src/./warprnnt_generated_rnnt_entrypoint.cu.o

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

HawkAaron commented 5 years ago

Could you provide more information like cmake, cuda, gcc version ?

I used cmake 3.12.2, cuda 9.0, gcc 5.4.

tuananhvip commented 4 years ago

This worked!

sudo apt install g++-4.8 gcc-4.8

sudo update-alternatives --install /usr/bin/gcc gcc "/usr/bin/gcc-4.8" 10
sudo update-alternatives --install /usr/bin/g++ g++ "/usr/bin/g++-4.8" 10

sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc

sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++

sudo update-alternatives --config gcc
sudo update-alternatives --config g++

results:


-- cuda found TRUE
-- Building shared library with GPU support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/u/2019/000_Multilingual_ASR/M01_Rnn-transducer/warp-transducer/build
[ 14%] Built target warprnnt
[ 35%] Built target test_time_gpu
[ 42%] Building NVCC (Device) object CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o
Scanning dependencies of target test_gpu
[ 50%] Building CXX object CMakeFiles/test_gpu.dir/tests/random.cpp.o
[ 57%] Linking CXX executable test_gpu
[ 57%] Built target test_gpu
Scanning dependencies of target test_cpu
[ 64%] Building CXX object CMakeFiles/test_cpu.dir/tests/test_cpu.cpp.o
[ 71%] Building CXX object CMakeFiles/test_cpu.dir/tests/random.cpp.o
[ 78%] Linking CXX executable test_cpu
[ 78%] Built target test_cpu
Scanning dependencies of target test_time
[ 85%] Building CXX object CMakeFiles/test_time.dir/tests/test_time.cpp.o
[ 92%] Building CXX object CMakeFiles/test_time.dir/tests/random.cpp.o
[100%] Linking CXX executable test_time
[100%] Built target test_time```

FB/anh211
yjiangling commented 4 years ago

This worked!

sudo apt install g++-4.8 gcc-4.8

sudo update-alternatives --install /usr/bin/gcc gcc "/usr/bin/gcc-4.8" 10
sudo update-alternatives --install /usr/bin/g++ g++ "/usr/bin/g++-4.8" 10

sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc

sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++

sudo update-alternatives --config gcc
sudo update-alternatives --config g++

results:

-- cuda found TRUE
-- Building shared library with GPU support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/u/2019/000_Multilingual_ASR/M01_Rnn-transducer/warp-transducer/build
[ 14%] Built target warprnnt
[ 35%] Built target test_time_gpu
[ 42%] Building NVCC (Device) object CMakeFiles/test_gpu.dir/tests/test_gpu_generated_test_gpu.cu.o
Scanning dependencies of target test_gpu
[ 50%] Building CXX object CMakeFiles/test_gpu.dir/tests/random.cpp.o
[ 57%] Linking CXX executable test_gpu
[ 57%] Built target test_gpu
Scanning dependencies of target test_cpu
[ 64%] Building CXX object CMakeFiles/test_cpu.dir/tests/test_cpu.cpp.o
[ 71%] Building CXX object CMakeFiles/test_cpu.dir/tests/random.cpp.o
[ 78%] Linking CXX executable test_cpu
[ 78%] Built target test_cpu
Scanning dependencies of target test_time
[ 85%] Building CXX object CMakeFiles/test_time.dir/tests/test_time.cpp.o
[ 92%] Building CXX object CMakeFiles/test_time.dir/tests/random.cpp.o
[100%] Linking CXX executable test_time
[100%] Built target test_time```

FB/anh211

Hi @tuananhvip , my gcc version is 4.9.3 and cuda version is 9.0, have the same question when execute make command. The version of gcc must be 4.8? But I have no permission on server, is there any other solution? Thank U.

yjiangling commented 4 years ago

Hi, @HawkAaron @jackson1895 @tuananhvip ,

I have tried to use both 4.9.3 version and 5.3.1 version of GCC/G++ to finish the cmake step. It seems ok except the step of Performing Test CMAKE_HAVE_LIBC_PTHREAD.

==>4.9.3 version gcc/g++ cmake results: -- 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 -- Build files have been written to: /media/huaxin/tcl1/asr/yujiangling/warp-transducer-master/build

==>5.3.1 version gcc/g++ cmake results: -- The C compiler identification is GNU 5.3.1 -- The CXX compiler identification is GNU 5.3.1 -- Check for working C compiler: /usr/bin/gcc-5 -- Check for working C compiler: /usr/bin/gcc-5 -- 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/g++-5 -- Check for working CXX compiler: /usr/bin/g++-5 -- 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 (found version "9.0") -- cuda found TRUE -- Building shared library with GPU support -- Configuring done -- Generating done -- Build files have been written to: /media/huaxin/tcl1/asr/yujiangling/warp-transducer-master/build (yujiangling) asr@huaxin:/media/huaxin/tcl1/asr/yujiangling/warp-transducer-master/build$ make

But if I continue the next step make, the below error will occure and I tried many approachs but all failed.

/media/huaxin/tcl1/asr/yujiangling/warp-transducer-master/src/rnnt_entrypoint.cu(1): error: this declaration has no storage class or type specifier

/media/huaxin/tcl1/asr/yujiangling/warp-transducer-master/src/rnnt_entrypoint.cu(1): error: expected a ";"

2 errors detected in the compilation of "/tmp/tmpxft_00008d37_00000000-13_rnnt_entrypoint.compute_70.cpp1.ii". CMake Error at warprnnt_generated_rnnt_entrypoint.cu.o.cmake:279 (message): Error generating file /media/huaxin/tcl1/asr/yujiangling/warp-transducer-master/build/CMakeFiles/warprnnt.dir/src/./warprnnt_generated_rnnt_entrypoint.cu.o

CMakeFiles/warprnnt.dir/build.make:63: recipe for target 'CMakeFiles/warprnnt.dir/src/warprnnt_generated_rnnt_entrypoint.cu.o' failed make[2]: [CMakeFiles/warprnnt.dir/src/warprnnt_generated_rnnt_entrypoint.cu.o] Error 1 CMakeFiles/Makefile2:110: recipe for target 'CMakeFiles/warprnnt.dir/all' failed make[1]: [CMakeFiles/warprnnt.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

Is it caused by the version of GCC/G++? Because I have no permission on the sever, so I cannot install other version of GCC/G++. I need your help. Thank you!

liuyukun98 commented 4 years ago

I also meet same error when I install WarpRNN and my gcc version is 4.9, so I check the file _warp-transducer-master/src/rnntentrypoint.cu and find there is only one line code in this file _rnntentrypoint.cpp, so I instead this code with the codes in _warp-transducer-master/src/rnntentrypoint.cpp Surprisingly, it works! @yjiangling @HawkAaron @jackson1895