tesseract: cannot ./configure if leptonica builded from source

If you build and install leptonica from a source, then libleptonica.so is created, but not liblept.so However tesseract ./configure scripts requires liblept.so:

(...)
checking for leptonica... yes
checking for pixCreate in **-llept**... no
configure: error: leptonica library missing

As a workaround I just link liblept.so to created libleptonica.so, but I belive that tesseract scripts should recognize if we have liblept or libleptonica installed and use proper -l… flag for pixCreate. Note that liblept.so is installed when you install leptonica from debian/ubuntu repository by e.g. apt-get install. Btw maybe it should be also fixed by leptonica guys to standarize library name no matter you build it by your own or install from repo (?).

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

Now I build and install leptonica like this:

./autobuild
./configure
make -j 
sudo make install 

and indeed liblept.so is created. However now during tesseract (branch 3.05) “make” I get:

/usr/bin/ld: tesseract-tesseractmain.o: undefined reference to symbol 'lept_free'
/usr/local/lib/liblept.so.5: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

3.05.00 build is fine.