/usr/local/include/google/protobuf/repeated_field.h:145:1: error: invalid application of 'sizeof' to incomplete type 'google::protobuf::__uint128_t'

47 views
Skip to first unread message

xiaoliang jiao

unread,
Mar 23, 2023, 2:51:48 AM3/23/23
to grpc.io
I use gRPC 1.53.0-pre1 and protobuf 3.21.12.0. 
I can create *.pb.h,  *.pb.cc, *.grpc.pb.h, *.grpc.pb.cc files from *.proto file.
But when i link grpc, it tells me about: this is the problem link.  how can i solve it, thanks for your help and time!


In file included from /usr/local/include/google/protobuf/implicit_weak_message.h:39:0,
from /usr/local/include/google/protobuf/generated_message_util.h:54,
from /catkin_ws/build/nav_interfaces/dynamic_localmap.pb.h:26,
from /catkin_ws/src/Navigation_ARM/Navigation/MappingModule/src/ros/DynamicMapManager/include/grpc_proto_utils.h:5,
from /catkin_ws/src/Navigation_ARM/Navigation/MappingModule/src/ros/DynamicMapManager/include/DynamicMapManager.h:63,
from /catkin_ws/src/Navigation_ARM/Navigation/MappingModule/src/ros/DynamicMapManager/src/DynamicMapManager_node.cpp:1:
/usr/local/include/google/protobuf/repeated_field.h: At global scope:
/usr/local/include/google/protobuf/repeated_field.h:145:1: error: invalid application of 'sizeof' to incomplete type 'google::protobuf::__uint128_t'
PROTO_MEMSWAP_DEF_SIZE(__uint128_t, (1u << 31))
^
/usr/local/include/google/protobuf/repeated_field.h:145:1: error: template argument 1 is invalid
PROTO_MEMSWAP_DEF_SIZE(__uint128_t, (1u << 31))
^
/usr/local/include/google/protobuf/repeated_field.h: In function 'int google::protobuf::internal::memswap(char*, char*)':
/usr/local/include/google/protobuf/repeated_field.h:145:1: error: invalid application of 'sizeof' to incomplete type 'google::protobuf::__uint128_t'
PROTO_MEMSWAP_DEF_SIZE(__uint128_t, (1u << 31))
^
/usr/local/include/google/protobuf/repeated_field.h:145:1: error: invalid application of 'sizeof' to incomplete type 'google::protobuf::__uint128_t'
PROTO_MEMSWAP_DEF_SIZE(__uint128_t, (1u << 31))
^
/usr/local/include/google/protobuf/repeated_field.h:145:1: error: invalid application of 'sizeof' to incomplete type 'google::protobuf::__uint128_t'
PROTO_MEMSWAP_DEF_SIZE(__uint128_t, (1u << 31))
^

yas...@google.com

unread,
Mar 29, 2023, 1:56:31 PM3/29/23
to grpc.io
This might be an environment issue. Can you talk more about where and how you are building your application?
Reply all
Reply to author
Forward
0 new messages