GDAL Make Fails

Frank Warmerdam fwarmerdam at GMAIL.COM
Mon Feb 7 17:18:47 EST 2005


On Mon, 7 Feb 2005 17:01:28 -0500, AJ Kertis <akertis at gmail.com> wrote:
> I try to do a make and it fails in the ogr directory.
>
> make[1]: Leaving directory `/home/mapserver/gdal-1.2.5/ogr/ogrsf_frmts'
> /bin/sh ../libtool --mode=link  g++  ogrinfo.o ../libgdal.la -o ogrinfo
> g++ ogrinfo.o -o .libs/ogrinfo  ../.libs/libgdal.so -
> L/usr/local/lib /usr/local/lib/libgeos.so -L/usr/local/GeoExpress-
> SDK//lib/Release -lltidsdk -lpthread -lgif /usr/lib/libjpeg.so -ltiff -
> lpng -lz -ldl -L/usr/local/pgcluster/lib -lpq -Wl,--rpath -
> Wl,/home/mapserver/lib
> ../.libs/libgdal.so: undefined reference to
> `std::__default_alloc_template<true, 0>::allocate(unsigned int)'
> ../.libs/libgdal.so: undefined reference to `std::basic_string<wchar_t,
> std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_create
> (unsigned int, std::allocator<wchar_t> const&)'
> ../.libs/libgdal.so: undefined reference to `std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::_M_check(unsigned int)
> const'
> ../.libs/libgdal.so: undefined reference to `std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::_Rep::_S_create(unsigned
> int, std::allocator<char> const&)'
> ../.libs/libgdal.so: undefined reference to `std::basic_string<wchar_t,
> std::char_traits<wchar_t>, std::allocator<wchar_t>
> >::_S_empty_rep_storage'
> ../.libs/libgdal.so: undefined reference to `std::basic_string<char,
> std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
> ../.libs/libgdal.so: undefined reference to
> `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned
> int)'
> collect2: ld returned 1 exit status
> make: *** [ogrinfo] Error 1
>
> I'm not sure what this means exactly or whats it not finding a ref to.
> Any help would be much appreciated.

AJ,

I believe the problem is that you aren't using a version of gcc compatible
with the MrSID SDK.  In my experience you need to use gcc 3.2.3 with
the recent versions of the SDK.  Mixing C++ object code doesn't work
well due to changes over time in the C++ support library names.

I got the same message last week on a clients machine where
I attempted to use GCC 3.4.x with the MrSID library.  However,
I think a gcc 3.3.3 may have worked with the MrSID libraries.

The assorted binary compatibility issues of C++, especially with gcc,
drive me nuts.

Good luck,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list