Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: library not found for -ltesseract_api #24

Open
ZhangXinNan opened this issue Aug 22, 2017 · 1 comment
Open

ld: library not found for -ltesseract_api #24

ZhangXinNan opened this issue Aug 22, 2017 · 1 comment

Comments

@ZhangXinNan
Copy link

➜  tesserwrap git:(zxdev) python setup.py install             
ld: library not found for -ltesseract_api
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-13493.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/2.7/site-packages/

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://pythonhosted.org/setuptools/easy_install.html

Please make the appropriate changes for your system and try again.
@ZhangXinNan
Copy link
Author

/usr/local/include/tesseract/unichar.h:164:10: error: unknown type name 'string'; did you mean 'std::string'?

➜  tesserwrap git:(zxdev) ✗ sudo python setup.py install
Password:
ld: library not found for -ltesseract_api
running install
Checking .pth file support in /Library/Python/2.7/site-packages/
/usr/bin/python -E -c pass
TEST PASSED: /Library/Python/2.7/site-packages/ appears to support .pth files
running bdist_egg
running 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
reading manifest file 'tesserwrap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'tesserwrap.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.11-intel/egg
running install_lib
running build_py
creating build/lib.macosx-10.11-intel-2.7
creating build/lib.macosx-10.11-intel-2.7/tesserwrap
copying tesserwrap/__init__.py -> build/lib.macosx-10.11-intel-2.7/tesserwrap
copying tesserwrap/core.py -> build/lib.macosx-10.11-intel-2.7/tesserwrap
running build_ext
building 'libtesserwrap' extension
creating build/temp.macosx-10.11-intel-2.7
creating build/temp.macosx-10.11-intel-2.7/tesserwrap
creating build/temp.macosx-10.11-intel-2.7/tesserwrap/cpp
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c tesserwrap/cpp/tesseract_ext.cpp -o build/temp.macosx-10.11-intel-2.7/tesserwrap/cpp/tesseract_ext.o
In file included from tesserwrap/cpp/tesseract_ext.cpp:1:
In file included from tesserwrap/cpp/tesseract_ext.h:1:
In file included from /usr/local/include/tesseract/baseapi.h:31:
In file included from /usr/local/include/tesseract/resultiterator.h:26:
In file included from /usr/local/include/tesseract/ltrresultiterator.h:26:
/usr/local/include/tesseract/unichar.h:164:10: error: unknown type name 'string'; did you mean 'std::string'?
  static string UTF32ToUTF8(const std::vector<char32>& str32);
         ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:194:65: note: 
      'std::string' declared here
typedef basic_string<char, char_traits<char>, allocator<char> > string;
                                                                ^
tesserwrap/cpp/tesseract_ext.cpp:26:31: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to
      'size_t' (aka 'unsigned long') [-Wshorten-64-to-32]
   std::memcpy(picture, data, size);
   ~~~                        ^~~~
tesserwrap/cpp/tesseract_ext.cpp:27:29: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to
      'int' [-Wshorten-64-to-32]
   super::SetImage(picture, width, height, 1, width);
   ~~~~~                    ^~~~~
tesserwrap/cpp/tesseract_ext.cpp:27:36: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to
      'int' [-Wshorten-64-to-32]
   super::SetImage(picture, width, height, 1, width);
   ~~~~~                           ^~~~~~
tesserwrap/cpp/tesseract_ext.cpp:27:47: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to
      'int' [-Wshorten-64-to-32]
   super::SetImage(picture, width, height, 1, width);
   ~~~~~                                      ^~~~~
tesserwrap/cpp/tesseract_ext.cpp:28:29: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to
      'int' [-Wshorten-64-to-32]
   this->SetRectangle(0, 0, width, height);
   ~~~~                     ^~~~~
tesserwrap/cpp/tesseract_ext.cpp:28:36: warning: implicit conversion loses integer precision: 'uint64_t' (aka 'unsigned long long') to
      'int' [-Wshorten-64-to-32]
   this->SetRectangle(0, 0, width, height);
   ~~~~                            ^~~~~~
6 warnings and 1 error generated.
error: command 'cc' failed with exit status 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant