NVIDIA / OpenSeq2Seq

Toolkit for efficient experimentation with Speech Recognition, Text2Speech and NLP
https://nvidia.github.io/OpenSeq2Seq
Apache License 2.0
1.54k stars 372 forks source link

boost/iterator/iterator_facade.hpp: No such file or directory #511

Open atakanokan opened 4 years ago

atakanokan commented 4 years ago

I am having trouble installing Baidu CTC decoder (https://nvidia.github.io/OpenSeq2Seq/html/installation.html#installation-of-openseq2seq-for-speech-recognition) using scripts/install_decoders.sh.

Because I am behind a proxy, I have to bypass git clones and wgets, which I can do using manual download and upload however I cannot complete the last line in decoders/setup.sh because it is throwing this error:

gcc -pthread -B /home/ec2-user/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ikenlm -Iopenfst-1.6.3/src/include -IThreadPool -I/home/ec2-user/anaconda3/include/python3.6m -c scorer.cpp -o build/temp.linux-x86_64-3.6/scorer.o -O3 -DNDEBUG -DKENLM_MAX_ORDER=6 -std=c++11 -DHAVE_ZLIB -DHAVE_BZLIB -DHAVE_XZLIB
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from scorer.cpp:10:0:
kenlm/util/tokenize_piece.hh:8:10: fatal error: boost/iterator/iterator_facade.hpp: No such file or directory
 #include <boost/iterator/iterator_facade.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1

Because I can't do sudo yum install libboost-dev-all like stated under https://nvidia.github.io/OpenSeq2Seq/html/installation.html#how-to-build-a-custom-native-tf-op-for-ctc-decoder-with-language-model-optional, I had to do the following to install boost:

I have downloaded the boost library from: https://www.boost.org/users/history/version_1_62_0.html and ran

sudo ./bootstrap.sh
sudo ./b2

to install it and also added the paths given below with export:

The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
    /home/ec2-user/user/project/boost/boost_1_62_0
The following directory should be added to linker library paths:
        /home/ec2-user/user/project/boost/boost_1_62_0/stage/lib

When I do printenv, I can see the paths there:

BOOST_INCLUDEDIR=/home/ec2-user/user/project/boost/boost_1_65_1
BOOST_LIBRARYDIR=/home/ec2-user/user/project/boost/boost_1_65_1/stage/lib

OS: I am running this on CentOS (AWS EC2)