Hi,<div><br></div><div>Thanks for getting back to me so quickly. I actually started off like that. This build config:</div><div><div>./configure \</div><div>        --prefix=/data/installed/mapserver \</div><div>        --with-threads \</div>
<div>        --with-fastcgi  \</div><div>        --with-freetype=/usr/bin/freetype-config   \</div><div>        --with-zlib \</div><div>        --with-libiconv=/data/installed/libiconv \</div><div>        --with-gd \</div>
<div>        --with-ogr \</div><div>        --with-geos=/usr/bin/geos-config \</div><div>        --with-gdal \</div><div>        --with-png \</div><div>        --with-proj=/usr/ \</div><div>        --with-curl-config=/usr/bin/curl-config \</div>
<div>        --with-wfs \</div></div><div><br></div><div>Results in :</div><div><br></div><div><div>MapServer Version from mapserver.h: &#39;6.0.2&#39;</div><div>checking if pkg-config path is provided... checking for pkg-config... /usr/bin/pkg-config</div>
<div>checking for Freetype2.x in /usr/bin/freetype-config... checking for FT_Init_FreeType in -lfreetype... yes</div><div>checking for sys/types.h... yes</div><div>checking for sys/stat.h... yes</div><div>checking for stdlib.h... yes</div>
<div>checking for string.h... yes</div><div>checking for memory.h... yes</div><div>checking for strings.h... yes</div><div>checking for inttypes.h... yes</div><div>checking for stdint.h... yes</div><div>checking for unistd.h... yes</div>
<div>checking ft2build.h usability... yes</div><div>checking ft2build.h presence... yes</div><div>checking for ft2build.h... yes</div><div>configure: checking where Zlib is installed...</div><div>checking for zlibVersion in -lz... yes</div>
<div>        using libz from system libs (-DUSE_ZLIB).</div><div>configure: checking where PNG is installed...</div><div>configure: error: cannot find png lib in /data/sources/mapserver/mapserver-6.0.2/yes</div><div><br></div>
<div>I also tried with png in /usr, but that didnt work either.</div><div><br></div><div>These png libs are installed:</div><div><br></div><div><div>i   libpng12-0                                                                                                - PNG library - runtime</div>
</div><div><div>i   libpng12-dev                                                                                              - PNG library - development</div></div><div><br></div><div>This brings me to:</div><div><br></div>
<div>libpng.so was located in :</div><div><div>/data/installed/libpng/lib/libpng.so</div><div>/usr/lib/x86_64-linux-gnu/libpng.so</div></div><div><br></div><div>I suspect this has to do with ubuntu 12 storing these libs in x86_64-linux-gnu instead of lib64</div>
<div><br></div><div>----</div><div><br></div><div>I just tried symlinking the libpng.so files to /usr/lib and the configure and make runs without issues now.</div><div><br></div><div>Seems the problem is fixed :). Thanks for the tip.</div>
<div><br></div><div>Best regards,</div><div>P.</div><div><br></div><br><div class="gmail_quote">2012/5/10 thomas bonfort <span dir="ltr">&lt;<a href="mailto:thomas.bonfort@gmail.com" target="_blank">thomas.bonfort@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You&#39;re building with a custom libpng and the system libgd (linked to<br>
the system libpng),which is bad.<br>
<br>
try with --with-gd --with-png alone, after maybe apt-installing libpng-dev<br>
<br>
--<br>
thomas<br>
<div><div class="h5"><br>
On Thu, May 10, 2012 at 11:21 AM, Peter Maes &lt;<a href="mailto:thxftw@gmail.com">thxftw@gmail.com</a>&gt; wrote:<br>
&gt; I&#39;m getting this error:<br>
&gt;<br>
&gt; gcc -c -O2 -fPIC -Wall  -DNDEBUG    -DHAVE_VSNPRINTF -DNEED_STRLCPY<br>
&gt; -DNEED_STRLCAT -DNEED_STRRSTR     -DUSE_FASTCGI         -DUSE_LIBXML2<br>
&gt;  -DUSE_WFS_SVR -DUSE_WMS_SVR    -DUSE_GDAL -DUSE_OGR -DUSE_GEOS<br>
&gt;  -DUSE_THREAD -DUSE_PROJ    -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG<br>
&gt; -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR<br>
&gt; -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF<br>
&gt; -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE   -DDISABLE_CVSID<br>
&gt; -I/usr/include/freetype2  -I/data/installed/libpng/include   -I/usr/include<br>
&gt; -Irenderers/agg/include   -I/usr//include   -I/usr/include/gdal<br>
&gt; -I/usr/include -I/data/installed/libiconv/include   -I/usr/include/libxml2<br>
&gt; shp2img.c -o shp2img.o<br>
&gt; g++ -O2 -fPIC -Wall  -DNDEBUG    -DHAVE_VSNPRINTF -DNEED_STRLCPY<br>
&gt; -DNEED_STRLCAT -DNEED_STRRSTR     -DUSE_FASTCGI         -DUSE_LIBXML2<br>
&gt;  -DUSE_WFS_SVR -DUSE_WMS_SVR    -DUSE_GDAL -DUSE_OGR -DUSE_GEOS<br>
&gt;  -DUSE_THREAD -DUSE_PROJ    -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG<br>
&gt; -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR<br>
&gt; -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF<br>
&gt; -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE   -DDISABLE_CVSID<br>
&gt; -I/usr/include/freetype2  -I/data/installed/libpng/include   -I/usr/include<br>
&gt; -Irenderers/agg/include   -I/usr//include   -I/usr/include/gdal<br>
&gt; -I/usr/include -I/data/installed/libiconv/include   -I/usr/include/libxml2<br>
&gt; shp2img.o  -L. -lmapserver -L/usr/lib/x86_64-linux-gnu -lfreetype -lz<br>
&gt; -L/usr/lib -lgd -ljpeg -L/usr/lib/x86_64-linux-gnu -lfreetype -lz<br>
&gt; -L/data/installed/libpng/lib -lpng -lz -lXpm -lX11     -L/usr//lib -lproj<br>
&gt; -ljpeg -L/data/installed/libpng/lib -lpng -lgif  -L/usr/lib -lgdal1.7.0<br>
&gt; -L/usr/lib -lgeos_c -lpthread -L/data/installed/libiconv/lib -liconv -lfcgi<br>
&gt;   -lz -L/usr/lib/x86_64-linux-gnu -lxml2  -lm -lstdc++    -o shp2img<br>
&gt; ./libmapserver.a(mapimageio.o): In function `savePalettePNG&#39;:<br>
&gt; mapimageio.c:(.text+0x8ef): undefined reference to `png_set_longjmp_fn&#39;<br>
&gt; ./libmapserver.a(mapimageio.o): In function `saveAsPNG&#39;:<br>
&gt; mapimageio.c:(.text+0x113e): undefined reference to `png_set_longjmp_fn&#39;<br>
&gt; ./libmapserver.a(mapimageio.o): In function `readPNG&#39;:<br>
&gt; mapimageio.c:(.text+0x1898): undefined reference to `png_set_longjmp_fn&#39;<br>
&gt; collect2: ld returned 1 exit status<br>
&gt; make: *** [shp2img] Error 1<br>
&gt;<br>
&gt; libpng 1.2.46<br>
&gt; iconv (Ubuntu EGLIBC 2.15-0ubuntu10) 2.15<br>
&gt;<br>
&gt; On Ubuntu 12.04 LTS with latest mapserver version.<br>
&gt;<br>
&gt; This is what my configure looks like:<br>
&gt;<br>
&gt; ./configure \<br>
&gt;         --prefix=/data/installed/mapserver \<br>
&gt;         --with-threads \<br>
&gt;         --with-fastcgi  \<br>
&gt;         --with-freetype=/usr/bin/freetype-config   \<br>
&gt;         --with-zlib \<br>
&gt;         --with-libiconv=/data/installed/libiconv \<br>
&gt;         --with-gd=/usr \<br>
&gt;         --with-ogr \<br>
&gt;         --with-geos=/usr/bin/geos-config \<br>
&gt;         --with-gdal \<br>
&gt;         --with-png=/data/installed/libpng \<br>
&gt;         --with-proj=/usr/ \<br>
&gt;         --with-curl-config=/usr/bin/curl-config \<br>
&gt;         --with-wfs \<br>
&gt;<br>
&gt; Thanks for any tips on how to make the build work.<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;<br>
</blockquote></div><br></div>