AmitGorvadiya / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

svn r397 failed to compile #318

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cd tesseract-ocr-read-only
2. ./configure
3. make

What is the expected output? What do you see instead?
expected: main program executable api/tesseract
instead:
...
tesseractmain.cpp: In function ‘int main(int, char**)’:
tesseractmain.cpp:349: error: ‘ext’ was not declared in this scope
make[3]: *** [tesseractmain.o] Error 1
...
What version of the product are you using? On what operating system?
svn r397 on linux 2.6.18-128.el5

Please provide any additional information below.
api/.libs/libtesseract_api.a (471KB) seems much much smaller than it used
to be (23MB) in svn r319 (api/libtesseract_api.a)

Original issue reported on code.google.com by icha...@gmail.com on 7 Jun 2010 at 6:46

GoogleCodeExporter commented 9 years ago
fixed compile error by:
In api/tesseractmain.cpp:349:
  delete[] ext;
moved it up to line 344 so that it would be hidden if both HAVE_LIBLEP and 
_TIFFIO_
are #defined. Running 'make' again produced the expected executable 
api/tesseract.
Running tesseract (after make install):
$ tesseract foo.tif foo
Tesseract Open Source OCR Engine with Leptonica
Segmentation fault

Original comment by icha...@gmail.com on 7 Jun 2010 at 7:28

GoogleCodeExporter commented 9 years ago
fixed the 'segmentation fault' issue by patching the following to 
api/Makefile.am
followed by 'automake' (to regenerate api/Makefile.in):

--- ../tesseract-ocr-read-only/api/Makefile.am  2010-06-04 11:28:05.000000000 
+0800
+++ api/Makefile.am     2010-06-07 15:53:36.000000000 +0800
@@ -28,4 +28,15 @@
 bin_PROGRAMS = tesseract
 tesseract_SOURCES = tesseractmain.cpp
 tesseract_LDADD = \
-    libtesseract_api.la
+    libtesseract_api.la \
+    ../ccmain/libtesseract_main.la \
+    ../textord/libtesseract_textord.la \
+    ../wordrec/libtesseract_wordrec.la \
+    ../classify/libtesseract_classify.la \
+    ../dict/libtesseract_dict.la \
+    ../ccstruct/libtesseract_ccstruct.la \
+    ../image/libtesseract_image.la \
+    ../cutil/libtesseract_cutil.la \
+    ../viewer/libtesseract_viewer.la \
+    ../ccutil/libtesseract_ccutil.la

But not sure if this is the right thing to do. Would someone alert me if there 
is a
proper fix to the issue.

Original comment by icha...@gmail.com on 7 Jun 2010 at 8:42

GoogleCodeExporter commented 9 years ago
Patch applied in revision 402. Thanks.

Original comment by joregan on 9 Jun 2010 at 12:09