I'm trying to compile OCR 0.4, an optical recognizing program by Google.
As written in the readme file they require to:
1) make sure you have these packages installed (current Ubuntu/Debian versions should work): libpng (with headers) libjpeg (with headers) libtiff (with headers)
2) install iulib from http://code.google.com/p/iulib
3) install a current version of tesseract from the Subversion repository (http://code.google.com/p/tesseract-ocr)
4) from the release directory, run ./configure make sudo make install
I've done all their passages above then when I type "./configure" into the command line I get this error:
checking for /usr/include/tesseract/baseapi.h... no configure: error: Could not find tesseract! Choose --without-tesseract if you do not want to use it or specify the installation path with --with-tesseract=
What I tried to solve this so far, is try to compile by specifying the tesseract path I got by typing "which tesseract"
that gives me
/usr/local/bin/tesseract
So I typed ./configure --with-tesseract=/usr/local/bin/tesseract
and I got the same identical error.
Why am I getting this?
Thanks in advance
EDIT - After I've used the method stated in the answer below I get the following error:
Localhost:ocropus giorgio$ make Making all in . g++ -DPACKAGE_NAME=\"ocropus\" -DPACKAGE_TARNAME=\"ocropus\" -DPACKAGE_VERSION=\"0.3\" -DPACKAGE_STRING=\"ocropus\ 0.3\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ocropus\" -DVERSION=\"0.3\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FLOAT_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_WCHAR_H=1 -DHAVE_LIBZ=1 -DHAVE_LIBPNG=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBTIFF=1 -DHAVE_LIBIULIB=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBTESSERACT_FULL=1 -DHAVE_LIBLEPT=1 -DHAVE_LIBGSLCBLAS=1 -DHAVE_LIBGSL=1 -DHAVE_LIBBLAS=1 -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DHAVE_DUP2=1 -DHAVE_MEMSET=1 -DHAVE_SQRT=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1 -DHAVE_STRRCHR=1 -I. -I./include -I./ocr-utils -I/usr/local/include -I/usr/local/include/tesseract -DHAVE_GSL -I/usr/local/include/tesseract -DHAVE_TESSERACT -I/usr/local/include/leptonica -DHAVE_LEPTONICA -g -O2 -Wall -Wno-sign-compare -Wno-write-strings -Wno-deprecated -g -O2 -MT glclass.o -MD -MP -MF .deps/glclass.Tpo -c -o glclass.o
test -f './ocr-line/glclass.cc' || echo './'
./ocr-line/glclass.cc In file included from ./include/glinerec.h:57, from ./ocr-line/glclass.cc:5: ./include/glutils.h:139: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:105: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:129: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:175: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:236: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:421: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:644: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:1166: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:1403: warning: ignoring #pragma omp parallel ./ocr-line/glclass.cc:1623: warning: ignoring #pragma omp parallel ./ocr-utils/components.h:275: warning: ‘struct ocropus::IComponentConstructor’ has virtual functions but non-virtual destructor /usr/local/include/colib/narray.h: In member function ‘colib::narray& colib::narray::truncate(int) [with T = char]’: ./ocr-utils/narray-binio.h:48: instantiated from here /usr/local/include/colib/narray.h:261: warning: no return statement in function returning non-void /usr/local/include/colib/narray.h: In member function ‘colib::narray& colib::narray::truncate(int) [with T = int]’: ./ocr-line/glclass.cc:295: instantiated from here /usr/local/include/colib/narray.h:261: warning: no return statement in function returning non-void /usr/local/include/colib/rowarrays.h: In function ‘T colib::rowdist_euclidean(colib::narray&, int, colib::narray&) [with T = float]’: ./ocr-line/glclass.cc:396:
instantiated from here /usr/local/include/colib/rowarrays.h:94: error: call of overloaded ‘sqrt(float)’ is ambiguous /usr/local/include/colib/iarith.h:345: note: candidates are: colib::interval colib::sqrt(colib::interval) /usr/local/include/colib/iarith.h:620: note:
colib::dinterval colib::sqrt(colib::dinterval) ./ocr-utils/components.h: At global scope: ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::MappedClassifier]’ ./ocr-line/glclass.cc:1795:
instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::Float8Buffer]’ ./ocr-line/glclass.cc:1796: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::KnnClassifier]’ ./ocr-line/glclass.cc:1798: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::BitNN]’ ./ocr-line/glclass.cc:1799: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::AutoMlpClassifier]’ ./ocr-line/glclass.cc:1801:
instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew2’: ./ocr-utils/components.h:310:
instantiated from ‘void ocropus::component_register2(const char*, bool) [with T = glinerec::MappedClassifier, S = glinerec::AutoMlpClassifier]’ ./ocr-line/glclass.cc:1802:
instantiated from here ./ocr-utils/components.h:286: warning: ‘struct ocropus::ComponentConstructorNew2’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::AdaBoost]’ ./ocr-line/glclass.cc:1804: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew2’: ./ocr-utils/components.h:310: instantiated from ‘void ocropus::component_register2(const char*, bool) [with T = glinerec::MappedClassifier, S = glinerec::AdaBoost]’ ./ocr-line/glclass.cc:1805: instantiated from here ./ocr-utils/components.h:286: warning: ‘struct ocropus::ComponentConstructorNew2’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::CascadedMLP]’ ./ocr-line/glclass.cc:1807: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew2’: ./ocr-utils/components.h:310: instantiated from ‘void ocropus::component_register2(const char*, bool) [with T = glinerec::MappedClassifier, S = glinerec::CascadedMLP]’ ./ocr-line/glclass.cc:1808: instantiated from here ./ocr-utils/components.h:286: warning: ‘struct ocropus::ComponentConstructorNew2’ has virtual functions but non-virtual destructor ./ocr-utils/components.h: In instantiation of ‘ocropus::ComponentConstructorNew’: ./ocr-utils/components.h:306: instantiated from ‘void ocropus::component_register(const char*, bool) [with T = glinerec::LatinClassifier]’ ./ocr-line/glclass.cc:1810: instantiated from here ./ocr-utils/components.h:280: warning: ‘struct ocropus::ComponentConstructorNew’ has virtual functions but non-virtual destructor make[1]: * [glclass.o] Error 1 make: * [all-recursive] Error 1