can you try modifying mapimageio.c and replace
#include <png.h>
by
#include "/usr/local/include/png.h"

if you have both png 1.4 and 1.5 in /usr/local, you're asking for
trouble, make sure this is not the case

2011/9/12 Dejan Gambin <[email protected]>:
> Hi Thomas
>
> Thanks for the help. As I said, I have system libpng installed in /usr/lib:
>
> dgambin@coin:~/mapserver-6.0.1$ dpkg -l libpng*
> Desired=Unknown/Install/Remove/Purge/Hold
> | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: 
> uppercase=bad)
> ||/ Name           Version        Description
> +++-==============-==============-============================================
> un  libpng-dev     <none>         (no description available)
> ii  libpng12-0     1.2.27-2+lenny PNG library - runtime
> un  libpng12-0-dev <none>         (no description available)
> ii  libpng12-dev   1.2.27-2+lenny PNG library - development
> un  libpng2        <none>         (no description available)
> un  libpng2-dev    <none>         (no description available)
> un  libpng3-dev    <none>         (no description available)
>
> dgambin@coin:~/mapserver-6.0.1$ ls -l /usr/lib/libpng*
> -rw-r--r-- 1 root root 243004 2011-07-25 00:16 /usr/lib/libpng12.a
> lrwxrwxrwx 1 root root     18 2011-09-09 13:29 /usr/lib/libpng12.so -> 
> libpng12.so.0.27.0
> lrwxrwxrwx 1 root root     18 2011-08-08 20:07 /usr/lib/libpng12.so.0 -> 
> libpng12.so.0.27.0
> -rw-r--r-- 1 root root 153224 2011-07-25 00:15 /usr/lib/libpng12.so.0.27.0
> lrwxrwxrwx 1 root root     10 2011-09-09 13:29 /usr/lib/libpng.a -> libpng12.a
> lrwxrwxrwx 1 root root     11 2011-09-09 13:29 /usr/lib/libpng.so -> 
> libpng12.so
>
>
>
> And I have libpng-1.5.4 installed in /usr/local/lib:
>
> dgambin@coin:~/mapserver-6.0.1$ ls -l /usr/local/lib/libpng*
> -rw-r--r-- 1 root staff 1051610 2011-09-09 13:09 /usr/local/lib/libpng15.a
> -rwxr-xr-x 1 root staff     934 2011-09-09 13:09 /usr/local/lib/libpng15.la
> lrwxrwxrwx 1 root staff      18 2011-09-09 13:09 /usr/local/lib/libpng15.so 
> -> libpng15.so.15.4.0
> lrwxrwxrwx 1 root staff      18 2011-09-09 13:09 
> /usr/local/lib/libpng15.so.15 -> libpng15.so.15.5.0
> -rwxr-xr-x 1 root staff  597897 2011-09-09 13:09 
> /usr/local/lib/libpng15.so.15.4.0
> lrwxrwxrwx 1 root staff      10 2011-09-09 13:09 /usr/local/lib/libpng.a -> 
> libpng15.a
> lrwxrwxrwx 1 root staff      11 2011-09-09 13:09 /usr/local/lib/libpng.la -> 
> libpng15.la
> lrwxrwxrwx 1 root staff      11 2011-09-09 13:09 /usr/local/lib/libpng.so -> 
> libpng15.so
>
>
> I made configure with --with-png=/usr/local
>
> Make fails in this:
>
> dgambin@coin:~/mapserver-6.0.1$ make
> g++ -g  -fPIC -Wall     -DHAVE_VSNPRINTF -DNEED_STRLCPY -DNEED_STRLCAT 
> -DNEED_STRRSTR           -DUSE_WMS_LYR -DUSE_WFS_LYR  -DUSE_LIBXML2 
> -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH -DUSE_KML  -DUSE_WFS_SVR -DUSE_WMS_SVR  
> -DUSE_MYSQL -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL -DUSE_OGR   
> -DUSE_PROJ -DUSE_AGG_SVG_SYMBOLS    -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG 
> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR 
> -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF 
> -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE   -DDISABLE_CVSID 
> -I/usr/include/freetype2  -I/usr/local//include   -I/usr/include 
> -Irenderers/agg/include    -I/usr/include   -I/usr/local/include 
> -I/usr/include/postgresql -I/usr/include/mysql  -DBIG_JOINS=1 -fPIC    
> -I/usr/include   -I/usr/include/libxml2   shp2img.o  -L. -lmapserver 
> -lfreetype -lz -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lz -L/usr/local//lib 
> -lpng -lz -lXpm -lX11  -lexpat   -L/usr/lib64 -lproj -ljpeg -L/usr/local//lib 
> -lpng -lgif  -L/usr/local/lib -lgdal -L/usr/lib -lpq -L/usr/lib/mysql 
> -lmysqlclient -lmysqlclient -lcurl    -L/usr/lib -lc    -lz -lxml2  -lm 
> -lstdc++    -o shp2img
> ./libmapserver.a(mapimageio.o): In function `savePalettePNG':
> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to 
> `png_set_longjmp_fn'
> ./libmapserver.a(mapimageio.o): In function `saveAsPNG':
> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to 
> `png_set_longjmp_fn'
> ./libmapserver.a(mapimageio.o): In function `readPNG':
> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to 
> `png_set_longjmp_fn'
> collect2: ld returned 1 exit status
>
> Is there anything wrong here? I'll send you anything else if needed :-)
>
> Thanks very much
>
> regards, dejan
>
>
> On 12. ruj. 2011., at 10:31, thomas bonfort wrote:
>
>> Can you check you are linking against the same version libpng library
>> as the png.h header (i.e. check you don't have multiple png versions
>> installed)
>>
>> 2011/9/12 Dejan Gambin <[email protected]>:
>>> Hi,
>>>
>>> I am still unable to compiče mapserver 6.0.1. I can't find this function 
>>> (png_set_longjmpfn) defined anywhere. Can someone give me a clue? I am 
>>> almost sure I am doing some stupid mistake, but for me seems unsolvable :-(
>>>
>>> Thanks very much
>>>
>>> regards, dejan
>>> On 8. ruj. 2011., at 12:12, Dejan Gambin wrote:
>>>
>>>> Hi,
>>>>
>>>> After many trials and missings, I am still unable to compile MapServer 
>>>> 6.0.1 (6.0.0 also) on my Debian Lenny machine.
>>>>
>>>> Here is the error I get:
>>>>
>>>> ./libmapserver.a(mapimageio.o): In function `savePalettePNG':
>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:274: undefined reference to 
>>>> `png_set_longjmp_fn'
>>>> ./libmapserver.a(mapimageio.o): In function `saveAsPNG':
>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:461: undefined reference to 
>>>> `png_set_longjmp_fn'
>>>> ./libmapserver.a(mapimageio.o): In function `readPNG':
>>>> /home/dgambin/mapserver-6.0.1/mapimageio.c:738: undefined reference to 
>>>> `png_set_longjmp_fn'
>>>> collect2: ld returned 1 exit status
>>>>
>>>>
>>>> Here is my configure:
>>>>
>>>> ./configure --with-ogr=/usr/local/bin/gdal-config 
>>>> --with-gdal=/usr/local/bin/gda
>>>> l-config --with-wfs --with-wfsclient --with-wmsclient --enable-debug 
>>>> --with-curl
>>>> -config=/usr/bin/curl-config --with-proj=/usr --with-jpeg 
>>>> --with-freetype=/usr/b
>>>> in/ --with-postgis=/usr/bin/pg_config --with-mysql=/usr/bin/mysql_config 
>>>> --with-
>>>> libiconv=/usr --with-kml=yes --with-php=/usr/include/php5 
>>>> --with-png=/usr/local
>>>>
>>>> Since I have system libpng 1.2.27-2, I downloaded and installed 1.5.4 and 
>>>> put "--with-png=/usr/local" in my configure file. But seems like it 
>>>> doesn't help. I also tried with 1.4.8. Stiil the same issue. Also tried 
>>>> without "--with-png=/usr/local" (so it should use system libpng)...nothing
>>>>
>>>> I have compiled using newest gdal 1.8.1. GDAL compiled ok with libpng 
>>>> 1.5.4.
>>>>
>>>> Am I doing something wrong?
>>>>
>>>> Thank you very much for any useful info
>>>>
>>>> regards, dejan_______________________________________________
>>>> mapserver-users mailing list
>>>> [email protected]
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> [email protected]
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>
>
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to