jacklicn / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

configure : error: leptonica library missing #563

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.installed leptonica 1.68 according to the instructions, received no errors
2../autogen.sh
3../configure

What is the expected output? What do you see instead?
See attached file.  Problem is at end of configure, there is an error:  
leptonica library missing.

What version of the product are you using? On what operating system?
tesseract-3.01 on linux mint 11.

Please provide any additional information below.
I first installed leptonica from the software source for Ubuntu.  When I got 
the initial error (the same as this last one), I went back installed leptonica 
1.68 using configure, make, make install.  It seemed to be successful.

Original issue reported on code.google.com by dougschm...@gmail.com on 27 Oct 2011 at 3:37

Attachments:

GoogleCodeExporter commented 9 years ago
please post config.log

Original comment by zde...@gmail.com on 27 Oct 2011 at 6:12

GoogleCodeExporter commented 9 years ago
Here's the config.log

Original comment by dougschm...@gmail.com on 28 Oct 2011 at 1:42

Attachments:

GoogleCodeExporter commented 9 years ago
Did you try to run leptonica program?
If you look at config.log, you can see you have problem with leptonica 
instalation:

/usr/lib64/liblept.so: undefined reference to `TIFFWriteScanline'
/usr/lib64/liblept.so: undefined reference to `png_create_read_struct'
/usr/lib64/liblept.so: undefined reference to `jpeg_destroy'
/usr/lib64/liblept.so: undefined reference to `jpeg_simple_progression'
/usr/lib64/liblept.so: undefined reference to `png_set_pHYs'

Did you install (devel) libtiff, libpng libjpeg  libraries?

Original comment by zde...@gmail.com on 28 Oct 2011 at 6:12

GoogleCodeExporter commented 9 years ago
Found here (and worked for me): 
http://code.google.com/p/tesseract-ocr/wiki/ReadMe

"leptonica library missing"

For those on Ubuntu Natty 11.04, I had to add these to the top of my configure 
file:

CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"

Original comment by nkam...@gmail.com on 2 Nov 2011 at 11:20

GoogleCodeExporter commented 9 years ago
For those on Debian 6 (Squeeze) the modification of configure file works also 
fine.

Original comment by derhecht...@googlemail.com on 15 Nov 2011 at 4:32

GoogleCodeExporter commented 9 years ago
you do not have to modify configure! Just try:

LIBLEPT_HEADERSDIR=/usr/local/include ./configure

or:
CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure

I put it to FAQ wiki

Original comment by zde...@gmail.com on 16 Nov 2011 at 8:52

GoogleCodeExporter commented 9 years ago
Perhaps there's something wrong with Debianised leptonica; I suspect it should 
depend upon the PNG/JPEG/TIFF libraries (beyond just "Depends: ...") but it 
doesn't seem to:

 root@mrnoisy:~# ldd /usr/lib/liblept.so
    linux-vdso.so.1 =>  (0x00007fff8bc69000)
    libc.so.6 => /lib/libc.so.6 (0x00007ff9aaa71000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff9ab12f000)

My workaround:

 CXXFLAGS="-ltiff -lpng -ljpeg" CPPFLAGS="-ltiff -lpng -ljpeg" ./configure

Original comment by iwil...@iwilcox.me.uk on 16 Apr 2012 at 7:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I understood nothing bout' it. D:

Just tryed comment #6 option 2 and it 'configured'. Don't know if it will work 
:P
Thanks anyway..

Original comment by jfcandid...@gmail.com on 8 Jul 2012 at 7:15

GoogleCodeExporter commented 9 years ago
I 'm using Ubuntu 10.04.3 LTS and comment #6 option 2 also works 

Original comment by aro.rana...@gmail.com on 28 Aug 2012 at 2:52

GoogleCodeExporter commented 9 years ago
Just want to add my system that I forgot (comment #9 
http://code.google.com/p/tesseract-ocr/issues/detail?id=563#c7):

Debian GNU/Linux (6.0 / Squeeze), applied only security updates.

Late report: it didn't work (`make install`). My system didn't recognize it - I 
guess it's my own fault for not knowing how to make it work. But the comment #6 
- option 2 should work for everybody else (I guess) with the same problem.

Original comment by jfcandid...@gmail.com on 28 Aug 2012 at 3:48

GoogleCodeExporter commented 9 years ago
Hi,
Did anyone of you solve that problem?

configure:17096: checking for leptonica
configure:17115: result: yes
configure:17117: checking for pixCreate in -llept
configure:17142: g++ -o conftest -g -O2  -I/usr/include/leptonica  conftest.cpp 
-llept  -lpthread  >&5
/usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/liblept.so: undefined 
reference to `TIFFWriteScanline'
/usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/liblept.so: undefined 
reference to `png_create_read_struct'
/usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/liblept.so: undefined 
reference to `jpeg_destroy'
/usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/liblept.so: undefined 
reference to `jpeg_simple_progression'

Regards,
Grzegorz

Original comment by gbaj...@gmail.com on 9 Jan 2013 at 2:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
replay #7 is really help, but just set "-ltiff -lpng -ljpeg" is not enough.
I have to add  "-lz" (libz.so) so solve the problem(Mageia 2 64bit).

config.log is very detailed!

Original comment by psw...@gmail.com on 27 Jan 2013 at 2:17

GoogleCodeExporter commented 9 years ago
replay #7 is really help, but just set "-ltiff -lpng -ljpeg" is not enough.
I have to add  "-lz" (libz.so)also to solve the problem(Mageia 2 64bit).

config.log is very detailed!

Additional, setting CXXFLAGS="-ltiff -lpng -ljpeg" CPPFLAGS="-ltiff -lpng 
-ljpeg" will cause the configure to use the lib twice. So I used 
CXXFLAGS="-ltiff -lpng -ljpeg -lz". Don't use CPPFLAG, it will cause problem in 
the make progress.

Original comment by psw...@gmail.com on 27 Jan 2013 at 2:23