[Gdal-dev] grass support in gdal on solaris

Mateusz Loskot mateusz at loskot.net
Sat Sep 8 12:48:08 EDT 2007


Jachym Cepicky wrote:
> Hi,
> 
> I would like to compile GDAL (1.4.2) with GRASS support on Sun
> Solaris 10, Ultra Sparc architecture.
> 
> I get this error: /usr/local/grass-6.2.2//lib/libgrass_I.so
> definition taken Undefined                       first referenced 
> symbol                             in file 
> std::_Rb_tree_increment(std::_Rb_tree_node_base*)/export/home/meteo/src/gdal/gdal-1.4.2/.libs/libgdal.so
>  std::basic_string<char, std::char_traits<char>, std::allocator<char>
> 
>> ::_Rep::_S_empty_rep_storage/export/home/meteo/src/gdal/gdal-1.4.2/.libs/libgdal.so
>> 
> __gnu_cxx::__exchange_and_add(int volatile*, 
> int)/export/home/meteo/src/gdal/gdal-1.4.2/.libs/libgdal.so 
> std::_Rb_tree_increment(std::_Rb_tree_node_base 
> const*)/export/home/meteo/src/gdal/gdal-1.4.2/.libs/libgdal.so 
> std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, 
> std::_Rb_tree_node_base&)/export/home/meteo/src/gdal/gdal-1.4.2/.libs/libgdal.so
>  std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, 
> std::_Rb_tree_node_base*, 
> std::_Rb_tree_node_base&)/export/home/meteo/src/gdal/gdal-1.4.2/.libs/libgdal.so
>  
> std::_Rb_tree_decrement(std::_Rb_tree_node_base*)/export/home/meteo/src/gdal/gdal-1.4.2/.libs/libgdal.so
>  ld: fatal: Symbol referencing errors. No output written to
> .libs/ogrinfo collect2: ld returned 1 exit status gmake[1]: ***
> [ogrinfo] Error 1 gmake[1]: Leaving directory
> `/export/home/meteo/src/gdal/gdal-1.4.2/ogr' gmake: *** [ogr-apps]
> Error 2
> 
> could anybody give me an advice, how to approach?

Jachym,

The error you're getting means that GDAL seems to not linked with C++
library (-lstdc++). Could you try to add -lstdc++ to LIBS in
GDALmake.opt, near line 41 and see if that helps?

The Rb_tree_ stuff reported here comes from libstdc++ implementation of
 red-black tree. This tree implementation is used by std::map, std::set
and other tree-based containers in std::.

The implementation of this stuff in (old) libstdc++ is not only based on
C++ templates but requires a client lib/app to be linked with -lstdc++,
unfortunately.

BTW, please remember to do make clean after you update GDALmake.opt.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net




More information about the Gdal-dev mailing list