Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-29 Thread Monty Taylor

Kenton Varda wrote:
> PS. Did you see the patch on issue 105 for ptrdiff and offsets_ ?
> 
> 
> Yeargh, I wish I could tell the code site to e-mail me whenever someone
> submits an issue, because I always forget to go look.

Yeah. I completely agree... It doesn't seem to email on updates either.
I just uploaded the int-cast patch, and it does, in fact, seem to work.
(There is nothing special in the patch - just the int-cast in the macro,
in case you don't feel like actually applying the patch.)

Monty

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-27 Thread Kenton Varda
Submitted as rev 151.

On Wed, May 27, 2009 at 5:44 PM, Monty Taylor  wrote:

> PS. Did you see the patch on issue 105 for ptrdiff and offsets_ ?
>

Yeargh, I wish I could tell the code site to e-mail me whenever someone
submits an issue, because I always forget to go look.


>
> === modified file 'm4/acx_check_suncc.m4'
> --- m4/acx_check_suncc.m4   2009-05-28 09:33:56 +
> +++ m4/acx_check_suncc.m4   2009-05-28 09:34:20 +
> @@ -12,7 +12,8 @@
>
>  AC_DEFUN([ACX_CHECK_SUNCC],[
>
> -  AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
> +  AC_LANG_PUSH([C++])
> +  AC_CHECK_DECL([__SUNPRO_CC], [SUNCC="yes"], [SUNCC="no"])
>
>   AS_IF([test "$SUNCC" = "yes"],[
> isainfo_k=`isainfo -k`
> @@ -30,4 +31,5 @@
> CFLAGS="-g -xO4 -xlibmil -xdepend -Xa -mt -xstrconst ${IS_64}
> ${MEMALIGN_FLAGS} $CFLAGS"
> CXXFLAGS="-g -xO4 -xlibmil -mt ${IS_64} ${MEMALIGN_FLAGS} -xlang=c99
> -compat=5 -library=stlport4 -template=no%extdef $CXXFLAGS"
>   ])
> +  AC_LANG_POP()
>  ])
>
>
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-27 Thread Monty Taylor
Kenton Varda wrote:
> Thanks for the patch, Monty.
> 
> Unfortunately it looks like it has been mangled somewhere in flight.
>  Can you send it as an attachment instead?

No problem! Here you go.

Monty


PS. Did you see the patch on issue 105 for ptrdiff and offsets_ ?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---

=== modified file 'm4/acx_check_suncc.m4'
--- m4/acx_check_suncc.m4   2009-05-28 09:33:56 +
+++ m4/acx_check_suncc.m4   2009-05-28 09:34:20 +
@@ -12,7 +12,8 @@
 
 AC_DEFUN([ACX_CHECK_SUNCC],[
 
-  AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+  AC_LANG_PUSH([C++])
+  AC_CHECK_DECL([__SUNPRO_CC], [SUNCC="yes"], [SUNCC="no"])
 
   AS_IF([test "$SUNCC" = "yes"],[
 isainfo_k=`isainfo -k`
@@ -30,4 +31,5 @@
 CFLAGS="-g -xO4 -xlibmil -xdepend -Xa -mt -xstrconst ${IS_64} 
${MEMALIGN_FLAGS} $CFLAGS"
 CXXFLAGS="-g -xO4 -xlibmil -mt ${IS_64} ${MEMALIGN_FLAGS} -xlang=c99 
-compat=5 -library=stlport4 -template=no%extdef $CXXFLAGS"
   ])
+  AC_LANG_POP()
 ])



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-27 Thread Kenton Varda
Thanks for the patch, Monty.
Unfortunately it looks like it has been mangled somewhere in flight.  Can
you send it as an attachment instead?

On Thu, May 21, 2009 at 11:01 AM, Monty Taylor  wrote:

> Kenton Varda wrote:
> > On Wed, May 20, 2009 at 12:58 PM, Monty Taylor  > > wrote:
> >
> > Works fine then, as I'm using it pretty consistently with Sun Studio
> -
> > guess it's just the pedanticness.
> >
> >
> > Note that the whole "once" thing is new in 2.1.0 -- you've tested that
> > one, right?
>
> Ok. I reproduced (sorry - turns out I hadn't done 2.1.0 on my solaris
> boxes yet - only on my linux boxes) and fixed.
>
> The Sun autoconf check was assuming language and was checking for
> __SUNPRO_C, but at some point an AC_LANG_PUSH(C++) had happened and
> hadn't been popped. Solution: add an explicit PUSH and POP in the test.
> :) The real key for the build failure is making sure -template=no%extdef
> is in the CXXFLAGS
>
> BTW, I'll put together a different patch that does the CXXFLAGS setting
> stuff more cleanly. You are right - we should eventually be setting
> AM_CXXFLAGS here.
>
> diff -Nru protobuf-2.1.0/m4/acx_check_suncc.m4
> protobuf-2.1.0-mt/m4/acx_check_suncc.m4
> --- protobuf-2.1.0/m4/acx_check_suncc.m42009-05-13
> 13:36:16.0 -0700
> +++ protobuf-2.1.0-mt/m4/acx_check_suncc.m4 2009-05-21
> 19:57:41.917760080 -0700
> @@ -12,7 +12,9 @@
>
>  AC_DEFUN([ACX_CHECK_SUNCC],[
>
> -  AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
> +  AC_LANG_PUSH([C++])
> +
> +  AC_CHECK_DECL([__SUNPRO_CC], [SUNCC="yes"], [SUNCC="no"])
>
>   AS_IF([test "$SUNCC" = "yes"],[
> isainfo_k=`isainfo -k`
> @@ -30,4 +32,5 @@
> CFLAGS="-g -xO4 -xlibmil -xdepend -Xa -mt -xstrconst ${IS_64}
> ${MEMALIGN_FLAGS} $CFLAGS"
> CXXFLAGS="-g -xO4 -xlibmil -mt ${IS_64} ${MEMALIGN_FLAGS}
> -xlang=c99 -compat=5 -library=stlport4 -template=no%extdef $CXXFLAGS"
>   ])
> +  AC_LANG_POP()
>  ])
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-21 Thread Monty Taylor

Kenton Varda wrote:
> On Wed, May 20, 2009 at 12:58 PM, Monty Taylor  > wrote:
> 
> Works fine then, as I'm using it pretty consistently with Sun Studio -
> guess it's just the pedanticness.
> 
> 
> Note that the whole "once" thing is new in 2.1.0 -- you've tested that
> one, right?

Ok. I reproduced (sorry - turns out I hadn't done 2.1.0 on my solaris
boxes yet - only on my linux boxes) and fixed.

The Sun autoconf check was assuming language and was checking for
__SUNPRO_C, but at some point an AC_LANG_PUSH(C++) had happened and
hadn't been popped. Solution: add an explicit PUSH and POP in the test.
:) The real key for the build failure is making sure -template=no%extdef
is in the CXXFLAGS

BTW, I'll put together a different patch that does the CXXFLAGS setting
stuff more cleanly. You are right - we should eventually be setting
AM_CXXFLAGS here.

diff -Nru protobuf-2.1.0/m4/acx_check_suncc.m4
protobuf-2.1.0-mt/m4/acx_check_suncc.m4
--- protobuf-2.1.0/m4/acx_check_suncc.m42009-05-13
13:36:16.0 -0700
+++ protobuf-2.1.0-mt/m4/acx_check_suncc.m4 2009-05-21
19:57:41.917760080 -0700
@@ -12,7 +12,9 @@

 AC_DEFUN([ACX_CHECK_SUNCC],[

-  AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+  AC_LANG_PUSH([C++])
+
+  AC_CHECK_DECL([__SUNPRO_CC], [SUNCC="yes"], [SUNCC="no"])

   AS_IF([test "$SUNCC" = "yes"],[
 isainfo_k=`isainfo -k`
@@ -30,4 +32,5 @@
 CFLAGS="-g -xO4 -xlibmil -xdepend -Xa -mt -xstrconst ${IS_64}
${MEMALIGN_FLAGS} $CFLAGS"
 CXXFLAGS="-g -xO4 -xlibmil -mt ${IS_64} ${MEMALIGN_FLAGS}
-xlang=c99 -compat=5 -library=stlport4 -template=no%extdef $CXXFLAGS"
   ])
+  AC_LANG_POP()
 ])

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-21 Thread Kenton Varda
On Wed, May 20, 2009 at 12:58 PM, Monty Taylor  wrote:

> Works fine then, as I'm using it pretty consistently with Sun Studio -
> guess it's just the pedanticness.


Note that the whole "once" thing is new in 2.1.0 -- you've tested that one,
right?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-20 Thread Monty Taylor

Kenton Varda wrote:
> 
> 
> On Wed, May 20, 2009 at 10:44 AM, Monty Taylor  > wrote:
> 
> Kenton Varda wrote:
> >
> >
> > On Wed, May 20, 2009 at 12:35 AM,  
> >  >> wrote:
> >
> > "./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(*)().
> >
> >
> > This warning seems to be saying that pointers to functions with extern
> > "C" are not compatible with pointers to normal functions.  If this is
> > the case then that's a serious problem and I don't know what to do
> about
> > it.  But I think it's more likely that this is just bogus.
> 
> AIUI, it stems from the fact that the Sun Studio C and C++ compilers are
> separate... but I'm not 100% sure about that. In general, if you are
> passing a pointer to a function that was compiled in C++ land, Sun
> Studio is going to complain if you don't declare that function to have C
> linkage. I had to do that for all of my callback functions in
> Drizzle. :)
> 
> Now - as for it _actually_ being a problem, I don't know - I can ask
> someone though if you think it's important to learn.
> 
> 
> If it doesn't work then libprotobuf is completely broken on sun studio,
> because we rely on being able to pass non-extern-C functions to
> pthread_once.

Works fine then, as I'm using it pretty consistently with Sun Studio -
guess it's just the pedanticness.

Monty

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-20 Thread Kenton Varda
On Wed, May 20, 2009 at 10:44 AM, Monty Taylor  wrote:

> Kenton Varda wrote:
> >
> >
> > On Wed, May 20, 2009 at 12:35 AM,  > > wrote:
> >
> > "./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(*)().
> >
> >
> > This warning seems to be saying that pointers to functions with extern
> > "C" are not compatible with pointers to normal functions.  If this is
> > the case then that's a serious problem and I don't know what to do about
> > it.  But I think it's more likely that this is just bogus.
>
> AIUI, it stems from the fact that the Sun Studio C and C++ compilers are
> separate... but I'm not 100% sure about that. In general, if you are
> passing a pointer to a function that was compiled in C++ land, Sun
> Studio is going to complain if you don't declare that function to have C
> linkage. I had to do that for all of my callback functions in Drizzle. :)
>
> Now - as for it _actually_ being a problem, I don't know - I can ask
> someone though if you think it's important to learn.


If it doesn't work then libprotobuf is completely broken on sun studio,
because we rely on being able to pass non-extern-C functions to
pthread_once.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-20 Thread Monty Taylor

Kenton Varda wrote:
> 
> 
> On Wed, May 20, 2009 at 12:35 AM,  > wrote:
> 
> "./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(*)().
> 
> 
> This warning seems to be saying that pointers to functions with extern
> "C" are not compatible with pointers to normal functions.  If this is
> the case then that's a serious problem and I don't know what to do about
> it.  But I think it's more likely that this is just bogus.

AIUI, it stems from the fact that the Sun Studio C and C++ compilers are
separate... but I'm not 100% sure about that. In general, if you are
passing a pointer to a function that was compiled in C++ land, Sun
Studio is going to complain if you don't declare that function to have C
linkage. I had to do that for all of my callback functions in Drizzle. :)

Now - as for it _actually_ being a problem, I don't know - I can ask
someone though if you think it's important to learn.

Monty

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-20 Thread Kenton Varda
On Wed, May 20, 2009 at 12:35 AM,  wrote:

> "./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(*)().


This warning seems to be saying that pointers to functions with extern "C"
are not compatible with pointers to normal functions.  If this is the case
then that's a serious problem and I don't know what to do about it.  But I
think it's more likely that this is just bogus.


> "./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 "}".


These are just complaining that an enum had a trailing comma, like:
  enum {A, B, C, };

This is valid C++ so I'd say the warning is bogus.


> "./google/protobuf/repeated_field.cc", line 52: Error:
> google::protobuf::RepeatedPtrField::Clear() already had a
> body defined.


This error is incorrect.  This looks like a case of poor template support.
 There was a body defined for a general RepeatedPtrField::Clear(), but
repeated_field.h also explicitly specializes for string on line 563 without
defining a method body -- the body is in repeated_field.cc.

Perhaps the hack used to work around problems with HP C++/Tru64 should also
apply to Sun Studio?

If you can make it work, send me a patch.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-20 Thread Monty Taylor

cosmin.cremare...@gmail.com wrote:
> I'm using libtool v2.2.6
> 
> To make sure that protobuf always links to stlport I added CXXFLAGS="-
> library=stlport4" to the configure command.

Well... you shouldn't need to do that, we're forcing that on in
configure anyway. :)

> At the end I get the same linking errors.
> Is the below warning from ld meaningful?
> 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

Don't think so - I'm going to go recompile and see if I can reproduce.

> Regards,
> 
> Cosmin
> 
> On May 19, 10:14 pm, Monty Taylor  wrote:
>> 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
>> Well... it looks fine on the surface - but there may have been a problem
>> further back in your build histoy. Are there any references to -Cstd in
>> there? If so, you need to install libtool 2.2 and then re-run autogen.sh
>> (older libtools do bad things on solaris) But I don't remember having
>> had to do that last time I built.
>>
>>> /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>> google::protobuf::Descriptor*,std::_Nonconst_traits>> google::protobuf::Descriptor*> >,bool>std::_Rb_tree>> google::protobuf::Descriptor*,const
>>> google::protobuf::Descriptor*,std::_Identity>> google::protobuf::Descriptor*>,std::less>> google::protobuf::Descriptor*>,std::allocator>> google::protobuf::Descriptor*> >::insert_unique(const
>>> google::protobuf::Descriptor*const&) ./.libs/libprotobuf.so
>>> unsigned std::hashtable>> google::protobuf::FileDescriptor*>,const
>>> char*,google::protobuf::hash>> char*>,std::_Select1st>> google::protobuf::FileDescriptor*>
 ,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator>>>  ::pair>> char*const,const google::protobuf::FileDescriptor*> > >::erase(const
>>> char*const&) ./.libs/libprotobuf.so
>>> void std::_Rb_tree>> std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
>>> >,std::_Select1st>> std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
>>> >
 ,std::less,std::allocator>> std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
>>> >
> ::_M_erase(std::_Rb_tree_node>> std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
>>> >
 *) ./.libs/libprotoc.so
>>> std::pair>> google::protobuf::FileDescriptor*,std::_Nonconst_traits>> google::protobuf::FileDescriptor*> >,bool>std::_Rb_tree>> google::protobuf::FileDescriptor*,const
>>> google::protobuf::FileDescriptor*,std::_Identity>> google::protobuf::FileDescriptor*>,std::less>> google::protobuf::FileDescriptor*>,std::allocator>> google::protobuf::FileDescriptor*> >::insert_unique(const
>>> google::protobuf::FileDescriptor*const&) ./.libs/libprotoc.so
>>> void std::_Rb_tree>> int,google::protobuf::UnknownField*>,std::_Select1st>> int,google::protobuf::UnknownField*>
 ,std::less,std::allocator>> int,google::protobuf::UnknownField*> > >::_M_erase
>>> (std::_Rb_tree_node>> int,google::protobuf::UnknownField*> >*) ./.libs/libprotobuf.so
>>> std::pair>> google::protobuf::Descriptor*const,const
>>> google::protobuf::Message*>,std::_Nonconst_traits>> google::protobuf::Descriptor*const,const google::protobuf::Message*>
 ,const google::protobuf::Descriptor*,google::protobuf::hash>> google::protobuf::Descriptor*>,std::_Select1st>> google::protobuf::D

Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-20 Thread cosmin . cremarenco

I'm using libtool v2.2.6

To make sure that protobuf always links to stlport I added CXXFLAGS="-
library=stlport4" to the configure command.
At the end I get the same linking errors.
Is the below warning from ld meaningful?
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

Regards,

Cosmin

On May 19, 10:14 pm, Monty Taylor  wrote:
> 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
>
> Well... it looks fine on the surface - but there may have been a problem
> further back in your build histoy. Are there any references to -Cstd in
> there? If so, you need to install libtool 2.2 and then re-run autogen.sh
> (older libtools do bad things on solaris) But I don't remember having
> had to do that last time I built.
>
> > /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 > google::protobuf::Descriptor*,std::_Nonconst_traits > google::protobuf::Descriptor*> >,bool>std::_Rb_tree > google::protobuf::Descriptor*,const
> > google::protobuf::Descriptor*,std::_Identity > google::protobuf::Descriptor*>,std::less > google::protobuf::Descriptor*>,std::allocator > google::protobuf::Descriptor*> >::insert_unique(const
> > google::protobuf::Descriptor*const&) ./.libs/libprotobuf.so
> > unsigned std::hashtable > google::protobuf::FileDescriptor*>,const
> > char*,google::protobuf::hash > char*>,std::_Select1st > google::protobuf::FileDescriptor*>
> >> ,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator >>  ::pair > char*const,const google::protobuf::FileDescriptor*> > >::erase(const
> > char*const&) ./.libs/libprotobuf.so
> > void std::_Rb_tree > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >,std::_Select1st > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> >> ,std::less,std::allocator > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> >>> ::_M_erase(std::_Rb_tree_node > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> >> *) ./.libs/libprotoc.so
> > std::pair > google::protobuf::FileDescriptor*,std::_Nonconst_traits > google::protobuf::FileDescriptor*> >,bool>std::_Rb_tree > google::protobuf::FileDescriptor*,const
> > google::protobuf::FileDescriptor*,std::_Identity > google::protobuf::FileDescriptor*>,std::less > google::protobuf::FileDescriptor*>,std::allocator > google::protobuf::FileDescriptor*> >::insert_unique(const
> > google::protobuf::FileDescriptor*const&) ./.libs/libprotoc.so
> > void std::_Rb_tree > int,google::protobuf::UnknownField*>,std::_Select1st > int,google::protobuf::UnknownField*>
> >> ,std::less,std::allocator > int,google::protobuf::UnknownField*> > >::_M_erase
> > (std::_Rb_tree_node > int,google::protobuf::UnknownField*> >*) ./.libs/libprotobuf.so
> > std::pair > google::protobuf::Descriptor*const,const
> > google::protobuf::Message*>,std::_Nonconst_traits > google::protobuf::Descriptor*const,const google::protobuf::Message*>
> >> ,const google::protobuf::Descriptor*,google::protobuf::hash > google::protobuf::Descriptor*>,std::_Select1st > google::protobuf::Descriptor*const,const google::protobuf::Message*>
> >> ,std::equal_to > google::protobuf::Descriptor*>,std::allocator > google::protobuf::Descriptor*const,const google::protobuf::Message*> >
> >> ,bool>std::hashtable > 

Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-20 Thread cosmin . cremarenco

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::Clear() already had a
body defined.
1 Error(s) and 5 Warning(s) detected.


On May 19, 10:15 pm, Kenton Varda  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,  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 > google::protobuf::Descriptor*,std::_Nonconst_traits > google::protobuf::Descriptor*> >,bool>std::_Rb_tree > google::protobuf::Descriptor*,const
> > google::protobuf::Descriptor*,std::_Identity > google::protobuf::Descriptor*>,std::less > google::protobuf::Descriptor*>,std::allocator > google::protobuf::Descriptor*> >::insert_unique(const
> > google::protobuf::Descriptor*const&) ./.libs/libprotobuf.so
> > unsigned std::hashtable > google::protobuf::FileDescriptor*>,const
> > char*,google::protobuf::hash > char*>,std::_Select1st > google::protobuf::FileDescriptor*>
>
> > >,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator > >d::pair > char*const,const google::protobuf::FileDescriptor*> > >::erase(const
> > char*const&) ./.libs/libprotobuf.so
> > void std::_Rb_tree
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >,std::_Select1st
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> > >,std::less,std::allocator
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> > > >::_M_erase(std::_Rb_tree_node
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> > >*) ./.libs/libprotoc.so
> > std::pair > google::protobuf::FileDescriptor*,std::_Nonconst_traits > google::protobuf::FileDescriptor*> >,bool>std::_Rb_tree > google::protobuf::FileDescriptor*,const
> > google::protobuf::FileDescriptor*,std::_Identity > google::protobuf::FileDescriptor*>,std::less > google::protobuf::

Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-20 Thread cosmin . cremarenco

Thanks for your quick replies.

I tried to compile protobuf 2.1.0 with sun studio 11, this is what I
get:

make  all-recursive
Making all in .
Making all in src
source='google/protobuf/descriptor_database.cc'
object='descriptor_database.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../depcomp \
/bin/bash ../libtool --tag=CXX   --mode=compile /nettools/sunstudio/
sunstudio11/SUNWspro/bin/CC -DHAVE_CONFIG_H -I. -I..-D_REENTRANT  -
g -DNDEBUG -c -o descriptor_database.lo `test -f 'google/protobuf/
descriptor_database.cc' || echo
'./'`google/protobuf/descriptor_database.cc
libtool: compile:  /nettools/sunstudio/sunstudio11/SUNWspro/bin/CC -
DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -g -DNDEBUG -c google/protobuf/
descriptor_database.cc  -KPIC -DPIC -o .libs/descriptor_database.o
"./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/descriptor_database.cc", line 130: Error: Could not
find a match for std::map::insert
(__rwstd::__rb_tree, __rwstd::__select1st,
std::string>, std::less, std::allocator>>::iterator, std::pair) needed in
google::protobuf::SimpleDescriptorDatabase::DescriptorIndex::AddSymbol(const s
td::string &, const google::protobuf::FileDescriptorProto*).
"google/protobuf/descriptor_database.cc", line 67: Where: While
instantiating
"google::protobuf::SimpleDescriptorDatabase::DescriptorIndex::AddSymbol(const std::string
&, const google::pr
otobuf::FileDescriptorProto*)".
"google/protobuf/descriptor_database.cc", line 67: Where:
Instantiated from
google::protobuf::SimpleDescriptorDatabase::DescriptorIndex::AddFile(const
google::protobuf::FileDescriptorProt
o&, const google::protobuf::FileDescriptorProto*).
"google/protobuf/descriptor_database.cc", line 263: Where:
Instantiated from non-template code.
1 Error(s) and 3 Warning(s) detected.


On May 19, 10:15 pm, Kenton Varda  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,  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 > google::protobuf::Descriptor*,std::_Nonconst_traits > google::protobuf::Descriptor*> >,bool>std::_Rb_tree > google::protobuf::Descriptor*,const
> > google::protobuf::Descriptor*,std::_Identity > google::protobuf::Descriptor*>,std::less > google::protobuf::Descriptor*>,std::allocator > google::protobuf::Descriptor*> >::insert_unique(const
> > google::protobuf::Descriptor*const&) ./.libs/libprotobuf.so
> > unsigned std::hashtable > google::protobuf::FileDescriptor*>,const
> > char*,google::protobuf::hash > char*>,std::_Select1st > google::protobuf::FileDescriptor*>
>
> > >,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator > >d::pair > char*const,const google::protobuf::FileDescriptor*> > >::erase(const
> > char*const&) ./.libs/libprotobuf.so
> > void std::_Rb_tree
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >,std::_Select1st
> > std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo 
> > >
> > >,std::less,std::allocator
> > s

Re: Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-19 Thread Monty Taylor

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

Well... it looks fine on the surface - but there may have been a problem
further back in your build histoy. Are there any references to -Cstd in
there? If so, you need to install libtool 2.2 and then re-run autogen.sh
(older libtools do bad things on solaris) But I don't remember having
had to do that last time I built.

> /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 google::protobuf::Descriptor*,std::_Nonconst_traits google::protobuf::Descriptor*> >,bool>std::_Rb_tree google::protobuf::Descriptor*,const
> google::protobuf::Descriptor*,std::_Identity google::protobuf::Descriptor*>,std::less google::protobuf::Descriptor*>,std::allocator google::protobuf::Descriptor*> >::insert_unique(const
> google::protobuf::Descriptor*const&) ./.libs/libprotobuf.so
> unsigned std::hashtable google::protobuf::FileDescriptor*>,const
> char*,google::protobuf::hash char*>,std::_Select1st google::protobuf::FileDescriptor*>
>> ,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator char*const,const google::protobuf::FileDescriptor*> > >::erase(const
> char*const&) ./.libs/libprotobuf.so
> void std::_Rb_tree std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo>,std::_Select1st std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo>
>> ,std::less,std::allocator std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo>
>>> ::_M_erase(std::_Rb_tree_node std::string,google::protobuf::compiler::CommandLineInterface::GeneratorInfo>
>> *) ./.libs/libprotoc.so
> std::pair google::protobuf::FileDescriptor*,std::_Nonconst_traits google::protobuf::FileDescriptor*> >,bool>std::_Rb_tree google::protobuf::FileDescriptor*,const
> google::protobuf::FileDescriptor*,std::_Identity google::protobuf::FileDescriptor*>,std::less google::protobuf::FileDescriptor*>,std::allocator google::protobuf::FileDescriptor*> >::insert_unique(const
> google::protobuf::FileDescriptor*const&) ./.libs/libprotoc.so
> void std::_Rb_tree int,google::protobuf::UnknownField*>,std::_Select1st int,google::protobuf::UnknownField*>
>> ,std::less,std::allocator int,google::protobuf::UnknownField*> > >::_M_erase
> (std::_Rb_tree_node int,google::protobuf::UnknownField*> >*) ./.libs/libprotobuf.so
> std::pair google::protobuf::Descriptor*const,const
> google::protobuf::Message*>,std::_Nonconst_traits google::protobuf::Descriptor*const,const google::protobuf::Message*>
>> ,const google::protobuf::Descriptor*,google::protobuf::hash google::protobuf::Descriptor*>,std::_Select1st google::protobuf::Descriptor*const,const google::protobuf::Message*>
>> ,std::equal_to google::protobuf::Descriptor*>,std::allocator google::protobuf::Descriptor*const,const google::protobuf::Message*> >
>> ,bool>std::hashtable google::protobuf::Descriptor*const,const
> google::protobuf::Message*>,const
> google::protobuf::Descriptor*,google::protobuf::hash google::protobuf::Descriptor*>,std::_Select1st google::protobuf::Descriptor*const,const google::protobuf::Message*>
>> ,std::equal_to google::protobuf::Descriptor*>,std::allocator google::protobuf::Descriptor*const,const google::protobuf::Message*> >
>> ::insert_unique_noresize(const std::pair google::protobuf::Descriptor*const,const
> google::protobuf::Message*>&) ./.libs/libprotobuf.so
> std::pair google::protobuf::FileDescriptor*>,std::_Nonconst_traits char*const,const google::protobuf::FileDescriptor*> >,const

Compiling protocol buffers 2.0.3 with sun studio 11

2009-05-19 Thread cosmin . cremarenco

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 >,bool>std::_Rb_tree,std::less,std::allocator >::insert_unique(const
google::protobuf::Descriptor*const&) ./.libs/libprotobuf.so
unsigned std::hashtable,const
char*,google::protobuf::hash,std::_Select1st
>,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator > >::erase(const
char*const&) ./.libs/libprotobuf.so
void std::_Rb_tree,std::_Select1st
>,std::less,std::allocator
> >::_M_erase(std::_Rb_tree_node
>*) ./.libs/libprotoc.so
std::pair >,bool>std::_Rb_tree,std::less,std::allocator >::insert_unique(const
google::protobuf::FileDescriptor*const&) ./.libs/libprotoc.so
void std::_Rb_tree,std::_Select1st
>,std::less,std::allocator > >::_M_erase
(std::_Rb_tree_node >*) ./.libs/libprotobuf.so
std::pair,std::_Nonconst_traits
>,const google::protobuf::Descriptor*,google::protobuf::hash,std::_Select1st
>,std::equal_to,std::allocator >
>,bool>std::hashtable,const
google::protobuf::Descriptor*,google::protobuf::hash,std::_Select1st
>,std::equal_to,std::allocator >
>::insert_unique_noresize(const std::pair&) ./.libs/libprotobuf.so
std::pair,std::_Nonconst_traits >,const
char*,google::protobuf::hash,std::_Select1st
>,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator >
>,bool>std::hashtable,const
char*,google::protobuf::hash,std::_Select1st
>,google::protobuf::__unnamed_sWhGbsSnEKGIw::CStringEqual,std::allocator >
>::insert_unique_noresize(const std::pair&) ./.libs/libprotobuf.so
void std::_Rb_tree,std::_Select1st
>,std::less,std::allocator > >::_M_erase
(std::_Rb_tree_node
>*) ./.libs/libprotobuf.so
void std::_Rb_tree,std::less,std::allocator >::_M_erase
(std::_Rb_tree_node*) ./.libs/
libprotoc.so
void std::_Rb_tree,std::less,std::allocator >::_M_erase(std::_Rb_tree_node*) ./.libs/libprotobuf.so
unsigned std::hashtable,const
google::protobuf::FieldDescriptor*>,std::pair,google::protobuf::__unnamed_sWhGbsSnEKGIw::PointerIntegerPairHash >,std::_Select1st,const
google::protobuf::FieldDescriptor*> >,std::equal_to >,std::allocator,const
google::protobuf::FieldDescriptor*> > >::_M_next_size(unsigned)
const ./.libs/libprotobuf.so
void std::_Rb_tree,std::pair,const
google::protobuf::FileDescriptorProto*>,std::_Select1st,const
google::protobuf::FileDescriptorProto*>
>,std::less
>,std::allocator,const
google::protobuf::FileDescriptorProto*> > >::_M_erase
(std::_Rb_tree_node,const
google::protobuf::FileDescriptorProto*> >*) ./.libs/libprotobuf.so
void std::hashtable,google::protobuf::__unnamed_sWhGbsSnEKGIw::Symbol>,std::pair,google::protobuf::__unnamed_sWhGbsSnEKGIw::PointerStringPairHash,std::_Select1st,google::protobuf::__unnamed_sWhGbsSnEKGIw::Symbol>
>,google::protobuf::__unnamed_sWhGbsSnEKGIw::PointerStringPairEqual,std::allocator,google::protobuf::__unnamed_sWhGbsSnEKGIw::Symbol> > >::clear
() ./.libs/libprotobuf.so
std::_Rb_tree_iterator,std::_Nonconst_traits > >std::_Rb_tree,std::_Select1st
>,std::less,std::allocator > >::insert_unique
(std::_Rb_tree_iterator,std::_Nonconst_traits > >,const std::pair&) ./.libs/libprotobuf.so
void std::sort
(__type_0,__type_0,__type_1) ./.libs/libprotobuf.so
void std::sort
(__type_0,__type_0,__type_1) ./.libs/libprotoc.so
void std::_Rb_tree,std::_Select1st
>,std::less,std::allocator > >::_M_erase
(std::_Rb_tree_node >*) ./.libs/
libprotobuf.so
std::_Rb_tree_iterator,std::_Nonconst_traits >
>std::_Rb_tree,std::_Select1st
>,std::less,std::allocator > >::insert_unique
(std::_Rb_tree_iterator,std::_Nonconst_traits > >,const std::pair&) ./.libs/libpr