leptonica libs - building with tiff support

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

leptonica libs - building with tiff support

#1 Post by Dingo »

Dear puppians (I think this forum is proper for this question, but, if not, feel free to move to more proper location)

Few days ago I started compiling

*Jbig2enc*
- http://github.com/agl/jbig2enc
- http://en.wikipedia.org/wiki/JBIG2

requiring *leptonica libs*

I downloaded Jbig2enc 0.27 source code
http://github.com/agl/jbig2enc/tarball/0.27

needing
*leptonica libs 1.58*
- http://leptonica.googlecode.com/files/l ... .58.tar.gz

In order to build leptonica, We needs also three deps

libpng12-dev, libjpeg62-dev, libtiff4-dev

I downloaded and installed

started leptonica compiling, but config log shows a warning about tiff support

configure: WARNING: TIFF support is disabled

but libtiff exists in /usr/lib, so I started ./configure with this switch:

./configure --with-libtiff=/usr/lib

but, again:

checking for Leffler libtiff library... checking linking with /usr/lib/libtiff/lib/libtiff.a... no
configure: WARNING: TIFF support is disabled


I can build anyway leptonica libs (and then Jbi2enc), but without tiff support. Have anyone any idea to solve this problem? excuse me for annoying with my compilation tales 8)
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

dsb
Posts: 2
Joined: Thu 21 Jan 2010, 21:59

#2 Post by dsb »

I assume you're doing ./configure, etc.

When you run .configure, if it finds the tiff library, it will write out
something like this:

checking for Leffler libtiff library... checking linking with -ltiff... ok
setting LIBTIFF_CFLAGS=
setting LIBTIFF_LIBS=-ltiff

If you then look at config_auto.h, you should find this:

/* Define if you have the www.libtiff.org LIBTIFF library. */
#define HAVE_LIBTIFF 1



Perhaps your libtiff or include files are not on your search path.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#3 Post by disciple »

:(
I had that problem or something extremely similar, I'm pretty sure it was with leptonica, although it could have been with ocropus or iulib or something else used by ocropus or tesseract.
IIRC it was a bug in whatever I was trying to compile, although I can't seem to find the bug report again.
I gave up :(

Please post a -dev package for leptonica if you do get it working, that way we can build other things that use it.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

dsb
Posts: 2
Joined: Thu 21 Jan 2010, 21:59

#4 Post by dsb »

Dingo, another thing you can do is build leptonica using the built-in makefile.

This doesn't use config_auto.h. Instead, configuration is done in the file environ.h. It is pre-set to use the tiff library. So just type 'make' in the src directory to build the library, and then try to build any (or all) of the programs in the prog directory (type 'make' there also). If the tiff library links, it should be obvious how to get your jbig2enc to link as well.

There have been some reports of people having problems linking leptonica with ocropus -- AFAIK, they are all due to ocropus configuration errors.

Finally, you can build jbig2enc with any recent version of leptonica and I'd suggest using the most recent, which is 1.64.

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#5 Post by Dingo »

dsb, I tried as you suggested, and jbig2enc seems fully working also with tiff images so i attach liblept.a in 1.58 and 1.64 version (latest), even I'm not sure that I rightly built, but the fact that jbig2enc works encourages me

leptonica-libs 1.58
leptonica-libs 1.64

I built jbig2enc upon leptonica 1.58 since trying to build with 1.64 gives some errors (related to jbig2enc)
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

Post Reply