SeanNaren / warp-ctc

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

clang error on python setup.py install #79

Open cbasavaraj opened 6 years ago

cbasavaraj commented 6 years ago

Hi, I have the following error. I am on macOS High Sierra:

clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/lib/python3.7/site-packages/torch/utils/ffi/../../lib/include -I/usr/local/lib/python3.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/Users/Chandrachud/StillMind/warp-ctc/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c /Users/Chandrachud/StillMind/warp-ctc/pytorch_binding/src/binding.cpp -o build/temp.macosx-10.13-x86_64-3.7/Users/Chandrachud/StillMind/warp-ctc/pytorch_binding/src/binding.o -std=c99 -std=c++11 -fPIC -std=c99
error: invalid argument '-std=c99' not allowed with 'C++'
error: command 'clang' failed with exit status 1

I believe the error comes from using clang instead of gcc. I had problems with the previous step of "cmake .." but I solved that by forcing cmake to use gcc by doing: export CXX=/usr/local/Cellar/gcc/8.2.0/bin/g++-8

How do I make python setup.py install use gcc instead of clang? Or is it some other problem? Thanks

cbasavaraj commented 6 years ago

Hi, solved this, please see my comments on Issue #58