[mapserver-users] Problem compiling MapServer - "error: cannot find gif lib"

David Quinn daithiquinn at gmail.com
Mon Oct 17 06:44:11 EDT 2011


Hi Thomas,

Thanks - that helped me fix the problem. I used the following options:

./configure --prefix=$HOME \
--enable-debug  \
--with-gd \
--with-freetype --without-tiff \
--with-gdal=/home/david/bin/gdal-config \
--with-ogr=/home/david/bin/gdal-config \
--with-proj=/home/david/src/proj-4.7.0/ \
--without-pdf \
--with-png=/usr/ --with-threads \
--with-postgis=/home/david/bin/pg_config \
--with-wfs --with-wcs --with-wmsclient --with-wfsclient \
--with-php=$HOME --enable-debug \
--with-geos=/home/david/bin/geos-config \
--with-python \
--with-gif=$HOME

and received the following summary:

MapServer is now configured for

 -------------- Compiler Info -------------
  C compiler:                gcc -g  -fPIC -Wall
  C++ compiler:              g++ -g  -fPIC -Wall
  Debug:                     -g
  Generic NINT:

 -------------- Renderer Settings ---------
  OpenGL support:
  zlib support:              -DUSE_ZLIB
  png support:               -DUSE_PNG
  gif support:               -DUSE_GIF
  jpeg support:              -DUSE_JPEG
  freetype support:          -DUSE_FREETYPE
  iconv support:             -DUSE_ICONV
  AGG support:               internal
  SVG Symbol support:        -DUSE_AGG_SVG_SYMBOLS
  Cairo (SVG,PDF) support:
  KML support:

 -------------- Support Libraries ---------
  Proj.4 support:            -DUSE_PROJ
  Libxml2 support:           -DUSE_LIBXML2
  FriBidi support:
  Curl support:              -DUSE_CURL -DUSE_CURLOPT_PROXYAUTH
  FastCGI support:
  Threading support:         -DUSE_THREAD
  GEOS support:              -DUSE_GEOS
  XML Mapfile support:
  XSLT support:
  EXSLT support:

 -------------- Data Format Drivers -------
  PostGIS support:           -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION
  ArcSDE support:
  OGR support:               -DUSE_OGR
  GDAL support:              -DUSE_GDAL
  Oracle Spatial support:

 -------------- OGC Services --------------
  WMS Server:                -DUSE_WMS_SVR
  WMS Client:                -DUSE_WMS_LYR
  WFS Server:                -DUSE_WFS_SVR
  WFS Client:                -DUSE_WFS_LYR
  WCS Server:                -DUSE_WCS_SVR
  SOS Server:

 -------------- MapScript -----------------
  PHP MapScript:             yes

However I ran into problems when I ran 'make'.

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_WCS_SVR -DUSE_WFS_SVR
-DUSE_WMS_SVR   -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL
-DUSE_OGR -DUSE_GEOS  -DUSE_THREAD -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//include
-I/home/david/include  -I/usr/include -Irenderers/agg/include
-I/home/david/src/proj-4.7.0//src   -I/home/david/include
-I/home/david/include    -I/home/david/include    -I/usr/include/libxml2
shp2img.c -o shp2img.o
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_WCS_SVR -DUSE_WFS_SVR
-DUSE_WMS_SVR   -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_GDAL
-DUSE_OGR -DUSE_GEOS  -DUSE_THREAD -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//include
-I/home/david/include  -I/usr/include -Irenderers/agg/include
-I/home/david/src/proj-4.7.0//src   -I/home/david/include
-I/home/david/include    -I/home/david/include    -I/usr/include/libxml2
shp2img.o  -L. -lmapserver -lfreetype -lgd -L/usr/lib -lgd -ljpeg -lfreetype
-L/usr//lib -lpng -lz -lXpm -lX11  -lexpat
-L/home/david/src/proj-4.7.0//src/.libs -lproj -ljpeg -L/usr//lib -lpng
-L/home/david/lib -lgif  -L/home/david/lib -lgdal -L/home/david/lib -lpq
-L/usr/kerberos/lib -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
-lidn -lssl -lcrypto -lz    -L/home/david/lib -lgeos_c -lpthread -lc    -lz
-L/usr/lib -lxml2 -lz -lm  -lm -lstdc++    -o shp2img
./libmapserver.a(mapogroutput.o): In function `msOGRWriteShape':
/home/david/src/mapserver-6.0.1/mapogroutput.c:380: undefined reference to
`OGR_G_ForceToPolygon'
/home/david/src/mapserver-6.0.1/mapogroutput.c:385: undefined reference to
`OGR_G_ForceToMultiPolygon'
/home/david/src/mapserver-6.0.1/mapogroutput.c:390: undefined reference to
`OGR_G_ForceToMultiPoint'
/home/david/src/mapserver-6.0.1/mapogroutput.c:395: undefined reference to
`OGR_G_ForceToMultiLineString'
./libmapserver.a(mapogroutput.o): In function `msOGRWriteFromQuery':
/home/david/src/mapserver-6.0.1/mapogroutput.c:979: undefined reference to
`CPLCreateZip'
/home/david/src/mapserver-6.0.1/mapogroutput.c:984: undefined reference to
`CPLCreateFileInZip'
/home/david/src/mapserver-6.0.1/mapogroutput.c:989: undefined reference to
`CPLCloseZip'
/home/david/src/mapserver-6.0.1/mapogroutput.c:1000: undefined reference to
`CPLWriteFileInZip'
/home/david/src/mapserver-6.0.1/mapogroutput.c:1004: undefined reference to
`CPLCloseFileInZip'
/home/david/src/mapserver-6.0.1/mapogroutput.c:1006: undefined reference to
`CPLCloseZip'
collect2: ld returned 1 exit status
make: *** [shp2img] Error 1

Does anyone have a suggestion about how I can solve the following errors? I
read some very old bug reports with the following error suggesting that it
was due to the compiler version but I don't know if this is relevant.

Thanks,
David

On Mon, Oct 17, 2011 at 3:17 AM, thomas bonfort <thomas.bonfort at gmail.com>wrote:

> --with-gif=$HOME if you have installed it there. As a rule of thumb,
> it is not a good idea to only compile the packages and not install
> them (i.e. no make install) as there is no reason that the packages
> respect the include/ lib/ hierarchy inside their source structure.
> (i.e. you should be using  --with-gdal=/home/david/bin/gdal-config,
> --with-proj=/home/david, etc... )
>
> --
> thomas
>
>
> On Mon, Oct 17, 2011 at 06:48, David Quinn <daithiquinn at gmail.com> wrote:
> > Hello List,
> >
> > I'm trying to install Mapserver on CentOS5 (specifically on a Webfaction
> > shared hosting server). I'm using the following options:
> >
> > ./configure --prefix=$HOME \
> > --enable-debug  \
> > --with-gd \
> > --with-freetype --without-tiff \
> > --with-gdal=/home/david/src/gdal-1.8.1/apps/gdal-config \
> > --with-ogr=/home/david/src/gdal-1.8.1/apps/gdal-config \
> > --with-proj=/home/david/src/proj-4.7.0/ \
> > --without-pdf \
> > --with-png=/usr/ --with-threads \
> > --with-postgis=/home/david/src/postgresql-8.4.6/src/bin/pg_config \
> > --with-wfs --with-wcs --with-wmsclient --with-wfsclient \
> > --with-php=/usr/include/php5/ --enable-debug \
> > --with-geos=/home/david/bin/geos-config \
> > --with-python \
> > --with-gif=/home/david/src/giflib-4.1.6/lib/gif_lib.h
> >
> > However I get the following error:
> >
> > checking setjmp.h usability... yes
> > checking setjmp.h presence... yes
> > checking for setjmp.h... yes
> > configure: checking where GIF is installed...
> > configure: error: cannot find gif lib in
> > /home/urbmet/src/giflib-4.1.6/lib/gif_lib.h
> >
> > After I got this error the first time, I installed giflib-4.1.6. The
> results
> > of running $ find | grep gif_lib.h
> > ./include/gif_lib.h
> > ./src/giflib-4.1.6/lib/gif_lib.h
> > ./src/giflib-4.1.6/doc/gif_lib.html
> > ./src/gdal-1.8.1/frmts/gif/giflib/gif_lib.h
> >
> > I have tried --with-gif with all of the following arguments, either to
> the
> > folder or to gif_lib.h without success. Am I missing any settings or
> > dependencies?
> >
> > Thanks,
> > David
> >
> >
> >
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111017/a384af0c/attachment.html


More information about the mapserver-users mailing list