configure: error: Required OpenCL library not found!

159 views
Skip to first unread message

C493d

unread,
Apr 29, 2019, 11:15:58 AM4/29/19
to tesseract-ocr
I get this while running ./configure with the OpenCL option (checking for clGetPlatformIDs in -lOpenCL... no)
Any ideas how to fix this?

Zdenko Podobny

unread,
Apr 29, 2019, 11:17:00 AM4/29/19
to tesser...@googlegroups.com
Install OpenCL?

Zdenko


po 29. 4. 2019 o 17:15 C493d <caged...@gmail.com> napísal(a):
I get this while running ./configure with the OpenCL option (checking for clGetPlatformIDs in -lOpenCL... no)
Any ideas how to fix this?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/77df15ce-e3d9-4651-8c23-da3c9f2d1e04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

C493d

unread,
Apr 29, 2019, 11:24:10 AM4/29/19
to tesseract-ocr
I have the headers installed and the OpenCL files that come with CUDA


On Monday, 29 April 2019 18:17:00 UTC+3, zdenop wrote:
Install OpenCL?

Zdenko


po 29. 4. 2019 o 17:15 C493d <caged...@gmail.com> napísal(a):
I get this while running ./configure with the OpenCL option (checking for clGetPlatformIDs in -lOpenCL... no)
Any ideas how to fix this?

--
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 tesser...@googlegroups.com.

Zdenko Podobny

unread,
Apr 29, 2019, 11:48:28 AM4/29/19
to tesser...@googlegroups.com
Than try to set variable OPENCL_INC to opencl header directory (above CL/cl.h or OpenCL/cl.h)
If it does not help try to set  opencl header directory to AM_CPPFLAGS.

Zdenko


po 29. 4. 2019 o 17:24 C493d <caged...@gmail.com> napísal(a):
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.

C493d

unread,
Apr 29, 2019, 2:21:01 PM4/29/19
to tesseract-ocr
I tried "export OPENCL_INC=/usr/include" and "export AM_CPPFLAGS=/usr/include/CL",
also tried changing inside configure.ac before running ./autogen.sh but no luck


On Monday, 29 April 2019 18:48:28 UTC+3, zdenop wrote:
Than try to set variable OPENCL_INC to opencl header directory (above CL/cl.h or OpenCL/cl.h)
If it does not help try to set  opencl header directory to AM_CPPFLAGS.

Zdenko


po 29. 4. 2019 o 17:24 C493d <caged...@gmail.com> napísal(a):
I have the headers installed and the OpenCL files that come with CUDA

On Monday, 29 April 2019 18:17:00 UTC+3, zdenop wrote:
Install OpenCL?

Zdenko


po 29. 4. 2019 o 17:15 C493d <caged...@gmail.com> napísal(a):
I get this while running ./configure with the OpenCL option (checking for clGetPlatformIDs in -lOpenCL... no)
Any ideas how to fix this?

--
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 tesser...@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/77df15ce-e3d9-4651-8c23-da3c9f2d1e04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 tesser...@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

C493d

unread,
Apr 29, 2019, 2:23:22 PM4/29/19
to tesseract-ocr
Also tried "CPPFLAGS+=-I/usr/include/CL/ ./configure --enable-opencl" didn't work either

Zdenko Podobny

unread,
Apr 29, 2019, 2:38:42 PM4/29/19
to tesser...@googlegroups.com
Please provide output of:
ls -l  usr/include/CL 
+ attach (compressed) config.log
 
BTW:  if do not plan to contribute to OpenCL part of tesseract do not waste time with its compilation. It does not bring you expected speed increase  + there are long term not fixed issues (search issue tracked )

Zdenko


po 29. 4. 2019 o 20:23 C493d <caged...@gmail.com> napísal(a):
--
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.

C493d

unread,
Apr 29, 2019, 4:25:17 PM4/29/19
to tesseract-ocr
Would it not increase inference speed? I'm looking for anything that may help with that

C493d

unread,
Apr 29, 2019, 4:43:44 PM4/29/19
to tesseract-ocr
(base) compute@instance-1:~$ ls -l  /usr/include/CL
total 840
-rw-r--r-- 1 root root  75474 Feb 21  2018 cl.h
-rw-r--r-- 1 root root 307101 Jan 25  2018 cl.hpp
-rw-r--r-- 1 root root 304701 Jan 25  2018 cl2.hpp
-rw-r--r-- 1 root root   5122 Feb 21  2018 cl_d3d10.h
-rw-r--r-- 1 root root   5116 Feb 21  2018 cl_d3d11.h
-rw-r--r-- 1 root root   5421 Feb 21  2018 cl_dx9_media_sharing.h
-rw-r--r-- 1 root root   7858 Feb 21  2018 cl_dx9_media_sharing_intel.h
-rw-r--r-- 1 root root   5358 Feb 21  2018 cl_egl.h
-rw-r--r-- 1 root root  28709 Feb 23  2018 cl_ext.h
-rw-r--r-- 1 root root  19862 Feb 21  2018 cl_ext_intel.h
-rw-r--r-- 1 root root   7583 Feb 21  2018 cl_gl.h
-rw-r--r-- 1 root root   2869 Feb 21  2018 cl_gl_ext.h
-rw-r--r-- 1 root root  47247 Feb 23  2018 cl_platform.h
-rw-r--r-- 1 root root   7594 Feb 21  2018 cl_va_api_media_sharing_intel.h
-rw-r--r-- 1 root root   1993 Feb 21  2018 opencl.h



config.zip

Zdenko Podobny

unread,
Apr 30, 2019, 2:23:16 AM4/30/19
to tesser...@googlegroups.com
Simple answer is yes and no. Yes it will increase speed of some function related to image reading (AFAIR only for tiff) and processing, but not for OCR (the slowest part of whole process). And you will face new issues.

Search forums (user and dev) and issue tracker for more details.

Zdenko


po 29. 4. 2019 o 22:25 C493d <caged...@gmail.com> napísal(a):
Would it not increase inference speed? I'm looking for anything that may help with that

--
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.

Zdenko Podobny

unread,
Apr 30, 2019, 3:48:39 PM4/30/19
to tesser...@googlegroups.com
Ok. Header file are correctly found, but test program is not able to find opencl library for linking:
/usr/bin/ld: cannot find -lOpenCL

Zdenko


po 29. 4. 2019 o 22:43 C493d <caged...@gmail.com> napísal(a):
--
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.

C493d

unread,
May 1, 2019, 6:56:48 AM5/1/19
to tesseract-ocr
/usr/bin/ld: cannot find -lOpenCL

How can I fix this? Any parameter I can pass? 

Zdenko Podobny

unread,
May 1, 2019, 7:37:16 AM5/1/19
to tesser...@googlegroups.com
this means that linker is not able to find opencl library...
Do you know nvidia opencl library and its location?

Zdenko


st 1. 5. 2019 o 12:56 C493d <caged...@gmail.com> napísal(a):
/usr/bin/ld: cannot find -lOpenCL

How can I fix this? Any parameter I can pass? 

--
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.

C493d

unread,
May 1, 2019, 8:28:18 AM5/1/19
to tesseract-ocr
Yes, I made a symbolic link from it to /usr/include/CL which is why it's strange tesseract can't find it
(it was at /usr/local/cuda-10.0/targets/x86_64-linux/include/CL)


On Wednesday, 1 May 2019 14:37:16 UTC+3, zdenop wrote:
this means that linker is not able to find opencl library...
Do you know nvidia opencl library and its location?

Zdenko


st 1. 5. 2019 o 12:56 C493d <caged...@gmail.com> napísal(a):
/usr/bin/ld: cannot find -lOpenCL

How can I fix this? Any parameter I can pass? 

--
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 tesser...@googlegroups.com.

JB Data31

unread,
May 1, 2019, 10:01:32 AM5/1/19
to tesser...@googlegroups.com
If my memories are goods you have to combine 2 options :
-L <the path of the libs>
-l <"the name" of the lib>, "the name" because -lxxx correspond to a file libxxx.a or libxxx.so, depend on static or dynamic file.

-lOpenCL correspond to a file libopencl.[a,so] , did you do the case-insensitive command find / -iname "*opencl*" -print to locate the lib file ?

@JBΔ



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.

jbda...@gmail.com

unread,
May 3, 2019, 8:54:15 AM5/3/19
to tesseract-ocr
I need to compile, by the way I use OpenCL.
My roadact on Ubuntu:

sudo apt-get install opencl-headers
sudo apt install ocl-icd-opencl-dev
export LDFLAGS=-L/usr/lib/x86_64-linux-gnu
./configure --enable-debug --enable-opencl
...
Configuration is done.
You can now build and install tesseract by running:

Make fails when linking because there is no CUDA (Virtual Machine for me) but your CUDA is OK, so...

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

C493d

unread,
May 5, 2019, 4:45:41 AM5/5/19
to tesseract-ocr
Thanks, I found it under /usr/local/cuda-10.0/targets/x86_64-linux/lib/ and added it "export LDFLAGS=-L/usr/local/cuda-10.0/targets/x86_64-linux/lib/" worked
Reply all
Reply to author
Forward
0 new messages