parlance / ctcdecode

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

Compilation error on GCC 7.4 / Ubuntu 18.04 #127

Open vadimkantorov opened 4 years ago

vadimkantorov commented 4 years ago

I have PyTorch installed from a nightly build. I think maybe it now needs a C++14 options in compiler.

I install ctcdecode as pip install git+https://github.com/parlance/ctcdecode

log.txt

vadimkantorov commented 4 years ago

export CFLAGS=-std=c++14 didn't help

vadimkantorov commented 4 years ago

Compiler calls are still like gcc -pthread -B /miniconda/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c++14 -fPIC -I/tmp/pip-req-build-8t7lyg7q/third_party/kenlm -I/tmp/pip-req-build-8t7lyg7q/third_party/openfst-1.6.7/src/include -I/tmp/pip-req-build-8t7lyg7q/third_party/ThreadPool -I/tmp/pip-req-build-8t7lyg7q/third_party/boost_1_67_0 -I/tmp/pip-req-build-8t7lyg7q/third_party/utf8 -I/miniconda/lib/python3.7/site-packages/torch/include -I/miniconda/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/miniconda/lib/python3.7/site-packages/torch/include/TH -I/miniconda/lib/python3.7/site-packages/torch/include/THC -I/miniconda/lib/python3.7/site-packages/torch/include -I/miniconda/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/miniconda/lib/python3.7/site-packages/torch/include/TH -I/miniconda/lib/python3.7/site-packages/torch/include/THC -I/miniconda/include/python3.7m -c ctcdecode/src/binding.cpp -o build/temp.linux-x86_64-3.7/ctcdecode/src/binding.o -O3 -DKENLM_MAX_ORDER=6 -std=c++11 -fPIC -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB -DINCLUDE_KENLM -DKENLM_MAX_ORDER=6 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=ctc_decode -D_GLIBCXX_USE_CXX11_ABI=0, so the latter -std=c++11 overrides my new earlier -std=c++14

vadimkantorov commented 4 years ago

Probably https://github.com/parlance/ctcdecode/blob/master/build.py#L44 is problematic and needs to be updated to c++14

vadimkantorov commented 4 years ago

Confirmed, this is the cause. sed -i 's/11/14/g' build.py fixes the problem

Kaviarasan-R commented 3 years ago

When I installing ctcdecode, it shows building wheels and then my system hangs..it does not complete installation..anyone please give your suggestion. I am stucked here for a week