Protobuf: can't compile in centos 6.x

Created on 12 Dec 2016  ·  18Comments  ·  Source: protocolbuffers/protobuf

I git cloned the code in centos 6.x 64bits os, then run ./autogen.sh successfully , then ./configure successfully, then run make, but failed with the following error:

In file included from ./google/protobuf/any.pb.h:25,
from google/protobuf/any.pb.cc:5:
./google/protobuf/metadata.h: In constructor ‘google::protobuf::internal::InternalMetadataWithArena::InternalMetadataWithArena(google::protobuf::Arena)’:
./google/protobuf/metadata.h:175: error: class ‘google::protobuf::internal::InternalMetadataWithArena’ does not have any field named ‘InternalMetadataWithArenaBase’
./google/protobuf/metadata.h: In constructor ‘google::protobuf::internal::InternalMetadataWithArenaLite::InternalMetadataWithArenaLite(google::protobuf::Arena
)’:
./google/protobuf/metadata.h:204: error: class ‘google::protobuf::internal::InternalMetadataWithArenaLite’ does not have any field named ‘InternalMetadataWithArenaBase’
make[2]: * [google/protobuf/any.pb.lo] Error 1
make[2]: Leaving directory /home/protobuf/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/protobuf'
make: *
[all] Error 2

I have no idea how to fix it. Thanks for any response.

bug c++

Most helpful comment

构造函数生命的地方,加入类似的这个东西就过了, ,参照类派生的地方。一共有两个地方,哪里报错哪里加.

All 18 comments

Why nobody care about this ?

You can checkout a different release version.

git checkout tags/v3.1.0

code have a problem,you can change explicit InternalMetadataWithArenaLite(Arena* arena)
: InternalMetadataWithArenaBase(arena) {} to explicit InternalMetadataWithArenaLite(Arena* arena)
: InternalMetadataWithArenaBase(arena) {}, it will ok, may be the class InternalMetadataWithArenaLite extends class is InternalMetadataWithArenaBase.
InternalMetadataWithArena is the same.

We were using tags/v3.1.0 , still we get same issue ... :(

构造函数生命的地方,加入类似的这个东西就过了, ,参照类派生的地方。一共有两个地方,哪里报错哪里加.

+1

+1

Same problem. Please Fix!

Its still a problem affecting many people. Could you please follow this up? Build fails for me on CentOS 6.8 (current latest) in Docker.

I think it's already fixed: #2599

+1

Closed as this appears to have been fixed in #2599.

@haberman this issue is still happening with 3.3.0 and RHEL 6.8. See comments here: https://github.com/google/protobuf/pull/2599

Please re-open.

@haberman the problem is that metadata_lite.h contained a very similar compile error.

Same problem here both on master and 3.3.x

It's a simple code change.

Sorry, typing on a phone right now but:

Add template args at line 170 of
metadata_lite.h

I also had to comment out line 108 from protobuf/stubs/port.h
On Mon, 8 May 2017 at 5:33 pm, Ignacio Casal Quinteiro <
[email protected]> wrote:

Filed another issue: #3069
https://github.com/google/protobuf/issues/3069


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/protobuf/issues/2486#issuecomment-299819404,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKDoY7GJm7i_C_48bgqd0-dCMH30vMXfks5r3uFrgaJpZM4LKYB_
.

>

Jesse Pepper

Director

Think Bottom Up Pty Ltd

e: jesse.[email protected]
m: +61 4 2467 5865
t: +61 8 6460 1643
f: +61 8 6210 1175
16/9 Vale St, Malaga,
Western Australia 6090

see this:
https://github.com/google/protobuf/pull/2599/files

public:
InternalMetadataWithArena() {}
explicit InternalMetadataWithArena(Arena* arena)
: InternalMetadataWithArenaBase(arena) {}
: InternalMetadataWithArenaBase InternalMetadataWithArena>(arena) {}
void DoSwap(UnknownFieldSet* other) {
mutable_unknown_fields()->Swap(other);
@@ -201,7 +202,8 @@ class InternalMetadataWithArenaLite
InternalMetadataWithArenaLite() {}
explicit InternalMetadataWithArenaLite(Arena* arena)
: InternalMetadataWithArenaBase(arena) {}
: InternalMetadataWithArenaBase InternalMetadataWithArenaLite>(arena) {}
void DoSwap(string* other) {
mutable_unknown_fields()->swap(*other);

Was this page helpful?
0 / 5 - 0 ratings