[mapserver-users] Problem compiling MapServer 6.0.1 with libpng

Dejan Gambin dejan.gambin at coin.hr
Mon Sep 12 05:59:28 EDT 2011


O sorry, here it is:

mapimageio.o: mapimageio.c mapserver.h /usr/include/stdio.h \
  /usr/include/features.h /usr/include/sys/cdefs.h \
  /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
  /usr/include/gnu/stubs-64.h \
  /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include/stddef.h \
  /usr/include/bits/types.h /usr/include/bits/typesizes.h \
  /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
  /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include/stdarg.h \
  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
  /usr/include/stdlib.h /usr/include/bits/waitflags.h \
  /usr/include/bits/waitstatus.h /usr/include/endian.h \
  /usr/include/bits/endian.h /usr/include/xlocale.h \
  /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
  /usr/include/bits/select.h /usr/include/bits/sigset.h \
  /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
  /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \
  /usr/include/string.h /usr/include/math.h /usr/include/bits/huge_val.h \
  /usr/include/bits/huge_valf.h /usr/include/bits/huge_vall.h \
  /usr/include/bits/inf.h /usr/include/bits/nan.h \
  /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
  /usr/include/unistd.h /usr/include/bits/posix_opt.h \
  /usr/include/bits/environments.h /usr/include/bits/confname.h \
  /usr/include/getopt.h \
  /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include-fixed/limits.h \
  /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include-fixed/syslimits.h \
  /usr/include/limits.h /usr/include/bits/posix1_lim.h \
  /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
  /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \
  /usr/include/stdint.h /usr/include/bits/wchar.h maperror.h \
  mapprimitive.h mapshape.h mapsymbol.h /usr/include/gd.h \
  /usr/include/gd_io.h /usr/include/gdfx.h /usr/include/gd.h \
  /usr/include/assert.h maptree.h maphash.h mapio.h mapproject.h \
  /usr/include/proj_api.h cgiutil.h mapregex.h \
  /usr/local/include/ogr_api.h /usr/local/include/ogr_core.h \
  /usr/local/include/cpl_port.h /usr/local/include/cpl_config.h \
  /usr/include/ctype.h /usr/include/errno.h /usr/include/bits/errno.h \
  /usr/include/linux/errno.h /usr/include/asm/errno.h \
  /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
  /usr/include/locale.h /usr/include/bits/locale.h \
  /usr/local/include/gdal_version.h mapows.h maphttp.h \
  /usr/local/include/png.h /usr/local/include/pnglibconf.h \
  /usr/include/setjmp.h /usr/include/bits/setjmp.h \
  /usr/local/include/pngconf.h /usr/include/jpeglib.h \
  /usr/include/jconfig.h /usr/include/jmorecfg.h /usr/include/gif_lib.h

dejan
On 12. ruj. 2011., at 11:57, thomas bonfort wrote:

> make sure you remove the "-o mapimageio.o" from the call
> 
> 2011/9/12 Dejan Gambin <dejan.gambin at coin.hr>:
>> I get no output, just mapimageio.o generated....I'll try again...maybe some other option...
>> 
>> dejan
>> On 12. ruj. 2011., at 11:45, thomas bonfort wrote:
>> 
>>> 2011/9/12 Dejan Gambin <dejan.gambin at coin.hr>:
>>>> It doesn't help :-(
>>>> 
>>>> 
>>>> Here is the part of make compile statement with mapimageio.c, maybe this can help you:
>>>> 
>>>> gcc -c -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   mapimageio.c -o mapimageio.o
>>>> 
>>>> 
>>>> regards, dejan
>>>> 
>>>> BTW, I don't have 1.4 installed, just 1.5.4. And system libpng in /usr/lib
>>> as you had stated you tried with 1.4 I just wanted to make sure.
>>> 
>>> ok, last step before opening a ticket:
>>> 
>>> - revert mapimageio.c to its original state
>>> - check the output of
>>> 
>>> gcc -c -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   mapimageio.c -M
>>> 
>>> for the location of png.h
>>> 
>>> - if png.h comes from /usr/local/include, open a ticket and assign it to me
>>> 
>>> 
>>>> 
>>>> 
>>>> On 12. ruj. 2011., at 11:17, thomas bonfort wrote:
>>>> 
>>>>> 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 <dejan.gambin at coin.hr>:
>>>>>> Hi Thomas
>>>>>> 
>>>>>> Thanks for the help. As I said, I have system libpng installed in /usr/lib:
>>>>>> 
>>>>>> dgambin at 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 at 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 at 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 at 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 <dejan.gambin at coin.hr>:
>>>>>>>> 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
>>>>>>>>> mapserver-users at lists.osgeo.org
>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> mapserver-users mailing list
>>>>>>>> mapserver-users at lists.osgeo.org
>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>> 
>> 



More information about the mapserver-users mailing list