gregjurman/tesserwrap — Issue #4: Build error on ubuntu
Author: caseman
Created: 2012-02-12 05:22:21+00:00
State: open

I get this building tesserwrap from pypi and git against tesseract 2.04, boost 1.46.1, and python 2.7.2

$ python setup.py install
running install
running bdist_egg
running egg_info
creating tesserwrap.egg-info
writing tesserwrap.egg-info/PKG-INFO
writing top-level names to tesserwrap.egg-info/top_level.txt
writing dependency_links to tesserwrap.egg-info/dependency_links.txt
writing manifest file 'tesserwrap.egg-info/SOURCES.txt'
reading manifest file 'tesserwrap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: manifest_maker: MANIFEST.in, line 1: 'recursive-include' expects ...

writing manifest file 'tesserwrap.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/tesserwrap
copying tesserwrap/tesseract.py -> build/lib.linux-x86_64-2.7/tesserwrap
copying tesserwrap/__init__.py -> build/lib.linux-x86_64-2.7/tesserwrap
running build_ext
building 'libtesserwrap' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/tesserwrap
creating build/temp.linux-x86_64-2.7/tesserwrap/cpp
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include/python2.7 -c tesserwrap/cpp/tesseract_wrap.cpp -o build/temp.linux-x86_64-2.7/tesserwrap/cpp/tesseract_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
In file included from tesserwrap/cpp/tesseract_wrap.cpp:1:0:
tesserwrap/cpp/tesseract_wrap.h:7:17: error: ‘tesseract’ is not a namespace-name
tesserwrap/cpp/tesseract_wrap.h:7:26: error: expected namespace-name before ‘;’ token
tesserwrap/cpp/tesseract_wrap.h: In member function ‘int TessBaseAPIExt::Get_Rect_Left()’:
tesserwrap/cpp/tesseract_wrap.h:20:42: error: ‘class TessBaseAPIExt’ has no member named ‘rect_left_’
tesserwrap/cpp/tesseract_wrap.h: In member function ‘int TessBaseAPIExt::Get_Rect_Top()’:
tesserwrap/cpp/tesseract_wrap.h:21:41: error: ‘class TessBaseAPIExt’ has no member named ‘rect_top_’
tesserwrap/cpp/tesseract_wrap.h: In member function ‘int TessBaseAPIExt::Get_Rect_Width()’:
tesserwrap/cpp/tesseract_wrap.h:22:43: error: ‘class TessBaseAPIExt’ has no member named ‘rect_width_’
tesserwrap/cpp/tesseract_wrap.h: In member function ‘int TessBaseAPIExt::Get_Rect_Height()’:
tesserwrap/cpp/tesseract_wrap.h:23:44: error: ‘class TessBaseAPIExt’ has no member named ‘rect_height_’
tesserwrap/cpp/tesseract_wrap.h: At global scope:
tesserwrap/cpp/tesseract_wrap.h:35:25: error: ‘PageSegMode’ has not been declared
tesserwrap/cpp/tesseract_wrap.h:36:5: error: ‘PageSegMode’ does not name a type
tesserwrap/cpp/tesseract_wrap.cpp: In constructor ‘Tesserwrap::Tesserwrap(const char*, const char*)’:
tesserwrap/cpp/tesseract_wrap.cpp:11:26: error: no matching function for call to ‘TessBaseAPIExt::Init(const char*&, const char*&)’
tesserwrap/cpp/tesseract_wrap.cpp:11:26: note: candidate is:
/usr/include/tesseract/baseapi.h:62:14: note: static int TessBaseAPI::Init(const char*, const char*, const char*, bool, int, char**)
/usr/include/tesseract/baseapi.h:62:14: note: candidate expects 6 arguments, 2 provided
tesserwrap/cpp/tesseract_wrap.cpp: At global scope:
tesserwrap/cpp/tesseract_wrap.cpp:29:1: error: ‘PageSegMode’ does not name a type
tesserwrap/cpp/tesseract_wrap.cpp:34:33: error: variable or field ‘SetPageSegMode’ declared void
tesserwrap/cpp/tesseract_wrap.cpp:34:33: error: ‘PageSegMode’ was not declared in this scope
tesserwrap/cpp/tesseract_wrap.cpp: In member function ‘void Tesserwrap::SetImage(std::string, int, int)’:
tesserwrap/cpp/tesseract_wrap.cpp:45:8: error: ‘class TessBaseAPIExt’ has no member named ‘SetImage’
tesserwrap/cpp/tesseract_wrap.cpp:46:8: error: ‘class TessBaseAPIExt’ has no member named ‘SetRectangle’
tesserwrap/cpp/tesseract_wrap.cpp: In member function ‘void Tesserwrap::Clear()’:
tesserwrap/cpp/tesseract_wrap.cpp:51:8: error: ‘class TessBaseAPIExt’ has no member named ‘Clear’
tesserwrap/cpp/tesseract_wrap.cpp: In member function ‘void Tesserwrap::SetRectangle(int, int, int, int)’:
tesserwrap/cpp/tesseract_wrap.cpp:55:8: error: ‘class TessBaseAPIExt’ has no member named ‘SetRectangle’
tesserwrap/cpp/tesseract_wrap.cpp: In member function ‘std::string Tesserwrap::GetUTF8Text()’:
tesserwrap/cpp/tesseract_wrap.cpp:60:22: error: ‘class TessBaseAPIExt’ has no member named ‘GetUTF8Text’
tesserwrap/cpp/tesseract_wrap.cpp: In function ‘void init_module_libtesserwrap()’:
tesserwrap/cpp/tesseract_wrap.cpp:72:11: error: ‘PageSegMode’ was not declared in this scope
tesserwrap/cpp/tesseract_wrap.cpp:72:22: error: template argument 1 is invalid
tesserwrap/cpp/tesseract_wrap.cpp:73:24: error: ‘PSM_AUTO’ was not declared in this scope
tesserwrap/cpp/tesseract_wrap.cpp:74:33: error: ‘PSM_SINGLE_COLUMN’ was not declared in this scope
tesserwrap/cpp/tesseract_wrap.cpp:75:32: error: ‘PSM_SINGLE_BLOCK’ was not declared in this scope
tesserwrap/cpp/tesseract_wrap.cpp:76:31: error: ‘PSM_SINGLE_LINE’ was not declared in this scope
tesserwrap/cpp/tesseract_wrap.cpp:77:31: error: ‘PSM_SINGLE_WORD’ was not declared in this scope
tesserwrap/cpp/tesseract_wrap.cpp:78:31: error: ‘PSM_SINGLE_CHAR’ was not declared in this scope
tesserwrap/cpp/tesseract_wrap.cpp:79:25: error: ‘PSM_COUNT’ was not declared in this scope
tesserwrap/cpp/tesseract_wrap.cpp:88:36: error: ‘GetPageSegMode’ is not a member of ‘Tesserwrap’
tesserwrap/cpp/tesseract_wrap.h: In member function ‘int TessBaseAPIExt::Get_Rect_Height()’:
tesserwrap/cpp/tesseract_wrap.h:23:57: warning: control reaches end of non-void function [-Wreturn-type]
tesserwrap/cpp/tesseract_wrap.h: In member function ‘int TessBaseAPIExt::Get_Rect_Width()’:
tesserwrap/cpp/tesseract_wrap.h:22:55: warning: control reaches end of non-void function [-Wreturn-type]
tesserwrap/cpp/tesseract_wrap.h: In member function ‘int TessBaseAPIExt::Get_Rect_Top()’:
tesserwrap/cpp/tesseract_wrap.h:21:51: warning: control reaches end of non-void function [-Wreturn-type]
tesserwrap/cpp/tesseract_wrap.h: In member function ‘int TessBaseAPIExt::Get_Rect_Left()’:
tesserwrap/cpp/tesseract_wrap.h:20:53: warning: control reaches end of non-void function [-Wreturn-type]
tesserwrap/cpp/tesseract_wrap.cpp: In member function ‘std::string Tesserwrap::GetUTF8Text()’:
tesserwrap/cpp/tesseract_wrap.cpp:61:1: warning: control reaches end of non-void function [-Wreturn-type]
error: command 'gcc' failed with exit status 1

Maybe some incompatibility in this toolchain?