parlance / ctcdecode

PyTorch CTC Decoder bindings
MIT License
829 stars 245 forks source link

error: invalid argument '-std=c++11' not allowed with 'C/ObjC' error: command 'gcc' failed with exit status 1 #12

Closed lxj0276 closed 7 years ago

lxj0276 commented 7 years ago

when I ran the command line: CC=/path/to/gcc-5 CXX=/path/to/g++-5 python setup.py install it shows the error info like: error: invalid argument '-std=c++11' not allowed with 'C/ObjC' error: command 'gcc' failed with exit status 1 my os is Macos Sierra,can anybody help me?

Romainpaulus commented 7 years ago

You're probably using a wrong version of gcc. This command fixed the issue for me on Mac: CC=/usr/local/bin/gcc-5 CXX=/usr/local/bin/g++-5 python setup.py install

ryanleary commented 7 years ago

Indeed. Feel free to leave another comment if the above doesn't solve your issue.

davideuler commented 3 years ago

On mac m1 with Big Sur:

CC=$(which gcc-11) CXX=$(which g++-11) python setup.py install