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

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


Hi Martin,

thanks for your help!

I am afraid, there is no libpng-config on FreeBSD, so I have to find out
the appropriate Unix libpng-config.


ldd -v (I supporse the FreeBSD flag -v is the same as -r on Linux) spits out

ldd: /usr/local/lib/libgdal.1.1.so: this is an ELF program; use objdump to
examine

At the moment objdump is not really helpful.


But as gdal is compiled with libpng-1.0.6 and mapserver in fact is
compiled with libpng-1.2.5, the crash seems to be obvious. What I really
don't understand is, that this error does only occur with MapServer 4 and
not with 3.6.6. And of course, I don't know, what to do in this case.


Thanks 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


> On Tuesday 23 December 2003 15:41, Daniel Morissette wrote:
>> 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?
>> 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.
>> 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.
>
> And check what libpng-config spits out about your installation. This is
used
> by gd to collect information on your png package. If you (must) have
different versions of png installed you might try to configure gd
'--with-png="/the/path/to/the/new/libpng-config" or edit the Makefile
accordingly.
>
> When you build gd you can always issue a  'ldd -r  libgd.so.2.0.0' to
see
> if
> it uses your favorite version of libpng. If that is the case and your
error-log still has this warnings check the environment of the httpd
(LD_LIBRARY_PATH). It is the env of the 'user' running the httpd or you
set
> it in httpd.conf.
>
> Martin
>
>
>> > 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.
>> Daniel
>
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>




More information about the mapserver-users mailing list