[Gmsh] solaris compilation problem

michael michael.gelle at osiatis.cnes.fr
Mon Apr 24 12:09:38 CEST 2006


Christophe Geuzaine wrote:

> michael wrote:
>
>> Hello,
>>
>> I try to compile the 1.64.1 version on a solaris 8 sparc platfrom.
>>
>> When i use the gmake commande, it is return this error :
>>
>> gmake[1]: Leaving directory `/OPT/tmp/tmp/gmsh-1.61.3/contrib/MathEval'
>> g++ -g -O2 -o bin/gmsh -Llib -lGmshFltk -lGmshParser -lGmshGraphics 
>> -lGmshMesh -lGmshGeo -lGmshCommon -lGmshDataStr -lGmshPlugin 
>> -lGmshNumeric -lGmshParallel -L/usr/local/lib -L/usr/openwin/lib 
>> -R/usr/openwin/lib -lfltk_images -lfltk_png -lz -lfltk_jpeg -lfltk_gl 
>> -lGLU -lGL -lfltk -ldl -lm -lXext -lX11 -lsocket -lnsl -lz -lGmshANN 
>> -lGmshMetis -lGmshNetgen -lGmshMathEval -lgsl -lgslcblas -lm -lsocket 
>> -lnsl -ldl
>> Undefined                       first referenced
>>  symbol                             in file
>> std::_List_node_base::swap(std::_List_node_base&, 
>> std::_List_node_base&)lib/libGmshMesh.a(BDS.o)
>> std::_Rb_tree_increment(std::_Rb_tree_node_base*)lib/libGmshFltk.a(GUI.o) 
>>
>> std::_List_node_base::hook(std::_List_node_base*)lib/libGmshMesh.a(BDS.o) 
>>
>> std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>>  >::_Rep::_S_empty_rep_storagelib/libGmshGraphics.a(Geom.o)
>> std::_List_node_base::unhook()      lib/libGmshMesh.a(BDS.o)
>> __gnu_cxx::__exchange_and_add(int volatile*, 
>> int)lib/libGmshGraphics.a(Geom.o)
>> std::basic_streambuf<char, std::char_traits<char> >::seekoff(long 
>> long, std::_Ios_Seekdir, 
>> std::_Ios_Openmode)lib/libGmshNetgen.a(nglib_addon.o)
>> std::_Rb_tree_increment(std::_Rb_tree_node_base 
>> const*)lib/libGmshMesh.a(BDS.o)
>> std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, 
>> std::_Rb_tree_node_base&)lib/libGmshMesh.a(BDS.o)
>> std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, 
>> std::_Rb_tree_node_base*, 
>> std::_Rb_tree_node_base&)lib/libGmshParser.a(FunctionManager.o)
>> std::_List_node_base::transfer(std::_List_node_base*, 
>> std::_List_node_base*)lib/libGmshMesh.a(BDS.o)
>> std::_Rb_tree_decrement(std::_Rb_tree_node_base*)lib/libGmshParser.a(FunctionManager.o) 
>>
>> ld: fatal: Symbol referencing errors. No output written to bin/gmsh
>> collect2: ld returned 1 exit status
>>
>>
>> It seem to have a problem with the link part of the Makefile.
>>
>> Anyone have a suggestion ?
>>
>
> Looks like the symbols from the standard template library cannot be 
> resolved. Maybe you need to add libstdc++ explicitly to the link line?
>
> What happens if you try to compile a simple program that uses some 
> classes from the std lib? Try e.g.
>
> #include <vector>
> #include <stdio.h>
> int main()
> {
>    std::vector<int> v(2);
>    v[0] = 1;
>    v[1] = v[0] * 2;
>    printf("%d %d\n", v[0], v[1]);
>    return 0;
> }
>
The compilation of this exemple with g++ is ok, there is no problems.

>
>
>> Thanks,
>>
>>
>
>


-- 

*Mickaël** GELLE*
Administrateur systèmes - OSIATIS
Détaché au CNES pour DSI/EP/ST
Tel. : (05 61 2)74031