Try this patch, see if it helps you. I've got another one coming, but
I'm interested to know if this solves your current problem.

You'll probably want to do a make clean ...

Monty

vikram wrote:
> no . I wanted to compile it . But have you got those tests working . I
> am not able to  compile those yet.
> 
> On Jun 24, 12:48 pm, Monty Taylor <mo...@inaugust.com> wrote:
>> I'm hacking on a patch to make 2.1.0 work properly on my Sun Studio set
>> up as we speak. Was there something more specific you wanted from it
>> than just compiling?
>>
>> vikram wrote:
>>> I am using 2.1.0 only.
>>> On Jun 24, 12:26 pm, Kenton Varda <ken...@google.com> wrote:
>>>> The list of files there suggest that you're using protobuf 2.0.3 or 
>>>> earlier.
>>>>  Have you tried 2.1.0?
>>>> On Wed, Jun 24, 2009 at 11:54 AM, vikram <patilvik...@gmail.com> wrote:
>>>>> I am using  CC: Sun C++ 5.9 compiler to compile on Solaris. I was able
>>>>> to compile source but tests are failing.
>>>>> I need some help here about libtool
>>>>> /bin/bash ./libtool --tag=CXX    --mode=link CC  -g    -o lib/
>>>>> libgtest.la -rpath /usr/local/lib src/gtest.lo src/gtest-death-
>>>>> test.lo  src/gtest-filepath.lo src/gtest-port.lo src/gtest-test-
>>>>> part.lo  src/gtest-typed-test.lo
>>>>> libtool: link: rm -fr  lib/.libs/libgtest.so lib/.libs/libgtest.so.0
>>>>> libtool: link: (cd "lib/.libs" && rm -f "libgtest.so.0" && ln -s
>>>>> "libgtest.so.0.0.0" "libgtest.so.0")
>>>>> libtool: link: (cd "lib/.libs" && rm -f "libgtest.so" && ln -s
>>>>> "libgtest.so.0.0.0" "libgtest.so")
>>>>> libtool: link: ar cru lib/.libs/libgtest.a  src/gtest.o src/gtest-
>>>>> death-test.o src/gtest-filepath.o src/gtest-port.o src/gtest-test-
>>>>> part.o src/gtest-typed-test.o
>>>>> ar: cannot open src/gtest.o
>>>>>        No such file or directory
>>>>> ar: cannot open src/gtest-death-test.o
>>>>>        No such file or directory
>>>>> ar: cannot open src/gtest-filepath.o
>>>>>        No such file or directory
>>>>> ar: cannot open src/gtest-port.o
>>>>>        No such file or directory
>>>>> ar: cannot open src/gtest-test-part.o
>>>>>        No such file or directory
>>>>> ar: cannot open src/gtest-typed-test.o
>>>>>        No such file or directory
>>>>> ar: src/gtest.o not found
>>>>> ar: src/gtest-death-test.o not found
>>>>> ar: src/gtest-filepath.o not found
>>>>> ar: src/gtest-port.o not found
>>>>> ar: src/gtest-test-part.o not found
>>>>> ar: src/gtest-typed-test.o not found
>>>>> All object files are created in the same directory as Makefile and in
>>>>> src/.libs/ directory .  While libtool looks for these files in
>>>>> src directory. I am new too libtool so I am not able to solve the
>>>>> problem.
>>>>> On Jun 22, 4:38 pm, vikram <patilvik...@gmail.com> wrote:
>>>>>> I am trying out what changes he suggested uptil now I am able to
>>>>>> compile but gtests are failing. I will update discussion once I am
>>>>>> able to find out whats going with gtests.
>>>>>> Vikram
>>>>>> On Jun 22, 4:34 pm, Kenton Varda <ken...@google.com> wrote:
>>>>>>> I haven't heard from the patch author since my previous mail.  :/
>>>>>>> On Mon, Jun 22, 2009 at 4:06 PM, vikram <patilvik...@gmail.com> wrote:
>>>>>>>> Can somebody point out when this patch will be included in source?
>>>>>>>> I am trying to do compilation on Solaris 10 but right now I am
>>>>> getting
>>>>>>>> errors as mentioned in this post.
>>>>>>>> Vikram
>>>>>>>> On Jun 4, 1:42 pm, Kenton Varda <ken...@google.com> wrote:
>>>>>>>>> Thanks for the patch!
>>>>>>>>> It looks like you were using the examples as a test.  Running "make
>>>>>>>> check"
>>>>>>>>> in the top directory will run a much better suite of tests -- do
>>>>> they
>>>>>>>> pass?
>>>>>>>>> Assuming it does work, can you re-send that patch as an attachment
>>>>> (it
>>>>>>>> looks
>>>>>>>>> like it has been mangled), or even send it to me via
>>>>>>>> codereview.appspot.com?
>>>>>>>>> Also, for me to submit it you'll need to sign the contributor
>>>>> license
>>>>>>>>> agreement:
>>>>>>>>> http://code.google.com/legal/individual-cla-v1.0.html--ifyouown
>>>>>>>>> copyright on this patchhttp://
>>>>>>>> code.google.com/legal/corporate-cla-v1.0.html-- if your employer
>>>>>>>>> does
>>>>>>>>> On Wed, Jun 3, 2009 at 10:53 PM, <bmcarnes_proto...@oddren.com>
>>>>> wrote:
>>>>>>>>>>> Probably not. LibCstd isn't complete enough for protobuf.
>>>>>>>>>> I was able to get protobuf 2.1.0 to work well under Sun Studio
>>>>> 11,
>>>>>>>>>> using libCstd, with a few patches.  Works well enough to compile
>>>>> and
>>>>>>>>>> run the add_person_cpp/list_people_cpp examples.
>>>>>>>>>> I include the build instructions and patch set below   Also
>>>>> included
>>>>>>>>>> are patches to the examples makefile to test it out.
>>>>>>>>>> <Apply below patchset first against protobuf 2.1.0>
>>>>>>>>>> $ CXX=CC CC=cc ./configure --disable-shared
>>>>>>>>>> $ make
>>>>>>>>>> $ cd examples
>>>>>>>>>> $ make cpp
>>>>>>>>>> $ ./add_person_cpp addressbook.test
>>>>>>>>>> (enter a test record)
>>>>>>>>>> $ ./list_people_cpp addressbook.test
>>>>>>>>>> (test record is displayed correctly)
>>>>>>>>>> $ ldd list_people_cpp      (or ldd add_person_cpp )
>>>>>>>>>>        libpthread.so.1 =>       /lib/libpthread.so.1
>>>>>>>>>>        libCstd.so.1 =>  /usr/lib/libCstd.so.1
>>>>>>>>>>        libCrun.so.1 =>  /usr/lib/libCrun.so.1
>>>>>>>>>>        libm.so.2 =>     /lib/libm.so.2
>>>>>>>>>>        libc.so.1 =>     /lib/libc.so.1
>>>>>>>>>> Index: src/google/protobuf/repeated_field.h
>>>>> ===================================================================
>>>>>>>>>> --- src/google/protobuf/repeated_field.h        (revision 2)
>>>>>>>>>> +++ src/google/protobuf/repeated_field.h        (working copy)
>>>>>>>>>> @@ -69,7 +69,7 @@
>>>>>>>>>>  class LIBPROTOBUF_EXPORT GenericRepeatedField {
>>>>>>>>>>  public:
>>>>>>>>>>   inline GenericRepeatedField() {}
>>>>>>>>>> -#if defined(__DECCXX) && defined(__osf__)
>>>>>>>>>> +#if defined(__SUNPRO_CC) || defined(__DECCXX) &&
>>>>> defined(__osf__)
>>>>>>>>>>   // HP C++ on Tru64 has trouble when this is not defined inline.
>>>>>>>>>>   virtual ~GenericRepeatedField() {}
>>>>>>>>>>  #else
>>>>>>>>>> @@ -548,7 +548,7 @@
>>>>>>>>>>   current_size_ = 0;
>>>>>>>>>>  }
>>>>>>>>>> -#if defined(__DECCXX) && defined(__osf__)
>>>>>>>>>> +#if defined(__SUNPRO_CC) || defined(__DECCXX) &&
>>>>> defined(__osf__)
>>>>>>>>>>  // HP C++ on Tru64 has trouble when this is not defined inline.
>>>>>>>>>>  template <>
>>>>>>>>>>  inline void RepeatedPtrField<string>::Clear() {
>>>>>>>>>> Index: src/google/protobuf/descriptor_database.cc
>>>>> ===================================================================
>>>>>>>>>> --- src/google/protobuf/descriptor_database.cc  (revision 2)
>>>>>>>>>> +++ src/google/protobuf/descriptor_database.cc  (working copy)
>>>>>>>>>> @@ -127,7 +127,13 @@
>>>>>>>>>>   // Insert the new symbol using the iterator as a hint, the new
>>>>>>>>>> entry will
>>>>>>>>>>   // appear immediately before the one the iterator is pointing
>>>>> at.
>>>>>>>>>> +
>>>>>>>>>> +  // Sun Studio 11 needs a little help here
>>>>>>>>>> +#if defined(__SUNPRO_CC)
>>>>>>>>>> +  by_symbol_.insert(iter, make_pair<const string,Value>(name,
>>>>>>>>>> value));
>>>>>>>>>> +#else
>>>>>>>>>>   by_symbol_.insert(iter, make_pair(name, value));
>>>>>>>>>> +#endif
>>>>>>>>>>   return true;
>>>>>>>>>>  }
>>>>>>>>>> Index: src/google/protobuf/compiler/command_line_interface.cc
>>>>> ===================================================================
>>>>>>>>>> --- src/google/protobuf/compiler/command_line_interface.cc
>>>>>>>>  (revision
>>>>>>>>>> 2)
>>>>>>>>>> +++ src/google/protobuf/compiler/command_line_interface.cc
>>>>>>>>  (working
>>>>>>>>>> copy)
>>>>>>>>>> @@ -474,7 +474,7 @@
>>>>>>>>>>   // If no --proto_path was given, use the current working
>>>>> directory.
>>>>>>>>>>   if (proto_path_.empty()) {
>>>>>>>>>> -    proto_path_.push_back(make_pair("", "."));
>>>>>>>>>> +    proto_path_.push_back(make_pair(string(""), string("..")));
>>>>>>>>>>   }
>>>>>>>>>>   // Check some errror cases.
>>>>>>>>>> Index: src/google/protobuf/repeated_field.cc
>>>>> ===================================================================
>>>>>>>>>> --- src/google/protobuf/repeated_field.cc       (revision 2)
>>>>>>>>>> +++ src/google/protobuf/repeated_field.cc       (working copy)
>>>>>>>>>> @@ -40,7 +40,7 @@
>>>>>>>>>>  // HP C++ on Tru64 can't handle the stuff below being defined
>>>>> out-of-
>>>>>>>>>> line, so
>>>>>>>>>>  // on that platform everything is defined in repeated_field.h..
>>>>>  On
>>>>>>>>>> other
>>>>>>>>>>  // platforms, we want these to be out-of-line to avoid code
>>>>> bloat.
>>>>>>>>>> -#if !defined(__DECCXX) || !defined(__osf__)
>>>>>>>>>> +#if !defined(__SUNPRO_CC) && (!defined(__DECCXX) || !defined
>>>>>>>>>> (__osf__))
>>>>>>>>>>  namespace internal {
>>>>>>>>>> ------- Below changes the examples makefile to exercise protobuf
>>>>> under
>>>>>>>>>> solaris
>>>>>>>>>> Index: examples/Makefile
>>>>> ===================================================================
>>>>>>>>>> --- examples/Makefile   (revision 2)
>>>>>>>>>> +++ examples/Makefile   (working copy)
>>>>>>>>>> @@ -1,5 +1,13 @@
>>>>>>>>>>  # See README.txt.
>>>>>>>>>> +# For the rest of the world
>>>>>>>>>> +#CXX = c++
>>>>>>>>>> +#PROTOC = protoc
>>>>>>>>>> +
>>>>>>>>>> +# Testing For Solaris (pre-install)
>>>>>>>>>> +CXX = CC -I../src -L../src/.libs
>>>>>>>>>> +PROTOC = ../src/protoc
>>>>>>>>>> +
>>>>>>>>>>  .PHONY: all cpp java python clean
>>>>>>>>>>  all: cpp java python
>>>>>>>>>> @@ -18,14 +26,14 @@
>>>>>>>>>>        rmdir com 2>/dev/null || true
>>>>>>>>>>  protoc_middleman: addressbook.proto
>>>>>>>>>> -       protoc --cpp_out=. --java_out=. --python_out=.
>>>>>>>> addressbook.proto
>>>>>>>>>> +       $(PROTOC) --cpp_out=. --java_out=. --python_out=.
>>>>>>>> addressbook.proto
>>>>>>>>>>        @touch protoc_middleman
>>>>>>>>>>  add_person_cpp: add_person.cc protoc_middleman
>>>>>>>>>> -       c++ add_person.cc addressbook.pb.cc -lprotobuf -lpthread
>>>>> -o
>>>>>>>>>> add_person_cpp
>>>>>>>>>> +       $(CXX) add_person.cc addressbook.pb.cc -lprotobuf
>>>>> -lpthread -o
>>>>>>>>>> add_person_cpp
>>>>>>>>>>  list_people_cpp: list_people.cc protoc_middleman
>>>>>>>>>> -       c++ list_people.cc addressbook.pb.cc -lprotobuf
>>>>> -lpthread -o
>>>>>>>>>> list_people_cpp
>>>>>>>>>> +      
>>>> ...
>>>> 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
-~----------~----~----~----~------~----~------~--~---

=== modified file 'm4/acx_check_suncc.m4'
--- m4/acx_check_suncc.m4       2009-06-25 01:21:06 +0000
+++ m4/acx_check_suncc.m4       2009-06-25 01:58:53 +0000
@@ -12,7 +12,7 @@
 
 AC_DEFUN([ACX_CHECK_SUNCC],[
 
-  AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+  AC_CHECK_DECL([__SUNPRO_CC], [SUNCC="yes"], [SUNCC="no"])
 
   AS_IF([test "$SUNCC" = "yes"],[
     isainfo_k=`isainfo -k`

Reply via email to