While OCRing a batch of images through OmniPage the other day, I was silently cursing my computer. I had about 1,500 pages, and OmniPage was crashing after every second or third image. I’ve used versions 13-16 of the software, and this problem seems to just get worse with each new release. Fed up, I decided to look for an alternative.
I remembered seeing a few years ago that HP had open-sourced their OCR engine, Tesseract, development of which has now been taken over by Google. Tesseract is supposedly very good at what it does, namely, recognizing characters in images.
Tesseract does not, however, have many essential features found in modern OCR software, including document layout analysis and output formatting. That’s where OCRopus comes in. I think of it as a wrapper around Tesseract, capable of doing the layout analysis and providing formatted output. In truth, it can do much more than that, and different OCR engines and other components can be plugged into OCRopus, but the preceding simplification works for my purposes.
Usage
Use OCRopus with a simple call from the command line:
$ ocroscript recognize /path/to/file.png > /path/to/output.html
OCRopus will work its magic on file.png and give you an hOCR file. hOCR uses class
and title
attributes in an otherwise simple HTML file to embed layout information into the recognized text. I hope soon to create a script to transform the hOCR into a PDF; I’ll post more when it’s ready.
Installation
The trickiest part of using OCRopus is the installation. There are quite a few dependencies and some inaccurate documentation, so I made a few wrong turns along the way. Fortunately, I remembered to document what I was doing as I went. The instructions below represent the necessary steps to have an operable installation of OCRopus on Linux Mint as of 2009-03-27. For the record, I’m starting in /var/tmp
.
Install Tesseract
As mentioned above, Tesseract is the OCR engine that powers OCRopus.
$ svn checkout http://tesseract-ocr.googlecode.com/svn/trunk/ tesseract-ocr-read-only $ cd tesseract-ocr-read-only $ ./configure $ make $ sudo make install $ cd ..
Install iulib
iulib provides some basic image processing libraries used by OCRopus.
$ svn checkout http://iulib.googlecode.com/svn/trunk/ iulib $ cd iulib $ sudo apt-get install scons $ sudo apt-get install libpng12-dev libjpeg62-dev libtiff4-dev libavcodec-dev libavformat-dev libsdl-gfx1.2-dev libsdl-image1.2-dev $ sudo apt-get install imagemagick $ scons $ sudo scons install $ cd ..
Install Leptonica
Leptonica provides more image processing and layout analysis capabilities.
$ wget http://leptonica.googlecode.com/files/leptonlib-1.60.tar.gz $ tar xvzf leptonlib-1.60.tar.gz $ cd leptonlib-1.60 $ ./configure $ make $ sudo make install $ cd ..
Install OpenFST
OpenFST provides language modeling code to OCRopus. Note that this takes a while (a couple of hours for me) to compile.
$ wget http://mohri-lt.cs.nyu.edu/twiki/pub/FST/FstDownload/openfst-1.1.tar.gz $ tar xvzf openfst-1.1.tar.gz $ cd openfst-1.1 $ ./configure $ make $ sudo make install $ cd ..
Install OCRopus
We now have all our dependencies installed, so it’s time to install OCRopus.
$ sudo apt-get install libeditline-dev $ svn checkout http://ocropus.googlecode.com/svn/trunk/ ocropus $ cd ocropus$ ./configure $ make $ sudo make install
Update (2009-04-01): OCRopus is still young and has many bugs. One particularly annoying bug, one that is quite easy to fix: the Doctype declaration for the hOCR file was missing some quotes, rendering the XHTML invalid. I’ve submitted a patch. So, some slightly revised installation instructions, picking up in the ocropus
directory:
$ wget http://xplus3.net/downloads/fix_ocropus_doctype.diff $ patch -p0 -i fix_ocropus_doctype.diff $ ./configure $ make $ sudo make install
Did you really get ocropus to build successfully using openfst version 1.1?
Are you sure you didn’t ‘svn checkout http://ocropus.googlecode.com/svn/external ocropus-external’, which downloads the patched openfst beta that ocropus 0.3 is built against (and which is about a year older than the current 1.1)?
Request how to build ocropus in (windows platform XP), if possible.
@Robert Waters: Heh, I had no idea I was supposed to use a different version of OpenFST. I really did use version 1.1, using the exact commands I indicated above. No one told me it wasn’t supposed to work, and I didn’t get any error messages.
Thanks. I am really not sure what is going on; I am waiting for a response from the ocropus devs.
I, and others, have been getting a compile error when building ocropus with openfst support; apparently the current build of ocropus (svn) uses code that doesnt exist in openfst 1.1 (it only exists in the old openfst beta). I wish that I knew why yours worked!
Hi I followed your steps and I got the following:
checking /usr/local/include/leptonica/allheaders.h usability… no
checking /usr/local/include/leptonica/allheaders.h presence… no
checking for /usr/local/include/leptonica/allheaders.h… no
checking /usr/local/include/liblept/allheaders.h usability… yes
checking /usr/local/include/liblept/allheaders.h presence… no
configure: WARNING: /usr/local/include/liblept/allheaders.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: /usr/local/include/liblept/allheaders.h: proceeding with the compiler’s result
checking for /usr/local/include/liblept/allheaders.h… yes
checking for pixCreate in -llept… no
configure: error: leptonica not found! Choose –without-leptonica if you don’t want to use it.
I don’t know what went wrong. Could anyone please help? Thanks!
Ed
oh btw, this errors happened when i did a ./configure during the build of ocropus.
Thank you very much, making and installation worked quite fine for me under ubuntu jaunty 9.04.
But there seem to be some problems with openfst (is it disabled completely?? I am using 1.1 as proposed):
When I run “make check”, then there are some errors.
Here are the first ones (could possibly have to do with the current state of ocropus?)…
# ocroscript test-alignment.lua
./ocr-bpnet/grouping.cc:553 FAILED ASSERT (WARNING) basepoint + xheight + ascender_rise < image.dim(1)
# ocroscript test-bpnet.lua
./ocr-bpnet/grouping.cc:553 FAILED ASSERT (WARNING) basepoint + xheight + ascender_rise < image.dim(1)
OpenFST is disabled, we can’t test it.
Markus
BTW: There is a little typo in the second line of the code (tesseract – tessaract) ;-).
@Markus: Typo fixed. Thanks. I haven’t tried to install since the new version came out a couple of weeks ago, so there might be new problems. These instructions were accurate two months ago, but seem to have quickly become obsolete.
Request how to build ocropus in (windows platform XP), if possible.
I got the same error as Edward Wong, http://xplus3.net/2009/03/31/ocr-with-ocropus-and-tesseract/#comment-547
I’m trying to build OCRopus at OSX 10.5.7
Any help regarding this error would be appreciated!
Edward Wong: had a similar problem – tried using this build (with out OpenFST due to build errors).
./configure –with-tesseract=/usr/local –without-fst –with-leptonica=/usr/local LIBS=”-lpng -lgif -ltiff -ljpeg $LIBS”
the LIBS=”-lpng -lgif -ltiff -ljpeg $LIBS”
bit will fix your problem..
At least it did with ocropus-0.3 – still haven’t managed to get ocropus-0.4 to build yet..
Thanks for giving it a try; keep in mind that OCRopus is still in alpha release, so there are going to be lots of rough spots. Beta is planned for October.
Really,I am very much impressed with above article. However why not
try Ocropus latest version 0.4(alpha)on the above lines would appreciated for benefit of users – which also serves as tutorial for newbies.
It would be nice to build in windows platform on the lines of built by Lakmesha.G.V who had uploaded windows version for Ocorpus 1.1 on Dec 30 2007 in the file section of forum
Wishing you all the best of luck.
The entire Linux community could benefit from the clarity and step-by-step design of these instructions. I love Linux and have used it on and off for a decade or so, but one constant is the unfortunate lack of clarity in Linux documentation for the non-guru. This is, however, excellent technical documentation that almost anyone can follow.
Kudos!
Chris
However…
Using Ubuntu 10.04, when i go to do the Make for ocropus, it says that it cannot find tesseract
checking for err_exit in -ltesseract_full… no
Tesseract seemed to install with no problem. No errors at first glance.
config.log from ocropus
$ ./configure
## ——— ##
## Platform. ##
## ——— ##
hostname = BMoreMainPC
uname -m = i686
uname -r = 2.6.32-22-generic
uname -s = Linux
uname -v = #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/pan/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
## ———– ##
## Core tests. ##
## ———– ##
configure:1837: checking for a BSD-compatible install
configure:1893: result: /usr/bin/install -c
configure:1904: checking whether build environment is sane
configure:1947: result: yes
configure:2012: checking for gawk
configure:2028: found /usr/bin/gawk
configure:2039: result: gawk
configure:2050: checking whether make sets $(MAKE)
configure:2071: result: yes
configure:2338: checking for /usr/local/include/iulib/imgio.h
configure:2354: result: yes
configure:2428: checking for g++
configure:2444: found /usr/bin/g++
configure:2455: result: g++
configure:2486: checking for C++ compiler version
configure:2493: g++ –version >&5
g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2496: $? = 0
configure:2503: g++ -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v –with-pkgversion=’Ubuntu 4.4.3-4ubuntu5′ –with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs –enable-languages=c,c++,fortran,objc,obj-c++ –prefix=/usr –enable-shared –enable-multiarch –enable-linker-build-id –with-system-zlib –libexecdir=/usr/lib –without-included-gettext –enable-threads=posix –with-gxx-include-dir=/usr/include/c++/4.4 –program-suffix=-4.4 –enable-nls –enable-clocale=gnu –enable-libstdcxx-debug –enable-plugin –enable-objc-gc –enable-targets=all –disable-werror –with-arch-32=i486 –with-tune=generic –enable-checking=release –build=i486-linux-gnu –host=i486-linux-gnu –target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
configure:2506: $? = 0
configure:2513: g++ -V >&5
g++: ‘-V’ option must have argument
configure:2516: $? = 1
configure:2539: checking for C++ compiler default output file name
configure:2566: g++ -L/usr/local/lib -L/usr/local/lib conftest.cpp >&5
configure:2569: $? = 0
configure:2607: result: a.out
configure:2624: checking whether the C++ compiler works
configure:2634: ./a.out
configure:2637: $? = 0
configure:2654: result: yes
configure:2661: checking whether we are cross compiling
configure:2663: result: no
configure:2666: checking for suffix of executables
configure:2673: g++ -o conftest -L/usr/local/lib -L/usr/local/lib conftest.cpp >&5
configure:2676: $? = 0
configure:2700: result:
configure:2706: checking for suffix of object files
configure:2732: g++ -c conftest.cpp >&5
configure:2735: $? = 0
configure:2758: result: o
configure:2762: checking whether we are using the GNU C++ compiler
configure:2791: g++ -c conftest.cpp >&5
configure:2797: $? = 0
configure:2814: result: yes
configure:2819: checking whether g++ accepts -g
configure:2849: g++ -c -g conftest.cpp >&5
configure:2855: $? = 0
configure:2954: result: yes
configure:2988: checking for style of include used by make
configure:3016: result: GNU
configure:3044: checking dependency style of g++
configure:3134: result: gcc3
configure:3199: checking for gcc
configure:3215: found /usr/bin/gcc
configure:3226: result: gcc
configure:3464: checking for C compiler version
configure:3471: gcc –version >&5
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3474: $? = 0
configure:3481: gcc -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v –with-pkgversion=’Ubuntu 4.4.3-4ubuntu5′ –with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs –enable-languages=c,c++,fortran,objc,obj-c++ –prefix=/usr –enable-shared –enable-multiarch –enable-linker-build-id –with-system-zlib –libexecdir=/usr/lib –without-included-gettext –enable-threads=posix –with-gxx-include-dir=/usr/include/c++/4.4 –program-suffix=-4.4 –enable-nls –enable-clocale=gnu –enable-libstdcxx-debug –enable-plugin –enable-objc-gc –enable-targets=all –disable-werror –with-arch-32=i486 –with-tune=generic –enable-checking=release –build=i486-linux-gnu –host=i486-linux-gnu –target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
configure:3484: $? = 0
configure:3491: gcc -V >&5
gcc: ‘-V’ option must have argument
configure:3494: $? = 1
configure:3497: checking whether we are using the GNU C compiler
configure:3526: gcc -c conftest.c >&5
configure:3532: $? = 0
configure:3549: result: yes
configure:3554: checking whether gcc accepts -g
configure:3584: gcc -c -g conftest.c >&5
configure:3590: $? = 0
configure:3689: result: yes
configure:3706: checking for gcc option to accept ISO C89
configure:3780: gcc -c -g -O2 conftest.c >&5
configure:3786: $? = 0
configure:3809: result: none needed
configure:3829: checking dependency style of gcc
configure:3919: result: gcc3
configure:3979: checking for ranlib
configure:3995: found /usr/bin/ranlib
configure:4006: result: ranlib
configure:4039: checking how to run the C preprocessor
configure:4079: gcc -E conftest.c
configure:4085: $? = 0
configure:4116: gcc -E conftest.c
conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
configure:4122: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME “ocropus”
| #define PACKAGE_TARNAME “ocropus”
| #define PACKAGE_VERSION “0.3”
| #define PACKAGE_STRING “ocropus 0.3”
| #define PACKAGE_BUGREPORT “”
| #define PACKAGE “ocropus”
| #define VERSION “0.3”
| /* end confdefs.h. */
| #include
configure:4155: result: gcc -E
configure:4184: gcc -E conftest.c
configure:4190: $? = 0
configure:4221: gcc -E conftest.c
conftest.c:10:28: error: ac_nonexistent.h: No such file or directory
configure:4227: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME “ocropus”
| #define PACKAGE_TARNAME “ocropus”
| #define PACKAGE_VERSION “0.3”
| #define PACKAGE_STRING “ocropus 0.3”
| #define PACKAGE_BUGREPORT “”
| #define PACKAGE “ocropus”
| #define VERSION “0.3”
| /* end confdefs.h. */
| #include
configure:4265: checking for grep that handles long lines and -e
configure:4339: result: /bin/grep
configure:4344: checking for egrep
configure:4422: result: /bin/grep -E
configure:4427: checking for ANSI C header files
configure:4457: gcc -c -g -O2 conftest.c >&5
configure:4463: $? = 0
configure:4562: gcc -o conftest -g -O2 -L/usr/local/lib -L/usr/local/lib conftest.c >&5
configure:4565: $? = 0
configure:4571: ./conftest
configure:4574: $? = 0
configure:4591: result: yes
configure:4601: checking for sys/wait.h that is POSIX.1 compatible
configure:4637: gcc -c -g -O2 conftest.c >&5
configure:4643: $? = 0
configure:4658: result: yes
configure:4682: checking for sys/types.h
configure:4703: gcc -c -g -O2 conftest.c >&5
configure:4709: $? = 0
configure:4725: result: yes
configure:4682: checking for sys/stat.h
configure:4703: gcc -c -g -O2 conftest.c >&5
configure:4709: $? = 0
configure:4725: result: yes
configure:4682: checking for stdlib.h
configure:4703: gcc -c -g -O2 conftest.c >&5
configure:4709: $? = 0
configure:4725: result: yes
configure:4682: checking for string.h
configure:4703: gcc -c -g -O2 conftest.c >&5
configure:4709: $? = 0
configure:4725: result: yes
configure:4682: checking for memory.h
configure:4703: gcc -c -g -O2 conftest.c >&5
configure:4709: $? = 0
configure:4725: result: yes
configure:4682: checking for strings.h
configure:4703: gcc -c -g -O2 conftest.c >&5
configure:4709: $? = 0
configure:4725: result: yes
configure:4682: checking for inttypes.h
configure:4703: gcc -c -g -O2 conftest.c >&5
configure:4709: $? = 0
configure:4725: result: yes
configure:4682: checking for stdint.h
configure:4703: gcc -c -g -O2 conftest.c >&5
configure:4709: $? = 0
configure:4725: result: yes
configure:4682: checking for unistd.h
configure:4703: gcc -c -g -O2 conftest.c >&5
configure:4709: $? = 0
configure:4725: result: yes
configure:4758: checking float.h usability
configure:4775: gcc -c -g -O2 conftest.c >&5
configure:4781: $? = 0
configure:4795: result: yes
configure:4799: checking float.h presence
configure:4814: gcc -E conftest.c
configure:4820: $? = 0
configure:4834: result: yes
configure:4862: checking for float.h
configure:4870: result: yes
configure:4758: checking malloc.h usability
configure:4775: gcc -c -g -O2 conftest.c >&5
configure:4781: $? = 0
configure:4795: result: yes
configure:4799: checking malloc.h presence
configure:4814: gcc -E conftest.c
configure:4820: $? = 0
configure:4834: result: yes
configure:4862: checking for malloc.h
configure:4870: result: yes
configure:4748: checking for stdint.h
configure:4754: result: yes
configure:4748: checking for stdlib.h
configure:4754: result: yes
configure:4748: checking for string.h
configure:4754: result: yes
configure:4748: checking for unistd.h
configure:4754: result: yes
configure:4758: checking wchar.h usability
configure:4775: gcc -c -g -O2 conftest.c >&5
configure:4781: $? = 0
configure:4795: result: yes
configure:4799: checking wchar.h presence
configure:4814: gcc -E conftest.c
configure:4820: $? = 0
configure:4834: result: yes
configure:4862: checking for wchar.h
configure:4870: result: yes
configure:4886: checking for unistd.h
configure:4891: result: yes
configure:5022: checking for compress in -lz
configure:5057: gcc -o conftest -g -O2 -L/usr/local/lib -L/usr/local/lib conftest.c -lz >&5
configure:5063: $? = 0
configure:5081: result: yes
configure:5108: checking png.h usability
configure:5125: gcc -c -g -O2 conftest.c >&5
configure:5131: $? = 0
configure:5145: result: yes
configure:5149: checking png.h presence
configure:5164: gcc -E conftest.c
configure:5170: $? = 0
configure:5184: result: yes
configure:5212: checking for png.h
configure:5219: result: yes
configure:5233: checking for png_sig_cmp in -lpng
configure:5268: gcc -o conftest -g -O2 -L/usr/local/lib -L/usr/local/lib conftest.c -lpng -lz >&5
configure:5274: $? = 0
configure:5292: result: yes
configure:5319: checking jpeglib.h usability
configure:5336: gcc -c -g -O2 conftest.c >&5
configure:5342: $? = 0
configure:5356: result: yes
configure:5360: checking jpeglib.h presence
configure:5375: gcc -E conftest.c
configure:5381: $? = 0
configure:5395: result: yes
configure:5423: checking for jpeglib.h
configure:5430: result: yes
configure:5444: checking for jpeg_std_error in -ljpeg
configure:5479: gcc -o conftest -g -O2 -L/usr/local/lib -L/usr/local/lib conftest.c -ljpeg -lpng -lz >&5
configure:5485: $? = 0
configure:5503: result: yes
configure:5521: checking for TIFFOpen in -ltiff
configure:5556: gcc -o conftest -g -O2 -L/usr/local/lib -L/usr/local/lib conftest.c -ltiff -ljpeg -lpng -lz >&5
configure:5562: $? = 0
configure:5580: result: yes
configure:5607: checking for exit in -liulib
configure:5642: g++ -o conftest -g -O2 -L/usr/local/lib -L/usr/local/lib conftest.cpp -liulib -ltiff -ljpeg -lpng -lz >&5
configure:5648: $? = 0
configure:5666: result: yes
configure:5684: checking for pthread_create in -lpthread
configure:5719: g++ -o conftest -g -O2 -L/usr/local/lib -L/usr/local/lib conftest.cpp -lpthread -liulib -ltiff -ljpeg -lpng -lz >&5
configure:5725: $? = 0
configure:5743: result: yes
configure:5758: checking for err_exit in -ltesseract_full
configure:5793: g++ -o conftest -g -O2 -L/usr/local/lib -L/usr/local/lib conftest.cpp -ltesseract_full -lpthread -liulib -ltiff -ljpeg -lpng -lz >&5
/usr/bin/ld: cannot find -ltesseract_full
collect2: ld returned 1 exit status
configure:5799: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME “ocropus”
| #define PACKAGE_TARNAME “ocropus”
| #define PACKAGE_VERSION “0.3”
| #define PACKAGE_STRING “ocropus 0.3”
| #define PACKAGE_BUGREPORT “”
| #define PACKAGE “ocropus”
| #define VERSION “0.3”
| #define STDC_HEADERS 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_FLOAT_H 1
| #define HAVE_MALLOC_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_LIBZ 1
| #define HAVE_LIBPNG 1
| #define HAVE_LIBJPEG 1
| #define HAVE_LIBTIFF 1
| #define HAVE_LIBIULIB 1
| #define HAVE_LIBPTHREAD 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern “C”
| #endif
| char err_exit ();
| int
| main ()
| {
| return err_exit ();
| ;
| return 0;
| }
configure:5817: result: no
configure:5827: error: Could not find tesseract! Choose –without-tesseract if you do not want to use it.
## —————- ##
## Cache variables. ##
## —————- ##
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_colibheaders_set=
ac_cv_env_colibheaders_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_iulibheaders_set=
ac_cv_env_iulibheaders_value=
ac_cv_env_iuliblibs_set=
ac_cv_env_iuliblibs_value=
ac_cv_env_leptheaders_set=
ac_cv_env_leptheaders_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_env_tessheaders_set=
ac_cv_env_tessheaders_value=
ac_cv_env_tesslibs_set=
ac_cv_env_tesslibs_value=
ac_cv_file__usr_local_include_iulib_imgio_h=yes
ac_cv_header_float_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_jpeglib_h=yes
ac_cv_header_malloc_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_png_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_sys_wait_h=yes
ac_cv_header_unistd_h=yes
ac_cv_header_wchar_h=yes
ac_cv_lib_iulib_exit=yes
ac_cv_lib_jpeg_jpeg_std_error=yes
ac_cv_lib_png_png_sig_cmp=yes
ac_cv_lib_pthread_pthread_create=yes
ac_cv_lib_tesseract_full_err_exit=no
ac_cv_lib_tiff_TIFFOpen=yes
ac_cv_lib_z_compress=yes
ac_cv_objext=o
ac_cv_path_EGREP=’/bin/grep -E’
ac_cv_path_GREP=/bin/grep
ac_cv_path_install=’/usr/bin/install -c’
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP=’gcc -E’
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_ac_ct_RANLIB=ranlib
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_prog_make_make_set=yes
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_CXX_dependencies_compiler_type=gcc3
## —————– ##
## Output variables. ##
## —————– ##
ACLOCAL=’${SHELL} /home/pan/ocropus/missing –run aclocal-1.9′
AMDEPBACKSLASH=’\’
AMDEP_FALSE=’#’
AMDEP_TRUE=”
AMTAR=’${SHELL} /home/pan/ocropus/missing –run tar’
AUTOCONF=’${SHELL} /home/pan/ocropus/missing –run autoconf’
AUTOHEADER=’${SHELL} /home/pan/ocropus/missing –run autoheader’
AUTOMAKE=’${SHELL} /home/pan/ocropus/missing –run automake-1.9′
AWK=’gawk’
CC=’gcc’
CCDEPMODE=’depmode=gcc3′
CFLAGS=’-g -O2′
CPP=’gcc -E’
CPPFLAGS=”
CXX=’g++’
CXXCPP=”
CXXDEPMODE=’depmode=gcc3′
CXXFLAGS=’-g -O2′
CYGPATH_W=’echo’
DEFS=”
DEPDIR=’.deps’
ECHO_C=”
ECHO_N=’-n’
ECHO_T=”
EGREP=’/bin/grep -E’
EXEEXT=”
GREP=’/bin/grep’
INSTALL_DATA=’${INSTALL} -m 644′
INSTALL_PROGRAM=’${INSTALL}’
INSTALL_SCRIPT=’${INSTALL}’
INSTALL_STRIP_PROGRAM=’${SHELL} $(install_sh) -c -s’
LDFLAGS=’ -L/usr/local/lib -L/usr/local/lib’
LIBOBJS=”
LIBS=’-lpthread -liulib -ltiff -ljpeg -lpng -lz ‘
LTLIBOBJS=”
MAKEINFO=’${SHELL} /home/pan/ocropus/missing –run makeinfo’
OBJEXT=’o’
PACKAGE=’ocropus’
PACKAGE_BUGREPORT=”
PACKAGE_NAME=’ocropus’
PACKAGE_STRING=’ocropus 0.3′
PACKAGE_TARNAME=’ocropus’
PACKAGE_VERSION=’0.3′
PATH_SEPARATOR=’:’
RANLIB=’ranlib’
SET_MAKE=”
SHELL=’/bin/bash’
STRIP=”
VERSION=’0.3′
ac_ct_CC=’gcc’
ac_ct_CXX=’g++’
am__fastdepCC_FALSE=’#’
am__fastdepCC_TRUE=”
am__fastdepCXX_FALSE=’#’
am__fastdepCXX_TRUE=”
am__include=’include’
am__leading_dot=’.’
am__quote=”
am__tar=’${AMTAR} chof – “$$tardir”‘
am__untar=’${AMTAR} xf -‘
bindir=’${exec_prefix}/bin’
build_alias=”
colibheaders=’/usr/local/include/colib’
datadir=’${datarootdir}’
datarootdir=’${prefix}/share’
docdir=’${datarootdir}/doc/${PACKAGE_TARNAME}’
dvidir=’${docdir}’
exec_prefix=’NONE’
host_alias=”
htmldir=’${docdir}’
includedir=’${prefix}/include’
infodir=’${datarootdir}/info’
install_sh=’/home/pan/ocropus/install-sh’
iulib_prefix=’/usr/local’
iulibheaders=’/usr/local/include/iulib’
iuliblibs=’/usr/local/lib’
leptheaders=”
libdir=’${exec_prefix}/lib’
libexecdir=’${exec_prefix}/libexec’
localedir=’${datarootdir}/locale’
localstatedir=’${prefix}/var’
mandir=’${datarootdir}/man’
mkdir_p=’mkdir -p –‘
noeditline=”
nofst=”
nofst_FALSE=”
nofst_TRUE=”
noposix=”
nosdl=”
nosdl_FALSE=”
nosdl_TRUE=”
notesseract=”
notesseract_FALSE=”
notesseract_TRUE=’#’
oldincludedir=’/usr/include’
pdfdir=’${docdir}’
prefix=’NONE’
program_transform_name=’s,x,x,’
psdir=’${docdir}’
sbindir=’${exec_prefix}/sbin’
sharedstatedir=’${prefix}/com’
sysconfdir=’${prefix}/etc’
target_alias=”
tesseract_prefix=’/usr/local’
tessheaders=’/usr/local/include/tesseract’
tesslibs=’/usr/local/lib’
use_editline_FALSE=”
use_editline_TRUE=”
use_leptonica=”
use_leptonica_FALSE=”
use_leptonica_TRUE=”
## ———– ##
## confdefs.h. ##
## ———– ##
#define PACKAGE_NAME “ocropus”
#define PACKAGE_TARNAME “ocropus”
#define PACKAGE_VERSION “0.3”
#define PACKAGE_STRING “ocropus 0.3”
#define PACKAGE_BUGREPORT “”
#define PACKAGE “ocropus”
#define VERSION “0.3”
#define STDC_HEADERS 1
#define HAVE_SYS_WAIT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_FLOAT_H 1
#define HAVE_MALLOC_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_UNISTD_H 1
#define HAVE_WCHAR_H 1
#define HAVE_LIBZ 1
#define HAVE_LIBPNG 1
#define HAVE_LIBJPEG 1
#define HAVE_LIBTIFF 1
#define HAVE_LIBIULIB 1
#define HAVE_LIBPTHREAD 1
configure: exit 1
Help?
Thanks, Chris
FYI – I tried this
wget http://ocropus.googlecode.com/files/ocropus-0.3.tar.gz
tar xvzf ocropus-0.3.tar.gz
cd ocropus-0.3
./configure
make
sudo make install
cd
Thinking maybe it was v0.4 that was causing me issues. No go. Same error.
Chris
This manual is quite helpful but not quite up-to-date. Please see http://code.google.com/p/ocropus/wiki/InstallTranscript to circumvent errors occuring during install.