Closed GoogleCodeExporter closed 8 years ago
Looks like centos by default has python 2.6, and this error is python 2.6. I
installed python 2.7 and now am getting a compile.
BUT the same setp now with
python2.7 setup.py build
gives me errors.
The first error is
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
ret
So perhaps the opencv steps are incomplete. Looking for this fix now.
Evan
Original comment by EvanChar...@gmail.com
on 30 May 2014 at 6:47
Hello, to fix this path I found the opencv.pc file
cd /
su
find . -name "opencv.pc" -print
and then did the following (not including the file).
export PKG_CONFIG_PATH=/path/to/the/file
That fixed the opencv issue
but now I have the following compile issues in C++ .. ideas?
running build
running build_ext
building '_tesseract' extension
swigging tesseract.i to tesseract_wrap.cpp
swig -python -c++ -I/usr/include/tesseract -I/usr/include/leptonica
-I/usr/include/opencv2 -o tesseract_wrap.cpp tesseract.i
/usr/include/tesseract/pageiterator.h:81: Warning(362): operator= ignored
/usr/include/tesseract/publictypes.h:82: Warning(462): Unable to set
dimensionless array variable
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -fPIC -I. -I/usr/include/tesseract -I/usr/include/leptonica
-I/usr/include/opencv2 -I/usr/local/include/python2.7 -c tesseract_wrap.cpp -o
build/temp.linux-x86_64-2.7/tesseract_wrap.o -Wall -O0 -funroll-loops -g
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
^P^Ptesseract_wrap.cpp: In function ‘PyObject*
_wrap_TessBaseAPI_SetImage__SWIG_1(PyObject*, PyObject*)’:
tesseract_wrap.cpp:149828: error: invalid conversion from ‘const Pix*’ to
‘Pix*’
tesseract_wrap.cpp:149828: error: initializing argument 1 of ‘void
tesseract::TessBaseAPI::SetImage(Pix*)’
tesseract_wrap.cpp: In function ‘PyObject*
_wrap_TessBaseAPI_ProcessPages__SWIG_0(PyObject*, PyObject*)’:
tesseract_wrap.cpp:150761: error: no matching function for call to
‘tesseract::TessBaseAPI::ProcessPages(const char*, const char*, int&,
STRING*&)’
/usr/include/tesseract/baseapi.h:529: note: candidates are: bool
tesseract::TessBaseAPI::ProcessPages(const char*, const char*, int,
tesseract::TessResultRenderer*)
tesseract_wrap.cpp: In function ‘PyObject*
_wrap_TessBaseAPI_ProcessPage__SWIG_0(PyObject*, PyObject*)’:
tesseract_wrap.cpp:150977: error: no matching function for call to
‘tesseract::TessBaseAPI::ProcessPage(Pix*&, int&, const char*, const char*,
int&, STRING*&)’
/usr/include/tesseract/baseapi.h:542: note: candidates are: bool
tesseract::TessBaseAPI::ProcessPage(Pix*, int, const char*, const char*, int,
tesseract::TessResultRenderer*)
/usr/include/tesseract/capi.h: In function ‘PyObject*
_wrap_TessTextRendererCreate(PyObject*, PyObject*)’:
/usr/include/tesseract/capi.h:101: error: too few arguments to function
‘TessResultRenderer* TessTextRendererCreate(const char*)’
tesseract_wrap.cpp:152268: error: at this point in file
/usr/include/tesseract/capi.h: In function ‘PyObject*
_wrap_TessHOcrRendererCreate(PyObject*, PyObject*)’:
/usr/include/tesseract/capi.h:102: error: too few arguments to function
‘TessResultRenderer* TessHOcrRendererCreate(const char*)’
tesseract_wrap.cpp:152281: error: at this point in file
/usr/include/tesseract/capi.h: In function ‘PyObject*
_wrap_TessPDFRendererCreate(PyObject*, PyObject*)’:
/usr/include/tesseract/capi.h:103: error: too few arguments to function
‘TessResultRenderer* TessPDFRendererCreate(const char*, const char*)’
tesseract_wrap.cpp:152304: error: at this point in file
/usr/include/tesseract/capi.h: In function ‘PyObject*
_wrap_TessUnlvRendererCreate(PyObject*, PyObject*)’:
/usr/include/tesseract/capi.h:104: error: too few arguments to function
‘TessResultRenderer* TessUnlvRendererCreate(const char*)’
tesseract_wrap.cpp:152319: error: at this point in file
/usr/include/tesseract/capi.h: In function ‘PyObject*
_wrap_TessBoxTextRendererCreate(PyObject*, PyObject*)’:
/usr/include/tesseract/capi.h:105: error: too few arguments to function
‘TessResultRenderer* TessBoxTextRendererCreate(const char*)’
tesseract_wrap.cpp:152332: error: at this point in file
tesseract_wrap.cpp: In function ‘PyObject*
_wrap_TessResultRendererAddError(PyObject*, PyObject*)’:
tesseract_wrap.cpp:152501: error: ‘TessResultRendererAddError’ was not
declared in this scope
tesseract_wrap.cpp: In function ‘PyObject*
_wrap_TessResultRendererGetOutput(PyObject*, PyObject*)’:
tesseract_wrap.cpp:152563: error: ‘TessResultRendererGetOutput’ was not
declared in this scope
Original comment by EvanChar...@gmail.com
on 30 May 2014 at 7:41
yum install python-devel -y
have u installed python-devel ?
Original comment by FreeT...@gmail.com
on 2 Jun 2014 at 12:58
Have you fixed your problem?
Original comment by FreeT...@gmail.com
on 7 Jun 2014 at 2:05
Original comment by FreeT...@gmail.com
on 11 Jun 2014 at 8:37
Original issue reported on code.google.com by
EvanChar...@gmail.com
on 30 May 2014 at 5:50