[Mapserver-users] httpd-error.log: Incompatible libpng version

thelen at ccgis.de thelen at ccgis.de
Wed Dec 24 08:08:28 EST 2003


Hi Daniel,


Thanks for your help!

I did not to tell you, that this error only occurs when I use an external
wms via "CONNECTION http://wms..blablabla" (standard map requests are
fine), because I thought it may not be important. But meanwhile I found
out, that this must be a problem in MapServer 4.x at least on FreeBSD 4.7
and 4.9!
Today I compiled MapServer 3.6.6: The external wms layer displays
correctly and there is no png-error!!


I found out that this may has something to do with gdal! But please read on.



> Benjamin Thelen (CCGIS) wrote:
>> [Mon Dec 22 17:03:38 2003] [error] [client 192.168.2.109] Premature end
of script headers: /usr/local/www/cgi-bin/mapserv
>> libpng warning: Application was compiled with png.h from libpng-1.0.6
libpng warning: Application  is  running with png.c from libpng-1.2.5
libpng error: Incompatible libpng version in application and library I
have compiled mapserver --with-png=/usr/local. png.h is located in
/usr/local/include.
>> I suppose "Application" refers to the mapserver binary. But png.h is
>> definitely version 1.2.5. So I really don't understand this error
>> message telling me that mapserver was compiled with a png.h from
>> version
>> 1.0.6!?
>
> Are you really sure that there is no other png.h anywhere on your
> system, and that there was none at the time that you compiled MapServer?


Definitely yes.

root at wms1# find / -name png.h
/usr/local/include/libpng/png.h
/usr/local/include/png.h

where the second one is a symbolic link.


>
> Just using --with-png=/usr/local doesn't prevent the compiler from using
> /usr/include/png.h if it finds one. So you really need to have only one
>png.h in your system directories no matter which configure options you
use.

Then, I don't understand, why --with-option*=/path/to* is required, while
MapServer finds everthings itself (on Linux - at least SuSE - it really
does, on FreeBSD NOT!). But that's just a thing that catched my eye.

>
> Note that in this case the "application" that uses libpng is libgd.so,
> which in turn is used by MapServer... I also think that GDAL may link in
>libpng, or even carry its own internal copy, so that's another thing to
>check.


gd (I use 2.0.15) does not carry its own internal copy of png.h, but gdal
does:
/usr/ports/graphics/gdal/work/gdal-1.1.8/frmts/png/libpng/png.h

And you are right! This is: libpng version 1.0.6 - March 21, 2000

So, it is a gdal (and/or a FreeBSD Ports) problem! Isn't "application"
then in this case gdal??


What can I do then? And why does this error not occur with MapServer 3.6.6?



>
>> Does anybody have an idea? I have alread removed many, many packages,
>> which need png and reinstalled/compiled those again. But it did not help.
>
> About removing packages: in general you don't need to remove the older
> lib completely and you can keep the runtime part of the package. You
need > only to remove the "devel" part of the package which includes the
.h files > and libpng.so which is a symlink to libpng.so.1.0.6. The
> runtime libpng.so.1.0.6 can remain on your system and if the libs are
well > configured then your old apps will continue to work without
needing a >rebuild, and the old lib won't interfere with the newer apps
that you >compile and that will use libpng.so.1.2.5.


On FreeBSD, there are no devel-packages. If you install a package or from
Ports Collection you get all. But I know the devel-package system from
debian/SuSe/Red Hat.
But I would think, hat if you remove a specific devel package and install
a newer one, that in this case the appropriate main-package would be
installed, too!?



Thanks, Daniel and Merry Christmas!


Benjamin

---------------------------------
CCGIS GbR - Bonn
http://www.ccgis.de

Siemensstraße 8
53121 Bonn
Germany

Tel: ++49 (0) 228 90826 15
Fax: ++49 (0) 228 90826 11



>
> Daniel
> --
> ------------------------------------------------------------
>   Daniel Morissette               morissette at dmsolutions.ca
>   DM Solutions Group              http://www.dmsolutions.ca/
> ------------------------------------------------------------
>
>
>











More information about the mapserver-users mailing list