[mapserver-users] newbie: Need help compiling

Thomas P. Colson tpcolson at nexussoft.com
Tue Oct 29 11:24:58 EST 2002


I've download and "default "installed:
GD
PROJ4
LIBWWW
LIBTIFF
LIBGEOTIFF
LIBJPEG
OGR
GDAL

and then Mapserver 3.6.3

Here's what happens:


[root at ids mapserver-3.6.3]# ./configure --with-proj --with-ogr --with-gdal --with-wmsclient
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for c++... (cached) c++
checking whether the C++ compiler (c++  ) works... yes
checking whether the C++ compiler (c++  ) is a cross-compiler... no
checking whether we are using GNU C++... (cached) yes
checking whether c++ accepts -g... (cached) yes
checking for ranlib... (cached) ranlib
checking for flex... (cached) flex
checking for yywrap in -lfl... (cached) yes
checking for bison... (cached) bison -y
checking if compiler supports -R... (cached) no
checking if compiler supports -Wl,-rpath,... (cached) yes
checking for exp in -lm... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking for ANSI C header files... (cached) yes
checking for strcasecmp... (cached) yes
checking for strncasecmp... (cached) yes
checking for strdup... (cached) yes
checking whether we should include JPEG support...
checking for jpeg_read_header in -ljpeg... yes
        using libjpeg from system libs.
checking which version of GD to use...
        using libgd from system libs.
checking where FreeType is installed...
checking for FT_Init_FreeType in -lfreetype... yes
        using libfreetype -lfreetype from system libs.
checking where Zlib is installed...
checking for zlibVersion in -lz... yes
        using libz from system libs.
checking where PNG is installed...
checking for png_init_io in -lpng... yes
        using libpng from system libs.
checking for gdImageCreate in -lgd... no
configure: error: GD is required but was not found... use --with-gd=DIR to specify its location.
[root at ids mapserver-3.6.3]#

So I try:

[root at ids mapserver-3.6.3]# ./configure --with-proj --with-ogr --with-wmsclient --with-gd=/usr/include --with-gdal
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for c++... (cached) c++
checking whether the C++ compiler (c++  ) works... yes
checking whether the C++ compiler (c++  ) is a cross-compiler... no
checking whether we are using GNU C++... (cached) yes
checking whether c++ accepts -g... (cached) yes
checking for ranlib... (cached) ranlib
checking for flex... (cached) flex
checking for yywrap in -lfl... (cached) yes
checking for bison... (cached) bison -y
checking if compiler supports -R... (cached) no
checking if compiler supports -Wl,-rpath,... (cached) yes
checking for exp in -lm... (cached) yes
checking how to run the C preprocessor... (cached) gcc -E
checking for ANSI C header files... (cached) yes
checking for strcasecmp... (cached) yes
checking for strncasecmp... (cached) yes
checking for strdup... (cached) yes
checking whether we should include JPEG support...
checking for jpeg_read_header in -ljpeg... yes
        using libjpeg from system libs.
checking which version of GD to use...
        using libgd from -L/usr/include -lgd
checking where FreeType is installed...
checking for FT_Init_FreeType in -lfreetype... yes
        using libfreetype -lfreetype from system libs.
checking where Zlib is installed...
checking for zlibVersion in -lz... yes
        using libz from system libs.
checking where PNG is installed...
checking for png_init_io in -lpng... yes
        using libpng from system libs.
checking for gdImageGif in -lc... no
checking for gdImagePng in -lc... yes
checking for gdImageJpeg in -lc... yes
checking for gdImageWBMP in -lc... yes
checking for gdImageStringFT in -lc... yes
checking for gdImageString16 in -lc... yes
checking for gdImageGifPtr in -lc... no
        using GD ( -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT) from /usr/include.
checking whether we should include PDF support...
checking for PDF_setlinewidth in -lpdf... no
checking for PDF_setrgbcolor in -lpdf... no
checking for PDF_moveto in -lpdf... no
checking for PDF_curveto in -lpdf... no
checking for PDF_show_xy in -lpdf... (cached) no
        libpdf not found... PDF support not included.
checking whether we should include TIFF support...
checking for TIFFOpen in -ltiff... yes
        using libtiff from system libs.
checking whether we should include EPPL7 support...
        including EPPL7 support.
checking whether we should include PROJ.4 support...
checking for pj_init in -lproj... yes
checking for pj_transform in -lproj... yes
checking for pj_latlong_from_proj in -lproj... yes
        using PROJ.4 from system libs.
checking whether we should include thread safe support...
        thread safe support disabled.
checking whether we should include ESRI SDE support...
        ESRI SDE support not requested.
checking whether we should compile in MPATROL support...
        MPATROL support not requested.
checking whether we should include OGR support...
checking for gdal-config... (cached) /usr/local/bin/gdal-config
checking for OGRRegisterAll in -lgdal.1.1... (cached) no
configure: warning:         OGR not found in system libs... use --with-ogr=DIR.
checking if GDAL support requested... yes
checking if PostGIS support requested... no
checking if OracleSpatial support requested... no
checking whether we should include WMS support...
        OGC WMS compatibility enabled (-DUSE_WMS).
checking whether we should include WMS Client Connections support...
checking for libwww-config... (cached) /usr/local/bin/libwww-config
        found libwww version 5.4.0
        OGC WMS Client Connections enabled (-DUSE_WMS_LYR).
checking for potential conflict between system regex and rxposix...
checking for regexec in -lrx... (cached) no
Compiling with -DIGNORE_MISSING_DATA.
checking whether we should enable debug features...
checking for PHP/MapScript module options...
        PHP/MapScript module not configured.
creating ./config.status
creating Makefile
[root at ids mapserver-3.6.3]#

Looks like it worked, right? 

Check this out:
make
gcc -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_WMS -DUSE_WMS_LYR  -DUSE_TIFF -DUSE_JPEG -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT    -DUSE_GDAL    -I/usr/include          -I/usr/local/include  -I/usr/local/include -I/usr/local/include/w3c-libwww -DHAVE_CONFIG_H  shp2img.o  -L. -lmap -L/usr/include -lgd -ljpeg -lfreetype -lpng -lz  -ltiff -ljpeg -lfreetype -lpng -lz -lproj -ljpeg      -L/usr/local/lib -lwwwxml -lxmltok -lxmlparse -lwwwinit -lwwwapp -lwwwhtml -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -ldl    -lm   -o shp2img
./libmap.a(mapraster.o): In function `drawGDAL':
mapraster.o(.text+0x4c8): undefined reference to `GDALGetRasterXSize'
mapraster.o(.text+0x4d7): undefined reference to `GDALGetRasterYSize'
mapraster.o(.text+0x4ee): undefined reference to `GDALGetGeoTransform'
mapraster.o(.text+0x504): undefined reference to `GDALGetDescription'
mapraster.o(.text+0x50c): undefined reference to `GDALReadWorldFile'
mapraster.o(.text+0x82d): undefined reference to `GDALGetRasterXSize'
mapraster.o(.text+0x891): undefined reference to `GDALGetRasterXSize'
mapraster.o(.text+0x902): undefined reference to `GDALGetRasterYSize'
mapraster.o(.text+0x965): undefined reference to `GDALGetRasterYSize'
mapraster.o(.text+0xb2f): undefined reference to `GDALGetRasterBand'
mapraster.o(.text+0xb5c): undefined reference to `GDALGetRasterCount'
mapraster.o(.text+0xb76): undefined reference to `GDALGetRasterColorTable'
mapraster.o(.text+0xb9c): undefined reference to `GDALGetRasterBand'
mapraster.o(.text+0xbae): undefined reference to `GDALGetRasterBand'
mapraster.o(.text+0xbc0): undefined reference to `GDALGetRasterBand'
mapraster.o(.text+0xbf8): undefined reference to `GDALGetRasterCount'
mapraster.o(.text+0xc0d): undefined reference to `GDALGetRasterBand'
mapraster.o(.text+0xc2e): undefined reference to `GDALGetRasterColorInterpretation'
mapraster.o(.text+0xc4e): undefined reference to `GDALGetRasterColorTable'
mapraster.o(.text+0xc64): undefined reference to `GDALCloneColorTable'
mapraster.o(.text+0xc84): undefined reference to `GDALCreateColorTable'
mapraster.o(.text+0xcc4): undefined reference to `GDALSetColorEntry'
mapraster.o(.text+0xd3e): undefined reference to `GDALGetColorEntryAsRGB'
mapraster.o(.text+0xdb0): undefined reference to `GDALGetColorEntryCount'
mapraster.o(.text+0xdec): undefined reference to `GDALGetColorEntryAsRGB'
mapraster.o(.text+0xe48): undefined reference to `GDALGetColorEntryCount'
mapraster.o(.text+0xece): undefined reference to `GDALRasterIO'
mapraster.o(.text+0xfcc): undefined reference to `GDALRasterIO'
mapraster.o(.text+0x1029): undefined reference to `GDALRasterIO'
mapraster.o(.text+0x1089): undefined reference to `GDALRasterIO'
mapraster.o(.text+0x1209): undefined reference to `GDALDestroyColorTable'
./libmap.a(mapraster.o): In function `msDrawRasterLayer':
mapraster.o(.text+0x4407): undefined reference to `GDALAllRegister'
mapraster.o(.text+0x440f): undefined reference to `CPLQuietErrorHandler'
mapraster.o(.text+0x4414): undefined reference to `CPLPushErrorHandler'
mapraster.o(.text+0x4431): undefined reference to `GDALOpen'
mapraster.o(.text+0x4470): undefined reference to `GDALGetProjectionRef'
mapraster.o(.text+0x44b7): undefined reference to `GDALGetGeoTransform'
mapraster.o(.text+0x44d0): undefined reference to `GDALReadWorldFile'
mapraster.o(.text+0x4585): undefined reference to `GDALClose'
./libmap.a(mapogr.o): In function `msLoadWKTProjectionString':
mapogr.o(.text+0x13): undefined reference to `OGRSpatialReference::OGRSpatialReference(char const *)'
mapogr.o(.text+0x22): undefined reference to `OGRSpatialReference::importFromWkt(char **)'
mapogr.o(.text+0x46): undefined reference to `OGRSpatialReference::~OGRSpatialReference(void)'
mapogr.o(.text+0x5f): undefined reference to `OGRSpatialReference::IsLocal(void) const'
mapogr.o(.text+0x71): undefined reference to `OGRSpatialReference::~OGRSpatialReference(void)'
mapogr.o(.text+0x8c): undefined reference to `OGRSpatialReference::exportToProj4(char **) const'
mapogr.o(.text+0xc6): undefined reference to `VSIFree'
mapogr.o(.text+0xd4): undefined reference to `OGRSpatialReference::~OGRSpatialReference(void)'
mapogr.o(.text+0x105): undefined reference to `OGRSpatialReference::~OGRSpatialReference(void)'
mapogr.o(.text+0x11f): undefined reference to `VSIFree'
mapogr.o(.text+0x12a): undefined reference to `OGRSpatialReference::~OGRSpatialReference(void)'
mapogr.o(.text+0x142): undefined reference to `OGRSpatialReference::~OGRSpatialReference(void)'
./libmap.a(mapogr.o): In function `msOGRSpatialRef2ProjectionObj(OGRSpatialReference *, projectionObj *)':
mapogr.o(.text+0x202): undefined reference to `OGRSpatialReference::IsLocal(void) const'
mapogr.o(.text+0x221): undefined reference to `OGRSpatialReference::exportToProj4(char **) const'
mapogr.o(.text+0x25b): undefined reference to `VSIFree'
mapogr.o(.text+0x297): undefined reference to `VSIFree'
./libmap.a(mapogr.o): In function `msOGCWKT2ProjectionObj':
mapogr.o(.text+0x2b6): undefined reference to `OGRSpatialReference::OGRSpatialReference(char const *)'
mapogr.o(.text+0x2c5): undefined reference to `OGRSpatialReference::importFromWkt(char **)'
mapogr.o(.text+0x2e9): undefined reference to `OGRSpatialReference::~OGRSpatialReference(void)'
mapogr.o(.text+0x30d): undefined reference to `OGRSpatialReference::~OGRSpatialReference(void)'
mapogr.o(.text+0x322): undefined reference to `OGRSpatialReference::~OGRSpatialReference(void)'
./libmap.a(mapresample.o): In function `msResampleGDALToMap':
mapresample.o(.text+0xb2c): undefined reference to `GDALGetGeoTransform'
mapresample.o(.text+0xb3e): undefined reference to `GDALGetDescription'
mapresample.o(.text+0xb54): undefined reference to `GDALGetDescription'
mapresample.o(.text+0xb5c): undefined reference to `GDALReadWorldFile'
mapresample.o(.text+0xb6a): undefined reference to `GDALGetRasterXSize'
mapresample.o(.text+0xb75): undefined reference to `GDALGetRasterYSize'
collect2: ld returned 1 exit status
make: *** [shp2img] Error 1
[root at ids mapserver-3.6.3]#

So what didn't I install correctly?







More information about the mapserver-users mailing list