libASImage undefined symbol png_create_read_struct

I had a problem and found a non-trivial solution so I thought I should post it.

Running Fedora 10 on a x86_64 processor. I compiled Root-5.22.00 from source using “./configure linux”. (I need 32-bit binaries to link with some other 32-bit code.)

The problem with most of this is making sure that your distribution installs the needed 32-bit libraries etc… My solution has always been to install the needed libraries when the compiling process stops. If it stops, the error message usually indicates the needed files/libraries.

However, I successfully compiled and ran this Root version without problems until I attempted to open the Editor in TCanvas. Then CINT returned undefined symbol: png_create_read_struct.

The solution is to install the 32-bit version of libpng. (“yum install libpng.i386”) (Also make sure that “/usr/lib/” is a link to the actual library which may append a version number to the file name) Then recompile the Root source.

make dist clean
./configure linux
(copy to $ROOTSYS if necessary)

This solution seemed less obvious than most. I couldn’t find a post of this error when I first started searching, so here it is…


libpng is distributed with ROOT in:
So, in principle it should not be a problem.

Ok, I looked in that directory and do see source files. Perhaps during compilation there were errors that I didn’t notice. My $ROOTSYS/lib directory doesn’t contain a libpng. I am not sure if it should… Let me know if there is something else I can provide. I am not sure if this is a commonly encountered problem or not.

On my machine I did:

make clean-asimage

and then


You are right, the lib png is not rebuild. I guess when there is one version available on the system the libAfterimage makefile uses it. May be it found one on yur system but it was not a good one and that is why you got the mistake.