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--if you own
> > > 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
> > > > +       $(CXX) list_people.cc addressbook.pb.cc -lprotobuf -lpthread
> > -o
> > > > list_people_cpp
>
> > > >  javac_middleman: AddPerson.java ListPeople.java protoc_middleman
> > > >        javac AddPerson.java ListPeople.java com/example/tutorial/
> > > > AddressBookProtos.java
--~--~---------~--~----~------------~-------~--~----~
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