Nope - indeed it doesn't work :(

Unfortunately I am not (yet) enough of a C++ superstar to tinker much
with that code.

What I did try was to borrow someone else's updated environment and
try to compile there using gcc 4.1.2
So...

descriptor.cc does seem to compile under gcc 4.1.2!  That's the good
news, and pretty much what we expected.

I do get a bunch of warnings though:

 g++ -DHAVE_CONFIG_H -I. -I. -I.. -pthread -Wall -Wwrite-strings -
Woverloaded-virtual -Wno-sign-compare -g -O2 -MT descriptor.lo -MD -MP
-MF .deps/descriptor.Tpo -c google/protobuf/descriptor.cc  -fPIC -DPIC
-o .libs/descriptor.o
google/protobuf/descriptor.cc:268: warning:
'google::protobuf::DescriptorPool::Tables' has a field
'google::protobuf::DescriptorPool::Tables::symbols_by_name_' whose
type uses the anonymous namespace
google/protobuf/descriptor.cc:268: warning:
'google::protobuf::DescriptorPool::Tables' has a field
'google::protobuf::DescriptorPool::Tables::symbols_by_parent_' whose
type uses the anonymous namespace
google/protobuf/descriptor.cc:268: warning:
'google::protobuf::DescriptorPool::Tables' has a field
'google::protobuf::DescriptorPool::Tables::files_by_name_' whose type
uses the anonymous namespace
google/protobuf/descriptor.cc:268: warning:
'google::protobuf::DescriptorPool::Tables' has a field
'google::protobuf::DescriptorPool::Tables::fields_by_number_' whose
type uses the anonymous namespace
google/protobuf/descriptor.cc:268: warning:
'google::protobuf::DescriptorPool::Tables' has a field
'google::protobuf::DescriptorPool::Tables::enum_values_by_number_'
whose type uses the anonymous namespace
google/protobuf/descriptor.cc:1761: warning:
'google::protobuf::DescriptorBuilder::OptionInterpreter' has a field
'google::protobuf::DescriptorBuilder::OptionInterpreter::options_to_interpret_'
whose type uses the anonymous namespace
google/protobuf/descriptor.cc:1598: warning:
'google::protobuf::DescriptorBuilder' has a field
'google::protobuf::DescriptorBuilder::options_to_interpret_' whose
type uses the anonymous namespace
 g++ -DHAVE_CONFIG_H -I. -I. -I.. -pthread -Wall -Wwrite-strings -
Woverloaded-virtual -Wno-sign-compare -g -O2 -MT descriptor.lo -MD -MP
-MF .deps/descriptor.Tpo -c google/protobuf/descriptor.cc -o
descriptor.o >/dev/null 2>&1

I quick google didn't turn up much for me on what that actually means
- does it mean anything to y'all?

In any case, using gcc 4.1.2, "make" and "make check" (any reason you
didn't use the more standard "make test"?) succeeded for me, so I
guess I will have to just wait to update to protobuf-2.0.2 until I can
move myself to the newer gcc.

Thanks in any case for the help.

--edan

On Oct 8, 9:07 pm, "Kenton Varda" <[EMAIL PROTECTED]> wrote:
> OK, based on sephacryl's message I created this patch, but I suspect edan's
> problem is actually different.  Can you both try it out and tell me if it
> works?  edan, if this doesn't solve the problem for you, can you try making
> some changes yourself and figure out what works?
> Index: src/google/protobuf/descriptor.cc
> ===================================================================
> --- src/google/protobuf/descriptor.cc   (revision 65)
> +++ src/google/protobuf/descriptor.cc   (working copy)
> @@ -1693,6 +1693,9 @@
>    template<class DescriptorT> void AllocateOptions(
>        const typename DescriptorT::OptionsType& orig_options,
>        DescriptorT* descriptor);
> +  // Specialization for FileOptions.
> +  void AllocateOptions(const FileOptions& orig_options,
> +                       FileDescriptor* descriptor);
>
>    // Implementation for AllocateOptions(). Don't call this directly.
>    template<class DescriptorT> void AllocateOptionsImpl(
> @@ -2208,9 +2211,8 @@
>  }
>
>  // We specialize for FileDescriptor.
> -template<> void DescriptorBuilder::AllocateOptions<FileDescriptor>(
> -    const FileDescriptor::OptionsType& orig_options,
> -    FileDescriptor* descriptor) {
> +void DescriptorBuilder::AllocateOptions(const FileOptions& orig_options,
> +                                        FileDescriptor* descriptor) {
>    // We add the dummy token so that LookupSymbol does the right thing.
>    AllocateOptionsImpl(descriptor->package() + ".dummy", descriptor->name(),
>                        orig_options, descriptor);
>
> On Tue, Oct 7, 2008 at 10:05 PM, <[EMAIL PROTECTED]> wrote:
>
> > What works is adding to the definition of class DescriptorBuilder to
> > line1696,
>
> >  void AllocateOptions(
> >      const typename FileDescriptor::OptionsType& orig_options,
> >      FileDescriptor* descriptor);
>
> > And changing the implementation, removing the template specialization,
> > at line 2213 to:
>
> > void DescriptorBuilder::AllocateOptions(
> >    const FileDescriptor::OptionsType& orig_options,
> >    FileDescriptor* descriptor) {
> >  // We add the dummy token so that LookupSymbol does the right thing.
> >  AllocateOptionsImpl(descriptor->package() + ".dummy", descriptor-
> > >name(),
> >                      orig_options, descriptor);
> > }
>
> > This is not incorrect either since it implements function overloading,
> > without the messy template specialization.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to