Compilation error for ppc/440 target

41 views
Skip to first unread message

dear chap

unread,
Feb 3, 2011, 9:41:28 PM2/3/11
to Protocol Buffers
I am getting the following compilation error for ppc/440

google/protobuf/descriptor.cc: In member function `virtual const
google::protobuf::FieldDescriptor*
google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindExtension(google::protobuf::Message*,
const std::string&) const':
./google/protobuf/descriptor.h:1152: error:
`google::protobuf::internal::Mutex*google::protobuf::DescriptorPool::mutex_'
is private
google/protobuf/descriptor.cc:4341: error: within this context
./google/protobuf/descriptor.h:1152: error:
`google::protobuf::internal::Mutex*google::protobuf::DescriptorPool::mutex_'
is private
google/protobuf/descriptor.cc:4342: error: within this context

This is under a cross compilation environment with ppc_440-g++ version
3.4.3.

The strange thing is that the compile works fine under a ppc/83xx
environment. The ppc/83xx g++ version is 4.2.0

Naveen

Henner Zeller

unread,
Feb 4, 2011, 12:18:31 AM2/4/11
to dear chap, Protocol Buffers
On Thu, Feb 3, 2011 at 18:41, dear chap <dear...@gmail.com> wrote:
> I am getting the following compilation error for ppc/440
>
> google/protobuf/descriptor.cc: In member function `virtual const
> google::protobuf::FieldDescriptor*
> google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindExtension(google::protobuf::Message*,
> const std::string&) const':
> ./google/protobuf/descriptor.h:1152: error:
> `google::protobuf::internal::Mutex*google::protobuf::DescriptorPool::mutex_'
> is private
> google/protobuf/descriptor.cc:4341: error: within this context
> ./google/protobuf/descriptor.h:1152: error:
> `google::protobuf::internal::Mutex*google::protobuf::DescriptorPool::mutex_'
> is private
> google/protobuf/descriptor.cc:4342: error: within this context
>
> This is under a cross compilation environment with ppc_440-g++ version
> 3.4.3.

Looks like the old gcc is confused about the fact that
DescriptorBuilder::OptionInterpreter::AggregateOptionFinder should be
able to access the private mutex of DescriptorPool who befriended
DescriptorBuilder. Well, it is a tricky relationship :)

Now, gcc 3.4.3 is a > 6 year old compiler (
http://gcc.gnu.org/gcc-3.4/ ) - can you try to get a newer version ?

>
> The strange thing is that the compile works fine under a ppc/83xx
> environment. The ppc/83xx g++ version is 4.2.0
>
> Naveen
>

> --
> You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
> To post to this group, send email to prot...@googlegroups.com.
> To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
>
>

dear chap

unread,
Feb 4, 2011, 10:06:26 AM2/4/11
to Protocol Buffers
Unfortunately we have to use the particular compiler in question and
cannot upgrade. Is the
DescriptorBuilder::OptionInterpreter::AggregateOptionFinder new code ?
I dont see this problem with protobuf-2.3.0.

Jason Hsueh

unread,
Feb 7, 2011, 5:49:21 PM2/7/11
to dear chap, Protocol Buffers
Yes, this code was added in 2.4.0.


--

Pherl Liu

unread,
Feb 9, 2011, 1:12:00 PM2/9/11
to dear chap, Protocol Buffers
A workaround is now in svn: http://code.google.com/p/protobuf/source/detail?r=380
Could you please try patch the diff to check if that fixes the problem?

Thanks.


--

dear chap

unread,
Feb 11, 2011, 4:52:06 PM2/11/11
to Protocol Buffers
This worked for all the cross compilers(ppc/440, ppc/83xx) that I
tried. Thanks Pherl.
> >http://groups.google.com/group/protobuf?hl=en.- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages