got "undefined symbol omp_get_thread_num" while try example "extracting orientation from Tesseract 4.0"

741 views
Skip to first unread message

Mike Zang

unread,
May 6, 2017, 11:40:56 AM5/6/17
to tesseract-ocr
Got "undefined symbol omp_get_thread_num" while try API example "extracting orientation from Tesseract 4.0" with python and tesseract-master.

Help!

Ok using tesseract command line. 
Does that mean there is some problem with my python (both 2.6 and 3.4 not work) or some other environment issues?

Mike Zang

unread,
May 7, 2017, 8:06:54 AM5/7/17
to tesseract-ocr
I update gcc to 4.8.5 to support c++ 11 before compile and install tesseract. I tried api example with 4.0 failed in this page - https://github.com/tesseract-ocr/tesseract/wiki/APIExample#c-api-in-python.
OS is Centos 6,  I compile and install tessearct exactly the way as the wiki page writes,  and I tried reinstall cffi lib of python which didn't work. Do I need to recompile&install my python with new gcc4.8 or something alse?

Somebody help!



在 2017年5月6日星期六 UTC+8下午11:40:56,Mike Zang写道:

ShreeDevi Kumar

unread,
May 7, 2017, 8:15:42 AM5/7/17
to tesser...@googlegroups.com
Most probably the API example has not been updated for tesseract 4.

There have been many changes - 
Please see https://abi-laboratory.pro/tracker/timeline/tesseract/

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/4fedfab4-9edd-4eb0-b3ce-ab3ef8ec4f83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zdenko Podobný

unread,
May 7, 2017, 10:13:28 AM5/7/17
to tesser...@googlegroups.com
His error has nothing to do with API example.
He has problem related to linking (replaced gcc after compilation?)

Zdenko

Mike Zang

unread,
May 7, 2017, 11:09:35 PM5/7/17
to tesseract-ocr
I do replace gcc just before compilation of tesseract. I wonder if need to recompile python or the lib cffi (the example used to call c api in python). Would python or cffi cause that error?
I'm not that familiar with C/C++ and also thanks for the reply.

在 2017年5月7日星期日 UTC+8下午10:13:28,zdenop写道:
His error has nothing to do with API example.
He has problem related to linking (replaced gcc after compilation?)

Zdenko

On Sun, May 7, 2017 at 2:14 PM, ShreeDevi Kumar <shree...@gmail.com> wrote:
Most probably the API example has not been updated for tesseract 4.

There have been many changes - 
Please see https://abi-laboratory.pro/tracker/timeline/tesseract/

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com
On Sun, May 7, 2017 at 5:36 PM, Mike Zang <mikez...@gmail.com> wrote:
I update gcc to 4.8.5 to support c++ 11 before compile and install tesseract. I tried api example with 4.0 failed in this page - https://github.com/tesseract-ocr/tesseract/wiki/APIExample#c-api-in-python.
OS is Centos 6,  I compile and install tessearct exactly the way as the wiki page writes,  and I tried reinstall cffi lib of python which didn't work. Do I need to recompile&install my python with new gcc4.8 or something alse?

Somebody help!



在 2017年5月6日星期六 UTC+8下午11:40:56,Mike Zang写道:
Got "undefined symbol omp_get_thread_num" while try API example "extracting orientation from Tesseract 4.0" with python and tesseract-master.

Help!

Ok using tesseract command line. 
Does that mean there is some problem with my python (both 2.6 and 3.4 not work) or some other environment issues?

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.

To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

ShreeDevi Kumar

unread,
May 7, 2017, 11:16:24 PM5/7/17
to tesser...@googlegroups.com
​Have you updated the following in the example to the path in your setup ...

PATH_TO_LIBTESS = '/path/to/development/libtesseract.so'


ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.

To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

Zdenko Podobný

unread,
May 8, 2017, 2:20:20 AM5/8/17
to tesser...@googlegroups.com
IMO it depends how to "replaced" gcc. If you used standard tools of your distribution (rpm/apt-get etc) - they should take care about all dependencies. Otherwise you will need to recompile a lot of things. Changing compiler (with change of of the major version of it) is significant change of system.

BTW: omp_get_thread_num is provided by gcc/libcomp[1] as part of OpenMP implementation, so make sure that your gcc replacement provide this feature.

To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.

To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
Reply all
Reply to author
Forward
0 new messages