SeanNaren / warp-ctc

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

Error gcc unsupported when run make #173

Open vanchung1995 opened 4 years ago

vanchung1995 commented 4 years ago

I ran these commands and it raised this error:

git clone https://github.com/SeanNaren/warp-ctc.git
cd warp-ctc
mkdir build; cd build
cmake ..
make

Screenshot from 2020-08-20 10-10-55

ghsticker commented 3 years ago

you solved this problem?

ritwikmishra commented 3 years ago

I was facing the same problem. I didn't want to uninstall gcc because other projects might need it.

Solution: Install gcc-5 (technically it should work on gcc-6 also but I didn't try). So install gcc-5.

sudo apt install g++-5
sudo apt install gcc-5

Do not update the alternatives. Let gcc-5 live peacefully with the current gcc version.

Then instead of cmake .. do this cmake -D CMAKE_C_COMPILER:string=gcc-5 -D CMAKE_CXX_COMPILER=g++-5 ../

Simple

It worked for me.

UPDATE: when the following error came Need to add -std=c++11 to CMAKE_CXX_FLAGS

I just replaced all the std=c++14 in CMakeLists.txt file with std=c++11

KiriKoppelgaard commented 1 year ago

I solve the issue by defining a previous version of gcc, like this: cmake .. -DCMAKE_C_COMPILER=gcc-7