[Mapserver-users] Map Server compile problem

Eric Wright eric.linux at shaw.ca
Wed Feb 25 19:35:37 PST 2004


Please ignore my last email, it has been one of those days...

I found the following in the make file:

# Optional PostGIS Support.  See http://postgis.refractions.net/
POSTGIS=      -DUSE_POSTGIS
POSTGIS_LIB=  -L -lpq
POSTGIS_INC=  -I

and edited it to read:

# Optional PostGIS Support.  See http://postgis.refractions.net/
POSTGIS=      -DUSE_POSTGIS
POSTGIS_LIB=  -L -lpq
#POSTGIS_INC=  -I

Which lead to the following list (long) of errors:

mappostgis.c:17:22: libpq-fe.h: No such file or directory
mappostgis.c:24: error: syntax error before "PGconn"
mappostgis.c:24: warning: no semicolon at end of struct or union
mappostgis.c:26: error: syntax error before '*' token
mappostgis.c:26: warning: type defaults to `int' in declaration of `query_result'
mappostgis.c:26: warning: data definition has no type or storage class
mappostgis.c:30: error: syntax error before '}' token
mappostgis.c:30: warning: type defaults to `int' in declaration of `msPOSTGISLayerInfo'
mappostgis.c:30: warning: data definition has no type or storage class
mappostgis.c:44: error: syntax error before '*' token
mappostgis.c:45: warning: return type defaults to `int'
mappostgis.c:49: error: syntax error before "msPOSTGISLayerInfo"
mappostgis.c: In function `setPostGISLayerInfo':
mappostgis.c:51: error: `layer' undeclared (first use in this function)
mappostgis.c:51: error: (Each undeclared identifier is reported only once
mappostgis.c:51: error: for each function it appears in.)
mappostgis.c:51: error: `postgislayerinfo' undeclared (first use in this function)
mappostgis.c: In function `msPOSTGISLayerOpen':
mappostgis.c:183: error: `layerinfo' undeclared (first use in this function)
mappostgis.c:203: error: syntax error before ')' token
mappostgis.c:210: warning: implicit declaration of function `PQconnectdb'
mappostgis.c:212: warning: implicit declaration of function `PQstatus'
mappostgis.c:212: error: `CONNECTION_BAD' undeclared (first use in this function)
mappostgis.c:215: warning: implicit declaration of function `PQerrorMessage'
mappostgis.c:221: warning: implicit declaration of function `PQsetNoticeProcessor'
mappostgis.c: At top level:
mappostgis.c:291: error: syntax error before "PGresult"
mappostgis.c: In function `prep_DB':
mappostgis.c:293: error: `PGresult' undeclared (first use in this function)
mappostgis.c:293: error: `result' undeclared (first use in this function)
mappostgis.c:301: error: `layerinfo' undeclared (first use in this function)
mappostgis.c:305: error: `layer' undeclared (first use in this function)
mappostgis.c:320: error: `geom_table' undeclared (first use in this function)
mappostgis.c:361: error: `geom_column' undeclared (first use in this function)
mappostgis.c:381: error: `rect' undeclared (first use in this function)
mappostgis.c:438: warning: implicit declaration of function `PQexec'
mappostgis.c:439: warning: implicit declaration of function `PQresultStatus'
mappostgis.c:439: error: `PGRES_COMMAND_OK' undeclared (first use in this function)
mappostgis.c:444: warning: implicit declaration of function `PQclear'
mappostgis.c:460: error: `sql_results' undeclared (first use in this function)
mappostgis.c:461: error: `query_string' undeclared (first use in this function)
mappostgis.c:491: warning: format argument is not a pointer (arg 4)
mappostgis.c: In function `msPOSTGISLayerWhichShapes':
mappostgis.c:526: error: `layerinfo' undeclared (first use in this function)
mappostgis.c:573: error: `PGRES_TUPLES_OK' undeclared (first use in this function)
mappostgis.c:577: warning: format argument is not a pointer (arg 4)
mappostgis.c: In function `msPOSTGISLayerClose':
mappostgis.c:599: error: `layerinfo' undeclared (first use in this function)
mappostgis.c:610: warning: implicit declaration of function `PQfinish'
mappostgis.c: In function `msPOSTGISLayerNextShape':
mappostgis.c:927: error: `layerinfo' undeclared (first use in this function)
mappostgis.c: In function `msPOSTGISLayerGetShapeRandom':
mappostgis.c:957: error: `layerinfo' undeclared (first use in this function)
mappostgis.c:993: warning: implicit declaration of function `PQntuples'
mappostgis.c:996: warning: implicit declaration of function `PQgetvalue'
mappostgis.c:1030: warning: implicit declaration of function `PQgetlength'
mappostgis.c:1021: warning: enumeration value `MS_LAYER_GRATICULE' not handled in switch
mappostgis.c: In function `msPOSTGISLayerGetShape':
mappostgis.c:1080: error: `PGresult' undeclared (first use in this function)
mappostgis.c:1081: error: `layerinfo' undeclared (first use in this function)
mappostgis.c:1133: warning: assignment makes pointer from integer without a cast
mappostgis.c:1134: error: `PGRES_COMMAND_OK' undeclared (first use in this function)
mappostgis.c:1144: warning: assignment makes pointer from integer without a cast
mappostgis.c:1158: warning: assignment makes pointer from integer without a cast
mappostgis.c:1164: warning: format argument is not a pointer (arg 4)
mappostgis.c:1178: warning: assignment makes pointer from integer without a cast
mappostgis.c:1179: error: `PGRES_TUPLES_OK' undeclared (first use in this function)
mappostgis.c:1183: warning: format argument is not a pointer (arg 4)
mappostgis.c:1224: warning: enumeration value `MS_LAYER_GRATICULE' not handled in switch
mappostgis.c: In function `msPOSTGISLayerGetItems':
mappostgis.c:1279: error: `layerinfo' undeclared (first use in this function)
mappostgis.c:1288: error: `PGresult' undeclared (first use in this function)
mappostgis.c:1321: warning: assignment makes pointer from integer without a cast
mappostgis.c:1322: error: `PGRES_TUPLES_OK' undeclared (first use in this function)
mappostgis.c:1326: warning: format argument is not a pointer (arg 4)
mappostgis.c:1338: warning: implicit declaration of function `PQnfields'
mappostgis.c:1347: warning: implicit declaration of function `PQfname'
mappostgis.c:1347: warning: assignment makes pointer from integer without a cast
make: *** [mappostgis.o] Error 1


Thanks again for your help.

Eric



----- Original Message -----
From: Frank Warmerdam <warmerdam at pobox.com>
Date: Wednesday, February 25, 2004 3:38 pm
Subject: Re: [Mapserver-users] Map Server compile problem

> E Wright wrote:
> > Map Server compile problem.
> > 
> > Good evening, I am trying to install the MapServer using the 
> following 
> > configure:
> > 
> > ./configure --with-gd=/usr/software/mapServer/gd-2.0.21 
> > --with-tiff=/usr/software/mapServer/tiff-v3.6.1 
> > --with-proj=/usr/software/mapServer/proj-4.4.7 
> > --with-ogr=/usr/local/bin/gdal-config 
> > --with-gdal=/usr/local/bin/gdal-config  
> > --with-postgis=/usr/local/pgsql/include/pg_config --with-wfs 
> > --with-curl=/usr/software/mapServer/curl-7.10.8/curl-config
> > 
> > This seems to run fine but when I try to run the make command I 
> get the 
> > following error:
> > 
> > gcc -c -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL -DUSE_PROJ 
> > -DUSE_PROJ_API_H -DUSE_WMS_SVR  -DUSE_WFS_SVR    -DUSE_TIFF -
> DUSE_JPEG 
> > -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT   -DUSE_OGR 
> > -DUSE_GDAL -DUSE_POSTGIS    -I/usr/software/mapServer/gd-2.0.21  
> > -I/usr/software/mapServer/proj-4.4.7/src 
> > -I/usr/software/mapServer/tiff-v3.6.1/libtiff      -
> I/usr/local/include 
> > -I/usr/local/include -I     maptemplate.c -o maptemplate.o
> > gcc: no input files
> > make: *** [maptemplate.o] Error 1
> > 
> > I am fairly new to using Linux so I am not always too sure what 
> > something is trying to tell me.
> > Any help that anyone can provide will be greatly appreciated.
> 
> E,
> 
> I think the problem is that "-I maptemplate.c" is causing the 
> maptemplate.cfilename to be "eaten" as part of the -I directive.   
> Try editing your
> Makefile, and searching for where a -I directive is setup with no 
> argumenttext.  Then remove the -I.
> 
> This shouldn't happen of course.  Your configure line looks ok.  If 
> you can
> report which macro was assigned this value we might be able to make 
> theconfigure more bulletproof.
> 
> PS. There isn't really that much benefit to having TIFF support 
> configuredin directly if you are also using GDAL.  You might want 
> to change
> --with-tiff=/usr/software/mapServer/tiff-v3.6.1 to --without-tiff.  
> TIFFfiles will still be supported, just through GDAL.
> 
> Best regards,
> -- 
> ---------------------------------------+----------------------------
> ----------
> I set the clouds in motion - turn up   | Frank Warmerdam, 
> warmerdam at pobox.comlight and sound - activate the windows | 
> http://pobox.com/~warmerdamand watch the world go round - Rush    | 
> Geospatial Programmer for Rent
> 
> 




More information about the MapServer-users mailing list