Leptonica conflicts with DirectAdmin?

PaulEm

New member
Joined
Mar 21, 2012
Messages
4
Hi,

I'm currently having issues installing tesseract with leptonica on CentOS 5.5.
On a clean install of CentOS i can succesfully install tesseract using the following tutorial:
http://paramountideas.com/tesseract-ocr-30-and-leptonica-installation-centos-55-and-opensuse-113

When I try to perform this installation on a CentOS 5.5 machine with DirectAdmin running on it I get errors while executing "make" for leptonica. It gives me the following error:

Code:
./.libs/liblept.so: undefined reference to `png_destroy_read_struct@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_text@PNG12_0'
./.libs/liblept.so: undefined reference to `png_create_info_struct@PNG12_0'
./.libs/liblept.so: undefined reference to `png_set_compression_level@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_rowbytes@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_PLTE@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_rows@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_image_width@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_y_pixels_per_meter@PNG12_0'
./.libs/liblept.so: undefined reference to `png_write_end@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_x_pixels_per_meter@PNG12_0'
./.libs/liblept.so: undefined reference to `png_write_image@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_image_height@PNG12_0'
./.libs/liblept.so: undefined reference to `png_set_gAMA@PNG12_0'
./.libs/liblept.so: undefined reference to `png_init_io@PNG12_0'
./.libs/liblept.so: undefined reference to `png_write_info@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_bit_depth@PNG12_0'
./.libs/liblept.so: undefined reference to `png_set_PLTE@PNG12_0'
./.libs/liblept.so: undefined reference to `png_read_png@PNG12_0'
./.libs/liblept.so: undefined reference to `png_write_rows@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_channels@PNG12_0'
./.libs/liblept.so: undefined reference to `png_set_pHYs@PNG12_0'
./.libs/liblept.so: undefined reference to `png_set_IHDR@PNG12_0'
./.libs/liblept.so: undefined reference to `png_destroy_write_struct@PNG12_0'
./.libs/liblept.so: undefined reference to `png_create_write_struct@PNG12_0'
./.libs/liblept.so: undefined reference to `png_set_text@PNG12_0'
./.libs/liblept.so: undefined reference to `png_create_read_struct@PNG12_0'
./.libs/liblept.so: undefined reference to `png_set_rows@PNG12_0'
./.libs/liblept.so: undefined reference to `png_get_color_type@PNG12_0'

Does anyone know why this is happening, and how I can possibly fix this error?

Thanks in advance.

Paul
 
leptonica library missing

Code:
If get this error message when you run ./configure and your leptonica header files are located in /usr/local/include (e.g. you installed leptonica to /usr/local) than run:

LIBLEPT_HEADERSDIR=/usr/local/include ./configure
or:

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

http://code.google.com/p/tesseract-ocr/wiki/FAQ
 
leptonica library missing

Code:
If get this error message when you run ./configure and your leptonica header files are located in /usr/local/include (e.g. you installed leptonica to /usr/local) than run:

LIBLEPT_HEADERSDIR=/usr/local/include ./configure
or:

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

http://code.google.com/p/tesseract-ocr/wiki/FAQ
I get these errors while executing "make" for leptonica, so that's not a solution for my problem ;)
 
It has nothing to do with directadmin. Post on their site under issues. Try installing libpng-devel or libpng-dev and see if it works
 
It has nothing to do with directadmin. Post on their site under issues. Try installing libpng-devel or libpng-dev and see if it works
It was to do something with DirectAdmin. If you've read my start post you could read that it works on a clean CentOS installation, but not on a "Clean CentOS" installation with DirectAdmin on it.

Also already tried installing libpng-devel
 
The answer would be that directadmin installs its own copy of libpng which does not include the header files you need. You will have to look at the ./configure settings and you might have to point to the folder where the header files for libpng would be.

Do this configure line:

./configure --with-libpng=/usr
make clean
make
 
Last edited:
Those are link errors not compilation errors, so the headers shouldn't matter much, unless they were changing the symbol to link, for example you might see something like this:
#define png_create_read_struct MYNEAT_png_create_read_struct
I doubt it, but some compilation packages to things like that to take care of different platform implementations.

I don't see enough of the link line to say why you are having that issue, but doing an nm on both /usr/local/lib/libpng.12.so and /usr/local/lib/libpng.so both show those symbols. Perhaps you are missing an error that you didn't post about libpng not being found, which could happen if you don't have the -L/usr/local/lib on the link line.
 
I've reinstalled my server and installed leptonica + Tesseract. It worked fine, until I installed DirectAdmin.
As soon as DirectAdmin is doing stuff with zlib/libpng (not sure what its doing there) tesseract fails by saying:

Code:
tesseract: /usr/local/lib/libpng12.so.0: no version information available (required by /usr/local/lib/liblept.so.0)
 
There are a lot of posts that show the error "no version information available" you are seeing, means that you have two versions of libpng12.so on your system and they are of different versions. More specifically, you linked with with a newer version than the one being loaded at runtime. I am guessing it was linked with the version in /usr/lib and is loading the version in /usr/local/lib. You need to either force it to load the version it was linked with or make sure all your libpng12.so files are the same version.
 
Back
Top