Tesseract: Compiling in linux with OpenCL and leptonica

Created on 18 Mar 2016  路  5Comments  路  Source: tesseract-ocr/tesseract

The goal is to run an AWS Amazon instance (Ubuntu 14.04) with GPU support to test the difference in OCR speed with a large GPU. I have Nvidia drivers and OpenCL installed.
Ive downloaded, compiled and installed leptonica 1.73 (latest version), downloaded the latest tesseract source. I run autogen then ./configure --enable-opencl but get the following error.

checking for leptonica... yes
checking for l_generateCIDataForPdf in -llept... no
configure: error: leptonica library with pdf support (>= 1.71) is missing

Ive searched for at least 4 hours for the answer to this but have had no luck. Im not a programmer so am not that familiar with the use or locations of lib files. This is probably just a variable problem but I cant find any reference to it.

build_process

Most helpful comment

Hello @dthrock ,

I've got exactly the same proble, on Ubuntu 14.04.

I had to go to leptonica site, download the source and build it.

After that, I run ./configure --with-extra-includes=/usr/local/include and --with-extra-libaries=/usr/local/lib

Hope it would help you.

All 5 comments

Message is IMO clear: there is no leptonica >= 1.71 in standard location. This is not tesseract problem.

Hello @dthrock ,

I've got exactly the same proble, on Ubuntu 14.04.

I had to go to leptonica site, download the source and build it.

After that, I run ./configure --with-extra-includes=/usr/local/include and --with-extra-libaries=/usr/local/lib

Hope it would help you.

I have the same problem, while leptonica-1.74.1, mac OS 10.12.3 (16D32)

localhost:tesseract-4.00.00alpha didi$ brew install leptonica
Updating Homebrew...
Warning: leptonica-1.74.1 already installed

solve this problem by this command:
CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure

@vitamin thank u. your suggestion solved my issue too .

@vitamin's suggestion works for MacPorts users too. For example if you are using the default installation:

CPPFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib" ./configure
Was this page helpful?
0 / 5 - 0 ratings

Related issues

johnthagen picture johnthagen  路  6Comments

garry-ut99 picture garry-ut99  路  5Comments

samiles picture samiles  路  4Comments

eliyaz-kl picture eliyaz-kl  路  4Comments

YeisonVelez11 picture YeisonVelez11  路  5Comments