I have access to sun studio 12 so I tried to compile protobuf 2.1.0
with this version of the compiler.
This is the error I get:

make  all-recursive
Making all in .
Making all in src
source='google/protobuf/descriptor.pb.cc' object='descriptor.pb.lo'
libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../depcomp \
/bin/bash ../libtool --tag=CXX   --mode=compile /nettools/sunstudio/
sunstudio12/SUNWspro/bin/CC -DHAVE_CONFIG_H -I. -I..    -D_REENTRANT  -
g -DNDEBUG -c -o descriptor.pb.lo `test -f 'google/protobuf       /
descriptor.pb.cc' || echo './'`google/protobuf/descriptor.pb.cc
libtool: compile:  /nettools/sunstudio/sunstudio12/SUNWspro/bin/CC -
DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -g -DNDEBUG -c google/protobuf/
descriptor.pb.cc  -KPIC -DPIC -o .libs/descriptor.pb.o
"./google/protobuf/stubs/once.h", line 114: Warning (Anachronism):
Formal argument 2 of type extern "C" void(*)() in call to pthread_once
(_once*, extern "C" void(*)()) is being passed void(*)().
"./google/protobuf/descriptor.h", line 324: Warning: Identifier
expected instead of "}".
"./google/protobuf/descriptor.h", line 343: Warning: Identifier
expected instead of "}".
"./google/protobuf/descriptor.h", line 354: Warning: Identifier
expected instead of "}".
"./google/protobuf/wire_format.h", line 177: Warning: Identifier
expected instead of "}".
"./google/protobuf/repeated_field.cc", line 52: Error:
google::protobuf::RepeatedPtrField<std::string>::Clear() already had a
body defined.
1 Error(s) and 5 Warning(s) detected.


On May 19, 10:15 pm, Kenton Varda <ken...@google.com> wrote:
> Can you try 2.1.0?  Some patches were submitted specifically for improving
> sun studio support.  Check the README, too, for some sun/solaris-specific
> tips.
> Let me know if that doesn't work.
>
> On Tue, May 19, 2009 at 2:11 AM, <cosmin.cremare...@gmail.com> wrote:
>
> > Hi
>
> > I'm running into some issues when compiling (more exactly linking)
> > protobuf 2.0.3.
>
> > Thanks in advance for any help.
> > Cosmin
>
> > CXX=/nettools/sunstudio/sunstudio11/SUNWspro/bin/CC CC=/nettools/
> > sunstudio/sunstudio11/SUNWspro/bin/cc ./configure --prefix=/src/work/
> > mw/protobuf-2.0.3-sunstudio11-build LDFLAGS=-L$PWD/src/solaris
>
> > bash$ uname -a
> > SunOS pegasus 5.10 Generic_118855-33 i86pc i386 i86pc
> > pegasus ccremarenco /src/work/mw/protobuf-2.0.3-sunstudio11/
> > bash$ CC -V
> > CC: Sun C++ 5.8 Patch 121018-11 2007/05/02
>
> > /bin/bash ../libtool --tag=CXX --mode=link /nettools/sunstudio/
> > sunstudio11/SUNWspro/bin/CC -D_REENTRANT  -g -xO4 -xlibmil -mt -
> > D_FORTEC_ -xlang=c99 -compat=5 -library=stlport4 -template=no%extdef -
> > D_REENTRANT -L/src/work/mw/protobuf-2.0.3-sunstudio11/src/solaris -o
> > protoc  main.o -lpthread libprotobuf.la libprotoc.la
> > libtool: link: /nettools/sunstudio/sunstudio11/SUNWspro/bin/CC -
> > D_REENTRANT -g -xO4 -xlibmil -mt -D_FORTEC_ -xlang=c99 -compat=5 -
> > template=no%extdef -D_REENTRANT -o .libs/protoc main.o  -L/src/work/mw/
> > protobuf-2.0.3-sunstudio11/src/solaris ./.libs/libprotobuf.so ./.libs/
> > libprotoc.so /src/work/mw/protobuf-2.0.3-sunstudio11/src/.libs/
> > libprotobuf.so -library=stlport4 -lpthread -mt -R/src/work/mw/
> > protobuf-2.0.3-sunstudio11-build/lib
> > ld: warning: file /src/work/mw/protobuf-2.0.3-sunstudio11/src/.libs/
> > libprotobuf.so: linked to ./.libs/libprotobuf.so: attempted multiple
> > inclusion of file
> > Undefined                       first referenced
> >  symbol                             in file
> > std::pair<std::_Rb_tree_iterator<const
> > google::protobuf::Descriptor*,std::_Nonconst_traits<const
> > google::protobuf::Descriptor*> >,bool>std::_Rb_tree<const
> > google::protobuf::Descriptor*,const
> > google::protobuf::Descriptor*,std::_Identity<const
> > google::protobuf::Descriptor*>,std::less<const
> > google::protobuf::Descriptor*>,std::allocator<const
> > google::protobuf::Descriptor*> >::insert_unique(const
> > google::protobuf::Descriptor*const&) ./.libs/libprotobuf.so
> > unsigned std::hashtable<std::pair<const char*const,const
> > google::protobuf::FileDescriptor*>,const
> > char*,google::protobuf::hash<const
> > char*>,std::_Select1st<std::pair<const char*const,const
> > google::protobuf::FileDescriptor*>
>
> > >,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator<st 
> > >d::pair<const
> > char*const,const google::protobuf::FileDescriptor*> > >::erase(const
> > char*const&) ./.libs/libprotobuf.so
> > void std::_Rb_tree<std::string,std::pair<const
>
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >,std::_Select1st<std::pair<const
>
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> > >,std::less<std::string>,std::allocator<std::pair<const
>
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> > > >::_M_erase(std::_Rb_tree_node<std::pair<const
>
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> > >*) ./.libs/libprotoc.so
> > std::pair<std::_Rb_tree_iterator<const
> > google::protobuf::FileDescriptor*,std::_Nonconst_traits<const
> > google::protobuf::FileDescriptor*> >,bool>std::_Rb_tree<const
> > google::protobuf::FileDescriptor*,const
> > google::protobuf::FileDescriptor*,std::_Identity<const
> > google::protobuf::FileDescriptor*>,std::less<const
> > google::protobuf::FileDescriptor*>,std::allocator<const
> > google::protobuf::FileDescriptor*> >::insert_unique(const
> > google::protobuf::FileDescriptor*const&) ./.libs/libprotoc.so
> > void std::_Rb_tree<int,std::pair<const
> > int,google::protobuf::UnknownField*>,std::_Select1st<std::pair<const
> > int,google::protobuf::UnknownField*>
> > >,std::less<int>,std::allocator<std::pair<const
> > int,google::protobuf::UnknownField*> > >::_M_erase
> > (std::_Rb_tree_node<std::pair<const
> > int,google::protobuf::UnknownField*> >*) ./.libs/libprotobuf.so
> > std::pair<std::_Ht_iterator<std::pair<const
> > google::protobuf::Descriptor*const,const
> > google::protobuf::Message*>,std::_Nonconst_traits<std::pair<const
> > google::protobuf::Descriptor*const,const google::protobuf::Message*>
> > >,const google::protobuf::Descriptor*,google::protobuf::hash<const
> > google::protobuf::Descriptor*>,std::_Select1st<std::pair<const
> > google::protobuf::Descriptor*const,const google::protobuf::Message*>
> > >,std::equal_to<const
> > google::protobuf::Descriptor*>,std::allocator<std::pair<const
> > google::protobuf::Descriptor*const,const google::protobuf::Message*> >
> > >,bool>std::hashtable<std::pair<const
> > google::protobuf::Descriptor*const,const
> > google::protobuf::Message*>,const
> > google::protobuf::Descriptor*,google::protobuf::hash<const
> > google::protobuf::Descriptor*>,std::_Select1st<std::pair<const
> > google::protobuf::Descriptor*const,const google::protobuf::Message*>
> > >,std::equal_to<const
> > google::protobuf::Descriptor*>,std::allocator<std::pair<const
> > google::protobuf::Descriptor*const,const google::protobuf::Message*> >
> > >::insert_unique_noresize(const std::pair<const
> > google::protobuf::Descriptor*const,const
> > google::protobuf::Message*>&) ./.libs/libprotobuf.so
> > std::pair<std::_Ht_iterator<std::pair<const char*const,const
> > google::protobuf::FileDescriptor*>,std::_Nonconst_traits<std::pair<const
> > char*const,const google::protobuf::FileDescriptor*> >,const
> > char*,google::protobuf::hash<const
> > char*>,std::_Select1st<std::pair<const char*const,const
> > google::protobuf::FileDescriptor*>
>
> > >,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator<st 
> > >d::pair<const
> > char*const,const google::protobuf::FileDescriptor*> >
> > >,bool>std::hashtable<std::pair<const char*const,const
> > google::protobuf::FileDescriptor*>,const
> > char*,google::protobuf::hash<const
> > char*>,std::_Select1st<std::pair<const char*const,const
> > google::protobuf::FileDescriptor*>
>
> > >,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator<st 
> > >d::pair<const
> > char*const,const google::protobuf::FileDescriptor*> >
> > >::insert_unique_noresize(const std::pair<const char*const,const
> > google::protobuf::FileDescriptor*>&) ./.libs/libprotobuf.so
> > void std::_Rb_tree<std::string,std::pair<const
> > std::string,std::string>,std::_Select1st<std::pair<const
> > std::string,std::string>
> > >,std::less<std::string>,std::allocator<std::pair<const
> > std::string,std::string> > >::_M_erase
> > (std::_Rb_tree_node<std::pair<const std::string,std::string>
> > >*) ./.libs/libprotobuf.so
> > void std::_Rb_tree<const google::protobuf::FileDescriptor*,const
> > google::protobuf::FileDescriptor*,std::_Identity<const
> > google::protobuf::FileDescriptor*>,std::less<const
> > google::protobuf::FileDescriptor*>,std::allocator<const
> > google::protobuf::FileDescriptor*> >::_M_erase
> > (std::_Rb_tree_node<const google::protobuf::FileDescriptor*>*) ./.libs/
> > libprotoc.so
> > void std::_Rb_tree<const google::protobuf::Descriptor*,const
> > google::protobuf::Descriptor*,std::_Identity<const
> > google::protobuf::Descriptor*>,std::less<const
> > google::protobuf::Descriptor*>,std::allocator<const
> > google::protobuf::Descriptor*> >::_M_erase(std::_Rb_tree_node<const
> > google::protobuf::Descriptor*>*) ./.libs/libprotobuf.so
> > unsigned std::hashtable<std::pair<const std::pair<const
> > google::protobuf::Descriptor*,int>,const
> > google::protobuf::FieldDescriptor*>,std::pair<const
>
> > google::protobuf::Descriptor*,int>,google::protobuf::__unnamed_sWhGbsSnEKGI 
> > w::PointerIntegerPairHash<std::pair<const
> > google::protobuf::Descriptor*,int> >,std::_Select1st<std::pair<const
> > std::pair<const google::protobuf::Descriptor*,int>,const
> > google::protobuf::FieldDescriptor*> >,std::equal_to<std::pair<const
> > google::protobuf::Descriptor*,int> >,std::allocator<std::pair<const
> > std::pair<const google::protobuf::Descriptor*,int>,const
> > google::protobuf::FieldDescriptor*> > >::_M_next_size(unsigned)
> > const ./.libs/libprotobuf.so
> > void std::_Rb_tree<std::pair<std::string,int>,std::pair<const
> > std::pair<std::string,int>,const
> > google::protobuf::FileDescriptorProto*>,std::_Select1st<std::pair<const
> > std::pair<std::string,int>,const
> > google::protobuf::FileDescriptorProto*>
> > >,std::less<std::pair<std::string,int>
> > >,std::allocator<std::pair<const std::pair<std::string,int>,const
> > google::protobuf::FileDescriptorProto*> > >::_M_erase
> > (std::_Rb_tree_node<std::pair<const std::pair<std::string,int>,const
> > google::protobuf::FileDescriptorProto*> >*) ./.libs/libprotobuf.so
> > void std::hashtable<std::pair<const std::pair<const void*,const
> > char*>,google::protobuf::__unnamed_sWhGbsSnEKGIw::Symbol>,std::pair<const
> > void*,const
>
> > char*>,google::protobuf::__unnamed_sWhGbsSnEKGIw::PointerStringPairHash,std 
> > ::_Select1st<std::pair<const
> > std::pair<const void*,const
> > char*>,google::protobuf::__unnamed_sWhGbsSnEKGIw::Symbol>
>
> > >,google::protobuf::__unnamed_sWhGbsSnEKGIw::PointerStringPairEqual,std::al 
> > >locator<std::pair<const
> > std::pair<const void*,const
> > char*>,google::protobuf::__unnamed_sWhGbsSnEKGIw::Symbol> > >::clear
> > () ./.libs/libprotobuf.so
> > std::_Rb_tree_iterator<std::pair<const
> > std::string,std::string>,std::_Nonconst_traits<std::pair<const
> > std::string,std::string> > >std::_Rb_tree<std::string,std::pair<const
> > std::string,std::string>,std::_Select1st<std::pair<const
> > std::string,std::string>
> > >,std::less<std::string>,std::allocator<std::pair<const
> > std::string,std::string> > >::insert_unique
> > (std::_Rb_tree_iterator<std::pair<const
> > std::string,std::string>,std::_Nonconst_traits<std::pair<const
> > std::string,std::string> > >,const std::pair<const
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to