Closed GoogleCodeExporter closed 8 years ago
Linux 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 20:45:39 UTC 2012 x86_64
GNU/Linux
Original comment by peter.ta...@taypeinternational.com
on 24 Apr 2012 at 8:56
You need to install libtesseract-dev
sudo apt-get install libtesseract-dev libleptonica-dev python-all-dev swig
libcv-dev
Details please refer to
http://code.google.com/p/python-tesseract/wiki/HowToCompilePythonTesseract
Original comment by FreeT...@gmail.com
on 25 Apr 2012 at 3:08
Hi,
No luck :-( I was in fact missing the OpenCV dependencies which I installed
(from a PPA which provides v2.3)
someone@somewhere:~/Downloads/tesseract/new/python-tesseract$ sudo apt-get
install libtesseract-dev libleptonica-dev python-all-dev swig libcv-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-all-dev is already the newest version.
swig is already the newest version.
libleptonica-dev is already the newest version.
libtesseract-dev is already the newest version.
The following NEW packages will be installed:
libcv-dev
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 11.8 kB of archives.
After this operation, 77.8 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://ppa.launchpad.net/gijzelaar/opencv2.3/ubuntu/ oneiric/main
libcv-dev amd64 2.3.1-4ppa1 [11.8 kB]
Fetched 11.8 kB in 0s (21.8 kB/s)
Selecting previously deselected package libcv-dev.
(Reading database ... 353106 files and directories currently installed.)
Unpacking libcv-dev (from .../libcv-dev_2.3.1-4ppa1_amd64.deb) ...
Setting up libcv-dev (2.3.1-4ppa1) ...
And then attempted to build as per the wiki...
someone@somewhere:~/Downloads/tesseract/new/python-tesseract$ python config.py
someone@somewhere:~/Downloads/tesseract/new/python-tesseract$ python setup.py
clean
Current Version : tesseract
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
running clean
someone@somewhere:~/Downloads/tesseract/new/python-tesseract$ python setup.py
build
Current Version : tesseract
===========['stdc++', 'tesseract', 'lept', 'opencv_core']===========
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
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:78: Warning(462): Unable to set
dimensionless array variable
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -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
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for
Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -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
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for
Ada/C/ObjC but not for C++ [enabled by default]
main_dummy.cpp:1:20: fatal error: mfcpch.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
Any thoughts?
Original comment by peter.ta...@taypeinternational.com
on 25 Apr 2012 at 5:21
try comment out mfcpch.h in main_dummy.cpp.
It is not a must in Unix
Original comment by FreeT...@gmail.com
on 26 Apr 2012 at 1:44
Original comment by FreeT...@gmail.com
on 3 May 2012 at 4:50
Original issue reported on code.google.com by
peter.ta...@taypeinternational.com
on 24 Apr 2012 at 8:55