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

undefined symbol: _ZN9tesseract11TessBaseAPI8SetImageEPK3Pix on CentOS 7.1 #4

Closed
ghost opened this Issue Mar 1, 2016 · 3 comments

Comments

Projects
None yet
1 participant
@ghost

ghost commented Mar 1, 2016

[root@srv-01 ~]# python3 --version
Python 3.4.3
[root@srv-01 ~]# pip3 freeze
decorator==4.0.9
ipython==4.1.2
ipython-genutils==0.1.0
path.py==8.1.2
pexpect==4.0.1
pickleshare==0.6
ptyprocess==0.5.1
pyslibtesseract==0.0.5
simplegeneric==0.8.1
traitlets==4.1.0
[root@srv-01 ~]# uname -a
Linux srv-01 3.10.0-229.20.1.el7.x86_64 #1 SMP Tue Nov 3 19:10:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@srv-01 ~]# cat /etc/centos-release
CentOS Linux release 7.1.1503 (Core) 
[root@srv-01 ~]# python3
Python 3.4.3 (default, Jan 26 2016, 02:25:35) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyslibtesseract
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.4/site-packages/pyslibtesseract/__init__.py", line 62, in <module>
    class LibTesseract:
  File "/usr/lib/python3.4/site-packages/pyslibtesseract/__init__.py", line 64, in LibTesseract
    lib = ctypes.CDLL(my_path + '/cppcode/libpyslibtesseract.so')
  File "/usr/lib64/python3.4/ctypes/__init__.py", line 346, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/python3.4/site-packages/pyslibtesseract/cppcode/libpyslibtesseract.so: undefined symbol: _ZN9tesseract11TessBaseAPI8SetImageEPK3Pix
>>> exit()
[root@srv-01 ~]# rpm -q tesseract
tesseract-3.04.00-3.el7.x86_64
[root@srv-01 ~]# ld /usr/lib/python3.4/site-packages/pyslibtesseract/cppcode/libpyslibtesseract.so 
ld: warning: cannot find entry symbol _start; not setting start address
/usr/lib/python3.4/site-packages/pyslibtesseract/cppcode/libpyslibtesseract.so: undefined reference to `tesseract::TessBaseAPI::SetImage(Pix const*)'
[root@srv-01 ~]# readelf -s --wide /usr/lib64/libtesseract.so.3 | grep 'TessBaseAPI.*SetImage'
  3620: 00000000000b28f0     5 FUNC    GLOBAL DEFAULT   11 TessBaseAPISetImage2
  4167: 00000000000ad190   117 FUNC    GLOBAL DEFAULT   11 _ZN9tesseract11TessBaseAPI16InternalSetImageEv
  4573: 00000000000ad280    50 FUNC    GLOBAL DEFAULT   11 _ZN9tesseract11TessBaseAPI8SetImageEP3Pix
  5192: 00000000000ad210   102 FUNC    GLOBAL DEFAULT   11 _ZN9tesseract11TessBaseAPI8SetImageEPKhiiii
  5396: 00000000000b28e0     5 FUNC    GLOBAL DEFAULT   11 TessBaseAPISetImage
[root@srv-01 ~]#
@macabeus

This comment has been minimized.

Show comment
Hide comment
@macabeus

macabeus Mar 2, 2016

Owner

I don't have any idea for a solution to this error. Sorry.
Did you try to recompile the code from src/cppcode/ (and linked with the libraries lept and tesseract)? I wrote this in CMakeList file.

Owner

macabeus commented Mar 2, 2016

I don't have any idea for a solution to this error. Sorry.
Did you try to recompile the code from src/cppcode/ (and linked with the libraries lept and tesseract)? I wrote this in CMakeList file.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Mar 2, 2016

Compile from source works.
That means, the package on the PyPI need to change, compile the *.cpp files during the installation instead of use the pre-compiled binary file.

ghost commented Mar 2, 2016

Compile from source works.
That means, the package on the PyPI need to change, compile the *.cpp files during the installation instead of use the pre-compiled binary file.

@macabeus

This comment has been minimized.

Show comment
Hide comment
@macabeus

macabeus Mar 25, 2016

Owner

Fixed!

I procrastinated for several weeks, but fixed it now.

Owner

macabeus commented Mar 25, 2016

Fixed!

I procrastinated for several weeks, but fixed it now.

@macabeus macabeus closed this Mar 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment