Aasimrafique / python-tesseract

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

Install problem with tprintf.h:29:8: error: ‘TESS_API’ does not name a type #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The problem 
$ python setup.py build
Current Version : only
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
running build
running build_py
copying tesseract.py -> build/lib.linux-x86_64-2.7
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/include/tesseract -I/usr/include/leptonica -o 
tesseract_wrap.cpp tesseract.i
/usr/include/tesseract/publictypes.h:73: Warning 462: Unable to set 
dimensionless array variable
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DNDEBUG 
-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector 
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I. 
-I/usr/include/tesseract -I/usr/include/leptonica -I/usr/include/python2.7 -c 
tesseract_wrap.cpp -o build/temp.linux-x86_64-2.7/tesseract_wrap.o
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe 
-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -DNDEBUG 
-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector 
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fPIC -I. 
-I/usr/include/tesseract -I/usr/include/leptonica -I/usr/include/python2.7 -c 
main_dummy.cpp -o build/temp.linux-x86_64-2.7/main_dummy.o
In file included from /usr/include/python2.7/Python.h:8:0,
                 from config.h:8,
                 from main_dummy.cpp:9:
/usr/include/python2.7/pyconfig.h:1161:0: warning: "_POSIX_C_SOURCE" redefined 
[enabled by default]
In file included from /usr/include/assert.h:37:0,
                 from ./opencv2/core/types_c.h:52,
                 from ./opencv2/core/core_c.h:47,
                 from /usr/include/opencv/cv.h:63,
                 from config.h:7,
                 from main_dummy.cpp:9:
/usr/include/features.h:164:0: note: this is the location of the previous 
definition
In file included from /usr/include/python2.7/Python.h:8:0,
                 from config.h:8,
                 from main_dummy.cpp:9:
/usr/include/python2.7/pyconfig.h:1183:0: warning: "_XOPEN_SOURCE" redefined 
[enabled by default]
In file included from /usr/include/assert.h:37:0,
                 from ./opencv2/core/types_c.h:52,
                 from ./opencv2/core/core_c.h:47,
                 from /usr/include/opencv/cv.h:63,
                 from config.h:7,
                 from main_dummy.cpp:9:
/usr/include/features.h:166:0: note: this is the location of the previous 
definition
In file included from main_dummy.cpp:22:0:
tprintf.h:29:8: error: ‘TESS_API’ does not name a type
main_dummy.cpp: In function ‘int readBuf(const char*, l_uint8*)’:
main_dummy.cpp:54:21: warning: ignoring return value of ‘size_t fread(void*, 
size_t, size_t, FILE*)’, declared with attribute warn_unused_result 
[-Wunused-result]
error: command 'gcc' failed with exit status 1

$ tesseract --version
tesseract 3.02
 leptonica-1.68
  libgif 4.1.6 : libjpeg 8b : libpng 1.5.10 : libtiff 4.0.1 : zlib 1.2.7

Linux distro - 3.3.4-2-ARCH

Thanks for any suggestion.

Original issue reported on code.google.com by jan.plus...@gmail.com on 10 May 2012 at 2:34

GoogleCodeExporter commented 9 years ago
just delete tprintf.h will do

Original comment by FreeT...@gmail.com on 10 May 2012 at 2:41

GoogleCodeExporter commented 9 years ago

Original comment by FreeT...@gmail.com on 12 May 2012 at 7:24