MapServer / MapServer-import

3 stars 2 forks source link

Unable to compile mapserver with OGR enabled #1543

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: Donald.J.Miller@noaa.gov Date: 2005/11/25 - 21:17

Installation of mapserver 4.6.1 unable to complete, error below:
gcc -O2 -fPIC -Wall   -DIGNORE_MISSING_DATA  -DNEED_STRLCAT  -DUSE_EPPL
-DUSE_PROJ -DUSE_WMS_SVR  -DUSE_WFS_SVR  -DUSE_WCS_SVR     -DUSE_GD_GIF
-DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_GDIMAGEGIFPTR
-DGD_HAS_GETBITMAPFONTS    -DUSE_OGR -DUSE_GDAL -DUSE_GEOS -DUSE_ICONV   
-DUSE_POSTGIS -DUSE_MYGIS   -DUSE_ZLIB -I/usr/include       
-I/usr/local/gdal/include -I/usr/local/pgsql/include
-I/usr/local/mysql/include/mysql    -I/usr/local/geos/include    shp2img.o  -L.
-lmap -lgd -L/usr/lib -lgd -ljpeg -lfreetype -lpng -lz    -ljpeg -lfreetype
-lpng -lz   -lproj -ljpeg  -L/usr/local/gdal/lib -lgdal -L/usr/local/pgsql/lib
-lpq -L/usr/local/mysql/lib/mysql -lmysqlclient -L/usr/lib -lz -lcrypt -lnsl -lm
-L/usr/lib -lssl -lcrypto -lmysqlclient   -L/usr/local/geos/lib -lgeos   -lc 
-lz -lm -lstdc++  -o shp2img
./libmap.a(mapogr.o)(.text+0x1201): In function
`msOGRFileWhichShapes(layer_obj*, rectObj, ms_ogr_file_info_t*)':
: undefined reference to `OGRLineString::setPoint(int, double, double)'
./libmap.a(mapogr.o)(.text+0x1218): In function
`msOGRFileWhichShapes(layer_obj*, rectObj, ms_ogr_file_info_t*)':
: undefined reference to `OGRLineString::setPoint(int, double, double)'
./libmap.a(mapogr.o)(.text+0x122f): In function
`msOGRFileWhichShapes(layer_obj*, rectObj, ms_ogr_file_info_t*)':
: undefined reference to `OGRLineString::setPoint(int, double, double)'
./libmap.a(mapogr.o)(.text+0x1246): In function
`msOGRFileWhichShapes(layer_obj*, rectObj, ms_ogr_file_info_t*)':
: undefined reference to `OGRLineString::setPoint(int, double, double)'
./libmap.a(mapogr.o)(.text+0x125d): In function
`msOGRFileWhichShapes(layer_obj*, rectObj, ms_ogr_file_info_t*)':
: undefined reference to `OGRLineString::setPoint(int, double, double)'
collect2: ld returned 1 exit status
make: *** [shp2img] Error 1

GDAL 1.3.1 with OGR installed in /usr/local/gdal.  
System: RedHat FC3.  

Thank you.
tbonfort commented 12 years ago

Author: dmorissette Date: 2005/11/25 - 21:42

Frank, does this error ring any bell to you?
tbonfort commented 12 years ago

Author: fwarmerdam Date: 2005/11/25 - 21:55

Daniel, 

The 2D setPoint() method is a fairly recent addition to ogr_geometry.h.
Before that there was only a 3D version with a defaulted z=0 value. 

I *suspect* Donald is building mapogr.cpp using the new GDAL 1.3.1
include files (so it looks for the 2D setPoint(), but is picking up an
older libgdal.so at runtime (that only has the 3D version). 

I suggest a careful review of what versions of GDAL/OGR are installed, 
and/or scrubbing GDAL/OGR and re-installing clean.  
tbonfort commented 12 years ago

Author: dmorissette Date: 2005/12/08 - 23:11

No news from Donald, so we'll close assuming that Frank's assessment was right
that there might be multiple copies of GDAL on the system.