[Mapserver-users] mapserver compile problems

Philipp Jacob philipp.jacob at geosysnet.de
Wed Jan 8 06:31:54 EST 2003


Daniel Morissette wrote:

>Philipp Jacob wrote:
>  
>
>>the configure command:
>>"CXX=/opt/gcc295/bin/c++ CC=/opt/gcc295/bin/gcc ./configure --with-gd
>>--with-php=../php-4.2.3/ --with-gdal=../gdal-1.1.7/
>>--enable-force-freetype1 --with-proj --with-wmsclient"
>>
>>    
>>
>...
>
>  
>
>>but when i do 'make' the make process stops with the following error:
>>
>>----------
>>[...some regular make outout above this...]
>>/opt/gcc295/bin/gcc -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL
>>-DUSE_PROJ -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/local/include            -I/usr/local/include
>>-I/usr/local/include/w3c-libwww -DHAVE_CONFIG_H  shp2img.o  -L. -lmap
>>-lgd -L/usr/local/lib -lgd -ljpeg -lttf -lpng -lz  -ltiff -ljpeg -lttf
>>-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+0x4d4): undefined reference to `GDALGetRasterXSize'
>>...
>>    
>>
>
>You are getting this because configure didn't find the 'gdal-config'
>script and it failed to include -lgdal.1.1 in the link arguments.  You
>have to pass the full path to the gdal-config file in the --with-gdal
>parameter, not just the path to GDAL (I know this can become confusing).
>
>The configure script should have complained about this but it didn't, so
>I fixed it in both 3.6.4-dev and 3.7-dev to complain about this
>mistake.  The './configure --help' output also documented the option as 
>'--with-gdal[=DIR]' and I changed it to '--with-gdal[=PATH]' which will
>hopefully reduce the chances of confusion.
>
>Now, you should be able to compile without getting those fixes as long
>as you pass the right argument to --with-gdal:
>
>Did you 'make install' in the GDAL directory?  That would be the best
>thing to do and then you could use '--with-gdal' without any argument
>assuming that /usr/local/bin/gdal-config is in your path.
>
>If you must specify an alternate location for GDAL then you should pass
>the full path and filename of the gdal-config script, if you didn't
>'make install' GDAL, then the path should likely be:
>  --with-gdal=../gdal-1.1.7/apps/gdal-config
>
>Daniel
>  
>

yes, the gdal-config problem is solved.
sorry, the last messages didn't reach the mailing list, my fault.

i did 'make install' and left out the path after --with-gdal, now the 
gdal libraries seems to be found.
but 'make' on the mapserver brings up even more 'undefined references'.

------------------   <below, my last message>


i recompiled the gdal library.
configure checked for OGR support and enabled it. well, sounds nice.
'make all' 'make install'    done..

then i configured the mapserver again.
additionally with the option: --with-ogr
configure finished successfully and i had a look at the Makefile.
OGR support is mentioned there, and the right paths are set. 
(/usr/local/lib -lgdal.1.1)

but 'make' brings even more 'undefined references' than before:

------------
...
/opt/gcc295/bin/gcc -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL 
-DUSE_PROJ -DUSE_WMS -DUSE_WMS_LYR  -DUSE_TIFF -DUSE_JPEG -DUSE_GD_PNG 
-DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT   -DUSE_OGR -DUSE_GDAL    
-I/usr/local/include         -I/usr/local/include -I/usr/local/include  
-I/usr/local/include -I/usr/local/include/w3c-libwww -DHAVE_CONFIG_H  
shp2img.o  -L. -lmap -lgd -L/usr/local/lib -lgd -ljpeg -lttf -lpng -lz  
-ltiff -ljpeg -lttf -lpng -lz -lproj -ljpeg   -L/usr/local/lib 
-lgdal.1.1   -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(mapogr.o): In function `ogrGeomPoints(OGRGeometry *, shapeObj 
*)':
mapogr.o(.text+0x16c): undefined reference to 
`OGRPolygon::getExteriorRing(void)'
mapogr.o(.text+0x199): undefined reference to 
`OGRPolygon::getInteriorRing(int)'
mapogr.o(.text+0x1b3): undefined reference to 
`OGRPolygon::getNumInteriorRings(void)'
mapogr.o(.text+0x20f): undefined reference to 
`OGRGeometryCollection::getNumGeometries(void)'
mapogr.o(.text+0x39d): undefined reference to 
`OGRPolygon::getExteriorRing(void)'
mapogr.o(.text+0x3ac): undefined reference to 
`OGRPolygon::getInteriorRing(int)'
mapogr.o(.text+0x40f): undefined reference to 
`OGRPolygon::getNumInteriorRings(void)'
mapogr.o(.text+0x449): undefined reference to 
`OGRGeometryCollection::getGeometryRef(int)'
...
./libmap.a(mapogr.o): In function `msOGRLayerGetAutoStyle':
mapogr.o(.text+0x2098): undefined reference to 
`OGRStyleMgr::OGRStyleMgr(OGRStyleTable *)'
mapogr.o(.text+0x20ce): undefined reference to 
`OGRStyleMgr::InitFromFeature(OGRFeature *)'
mapogr.o(.text+0x20dc): undefined reference to 
`OGRStyleMgr::GetPartCount(char const *)'
mapogr.o(.text+0x2104): undefined reference to 
`OGRStyleMgr::GetPart(int, char const *)'
mapogr.o(.text+0x2135): undefined reference to 
`OGRStyleTool::SetUnit(ogr_style_tool_units_id, double)'
mapogr.o(.text+0x2141): undefined reference to 
`OGRStyleTool::GetType(void)'
mapogr.o(.text+0x2168): undefined reference to 
`OGRStyleLabel::GetParamStr(ogr_style_tool_param_label_id, int &)'
mapogr.o(.text+0x219a): undefined reference to 
`OGRStyleLabel::GetParamDbl(ogr_style_tool_param_label_id, int &)'
mapogr.o(.text+0x21b8): undefined reference to 
`OGRStyleLabel::GetParamDbl(ogr_style_tool_param_label_id, int &)'
mapogr.o(.text+0x2212): undefined reference to 
`OGRStyleLabel::GetParamStr(ogr_style_tool_param_label_id, int &)'
mapogr.o(.text+0x221f): undefined reference to 
`OGRStyleTool::GetRGBFromString(char const *, int &, int &, int &, int &)'
mapogr.o(.text+0x2266): undefined reference to 
`OGRStyleLabel::GetParamStr(ogr_style_tool_param_label_id, int &)'
mapogr.o(.text+0x2273): undefined reference to 
`OGRStyleTool::GetRGBFromString(char const *, int &, int &, int &, int &)'
mapogr.o(.text+0x22b3): undefined reference to 
`OGRStyleLabel::GetParamStr(ogr_style_tool_param_label_id, int &)'
mapogr.o(.text+0x2368): undefined reference to 
`OGRStyleTool::GetType(void)'
mapogr.o(.text+0x2386): undefined reference to 
`OGRStylePen::GetParamStr(ogr_style_tool_param_pen_id, int &)'
mapogr.o(.text+0x23e6): undefined reference to 
`OGRStylePen::GetParamStr(ogr_style_tool_param_pen_id, int &)'
mapogr.o(.text+0x23f3): undefined reference to 
`OGRStyleTool::GetRGBFromString(char const *, int &, int &, int &, int &)'
mapogr.o(.text+0x2426): undefined reference to 
`OGRStylePen::GetParamDbl(ogr_style_tool_param_pen_id, int &)'
mapogr.o(.text+0x24c8): undefined reference to 
`OGRStyleTool::GetType(void)'
mapogr.o(.text+0x2509): undefined reference to 
`OGRStyleBrush::GetParamStr(ogr_style_tool_param_brush_id, int &)'
mapogr.o(.text+0x2516): undefined reference to 
`OGRStyleTool::GetRGBFromString(char const *, int &, int &, int &, int &)'
mapogr.o(.text+0x255d): undefined reference to 
`OGRStyleBrush::GetParamStr(ogr_style_tool_param_brush_id, int &)'
mapogr.o(.text+0x256a): undefined reference to 
`OGRStyleTool::GetRGBFromString(char const *, int &, int &, int &, int &)'
mapogr.o(.text+0x25a7): undefined reference to 
`OGRStyleBrush::GetParamStr(ogr_style_tool_param_brush_id, int &)'
mapogr.o(.text+0x25c8): undefined reference to 
`OGRStyleTool::GetType(void)'
mapogr.o(.text+0x25f9): undefined reference to 
`OGRStyleSymbol::GetParamStr(ogr_style_tool_param_symbol_id, int &)'
mapogr.o(.text+0x2606): undefined reference to 
`OGRStyleTool::GetRGBFromString(char const *, int &, int &, int &, int &)'
mapogr.o(.text+0x263a): undefined reference to 
`OGRStyleSymbol::GetParamDbl(ogr_style_tool_param_symbol_id, int &)'
mapogr.o(.text+0x266e): undefined reference to 
`OGRStyleSymbol::GetParamStr(ogr_style_tool_param_symbol_id, int &)'
mapogr.o(.text+0x26d4): undefined reference to 
`OGRStyleMgr::~OGRStyleMgr(void)'
collect2: ld returned 1 exit status
make: *** [shp2img] Error 1

------------

*aaarrrg*

any hint?





More information about the mapserver-users mailing list