Compiling tesseract-ocr + training on centos 6

Compiling tesseract-ocr + training on centos 6

Installation steps are outlined here. However for  training additional steps are required

sudo yum install cairo-devel pango-devel libicu-devel

But I am still getting errors

  • No rule to make target `training-install':
  • Training tools WILL NOT be built because of missing c++11 support
  •  unicode/normalizer2.h: No such file or directory

Solution:

Pay special attention to ./configure output. In my case I was using gcc 4.7 where as gcc 4.8 was required. Solution is was to install devtoolset-2 and then enabling gcc 4.8

$ wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
$ yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++

# now enable it
$ source /opt/rh/devtoolset-2/enable

# verify its gcc 4.8
$ gcc --version

# Install libicu 52
wget http://download.icu-project.org/files/icu4c/52.1/icu4c-52_1-src.tgz
./configure && make && make install

Now proceed:

./autogen.sh
./configure
make
sudo make install
sudo ldconfig
make training
sudo make training-install

 Additional resources:

0 comments

Submit