githubharald / CTCWordBeamSearch

Connectionist Temporal Classification (CTC) decoder with dictionary and language model.
https://towardsdatascience.com/b051d28f3d2e
MIT License
557 stars 160 forks source link

What version of gcc is used #63

Closed shenw000 closed 2 years ago

shenw000 commented 2 years ago

Hi,

I attempted to use the following command to install CTCWordBeamSearch. pip install . But there are a lot of compiler errors. What version of the gcc shall I use to compile the CTCWordBeamSearch? I am using gcc 5.4 running on Ubuntu 16.04

Thanks, shen000

githubharald commented 2 years ago

Hi, I think C++11 should be enough, not sure now if some C++14 feature was used. Can you post the errors (at least the first few errors, the rest are usually just some aftereffect of the first one).

One thing you could try is to explicitly tell the compiler you want C++11 support in the setup.py file: https://github.com/githubharald/CTCWordBeamSearch/blob/master/setup.py#L8

Add this argument extra_compile_args=['-std=c++11'] to the Extension.

shenw000 commented 2 years ago

Thank you, githubherald! Yes, I changed to gcc version from gcc 5.4 to gcc 7.5, and it now compiles without any problem. What's surprising to me is gcc 5.4 also supports both C++14 and C++11, at least according to the documentations. Thank you!

githubharald commented 2 years ago

maybe gcc 5.4 really needs to activate C++11/14 using some setting like -std=c++11. But good to hear it finally worked.

MorganFujimaka commented 2 years ago

export CFLAGS='-std=c++11' worked for me.