p4lang / PI

An implementation framework for a P4Runtime server
Apache License 2.0
165 stars 107 forks source link

Makefile:1026: recipe for target 'grpc_out/p4/v1/p4runtime.grpc.pb.lo' failed #580

Closed KekeZheng closed 17 hours ago

KekeZheng commented 2 years ago

when i install PI,i got the follow error:

In file included from grpc_out/p4/v1/p4runtime.grpc.pb.cc:6:0: grpc_out/p4/v1/p4runtime.grpc.pb.h:144:19: error: ‘RpcMethod’ in namespace ‘grpc’ does not name a type const ::grpc::RpcMethod rpcmethodWrite; ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:145:19: error: ‘RpcMethod’ in namespace ‘grpc’ does not name a type const ::grpc::RpcMethod rpcmethodRead; ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:146:19: error: ‘RpcMethod’ in namespace ‘grpc’ does not name a type const ::grpc::RpcMethod rpcmethodSetForwardingPipelineConfig; ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:147:19: error: ‘RpcMethod’ in namespace ‘grpc’ does not name a type const ::grpc::RpcMethod rpcmethodGetForwardingPipelineConfig; ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:148:19: error: ‘RpcMethod’ in namespace ‘grpc’ does not name a type const ::grpc::RpcMethod rpcmethodStreamChannel; ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:149:19: error: ‘RpcMethod’ in namespace ‘grpc’ does not name a type const ::grpc::RpcMethod rpcmethodCapabilities; ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h: In constructor ‘p4::v1::P4Runtime::WithStreamedUnaryMethod_Write::WithStreamedUnaryMethod_Write()’: grpc_out/p4/v1/p4runtime.grpc.pb.h:408:21: error: ‘StreamedUnaryHandler’ in namespace ‘grpc’ does not name a template type new ::grpc::StreamedUnaryHandler< ::p4::v1::WriteRequest, ::p4::v1::WriteResponse>(std::bind(&WithStreamedUnaryMethod_Write::StreamedWrite, this, std::placeholders::_1, std::placeholders::_2))); ^~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:408:65: error: expected primary-expression before ‘,’ token new ::grpc::StreamedUnaryHandler< ::p4::v1::WriteRequest, ::p4::v1::WriteResponse>(std::bind(&WithStreamedUnaryMethod_Write::StreamedWrite, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.h:408:90: error: expected primary-expression before ‘>’ token new ::grpc::StreamedUnaryHandler< ::p4::v1::WriteRequest, ::p4::v1::WriteResponse>(std::bind(&WithStreamedUnaryMethod_Write::StreamedWrite, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.h: In constructor ‘p4::v1::P4Runtime::WithStreamedUnaryMethod_SetForwardingPipelineConfig::WithStreamedUnaryMethod_SetForwardingPipelineConfig()’: grpc_out/p4/v1/p4runtime.grpc.pb.h:428:21: error: ‘StreamedUnaryHandler’ in namespace ‘grpc’ does not name a template type new ::grpc::StreamedUnaryHandler< ::p4::v1::SetForwardingPipelineConfigRequest, ::p4::v1::SetForwardingPipelineConfigResponse>(std::bind(&WithStreamedUnaryMethod_SetForwardingPipelineConfig::StreamedSetForwardingPipelineConfig, this, std::placeholders::_1, std::placeholders::_2))); ^~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:428:87: error: expected primary-expression before ‘,’ token new ::grpc::StreamedUnaryHandler< ::p4::v1::SetForwardingPipelineConfigRequest, ::p4::v1::SetForwardingPipelineConfigResponse>(std::bind(&WithStreamedUnaryMethod_SetForwardingPipelineConfig::StreamedSetForwardingPipelineConfig, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.h:428:134: error: expected primary-expression before ‘>’ token ::p4::v1::SetForwardingPipelineConfigRequest, ::p4::v1::SetForwardingPipelineConfigResponse>(std::bind(&WithStreamedUnaryMethod_SetForwardingPipelineConfig::StreamedSetForwardingPipelineConfig, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.h: In constructor ‘p4::v1::P4Runtime::WithStreamedUnaryMethod_GetForwardingPipelineConfig::WithStreamedUnaryMethod_GetForwardingPipelineConfig()’: grpc_out/p4/v1/p4runtime.grpc.pb.h:448:21: error: ‘StreamedUnaryHandler’ in namespace ‘grpc’ does not name a template type new ::grpc::StreamedUnaryHandler< ::p4::v1::GetForwardingPipelineConfigRequest, ::p4::v1::GetForwardingPipelineConfigResponse>(std::bind(&WithStreamedUnaryMethod_GetForwardingPipelineConfig::StreamedGetForwardingPipelineConfig, this, std::placeholders::_1, std::placeholders::_2))); ^~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:448:87: error: expected primary-expression before ‘,’ token new ::grpc::StreamedUnaryHandler< ::p4::v1::GetForwardingPipelineConfigRequest, ::p4::v1::GetForwardingPipelineConfigResponse>(std::bind(&WithStreamedUnaryMethod_GetForwardingPipelineConfig::StreamedGetForwardingPipelineConfig, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.h:448:134: error: expected primary-expression before ‘>’ token ::p4::v1::GetForwardingPipelineConfigRequest, ::p4::v1::GetForwardingPipelineConfigResponse>(std::bind(&WithStreamedUnaryMethod_GetForwardingPipelineConfig::StreamedGetForwardingPipelineConfig, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.h: In constructor ‘p4::v1::P4Runtime::WithStreamedUnaryMethod_Capabilities::WithStreamedUnaryMethod_Capabilities()’: grpc_out/p4/v1/p4runtime.grpc.pb.h:468:21: error: ‘StreamedUnaryHandler’ in namespace ‘grpc’ does not name a template type new ::grpc::StreamedUnaryHandler< ::p4::v1::CapabilitiesRequest, ::p4::v1::CapabilitiesResponse>(std::bind(&WithStreamedUnaryMethod_Capabilities::StreamedCapabilities, this, std::placeholders::_1, std::placeholders::_2))); ^~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:468:72: error: expected primary-expression before ‘,’ token new ::grpc::StreamedUnaryHandler< ::p4::v1::CapabilitiesRequest, ::p4::v1::CapabilitiesResponse>(std::bind(&WithStreamedUnaryMethod_Capabilities::StreamedCapabilities, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.h:468:104: error: expected primary-expression before ‘>’ token ::grpc::StreamedUnaryHandler< ::p4::v1::CapabilitiesRequest, ::p4::v1::CapabilitiesResponse>(std::bind(&WithStreamedUnaryMethod_Capabilities::StreamedCapabilities, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.h: In constructor ‘p4::v1::P4Runtime::WithSplitStreamingMethod_Read::WithSplitStreamingMethod_Read()’: grpc_out/p4/v1/p4runtime.grpc.pb.h:489:21: error: ‘SplitServerStreamingHandler’ in namespace ‘grpc’ does not name a template type new ::grpc::SplitServerStreamingHandler< ::p4::v1::ReadRequest, ::p4::v1::ReadResponse>(std::bind(&WithSplitStreamingMethod_Read::StreamedRead, this, std::placeholders::_1, std::placeholders::_2))); ^~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.h:489:71: error: expected primary-expression before ‘,’ token new ::grpc::SplitServerStreamingHandler< ::p4::v1::ReadRequest, ::p4::v1::ReadResponse>(std::bind(&WithSplitStreamingMethod_Read::StreamedRead, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.h:489:95: error: expected primary-expression before ‘>’ token new ::grpc::SplitServerStreamingHandler< ::p4::v1::ReadRequest, ::p4::v1::ReadResponse>(std::bind(&WithSplitStreamingMethod_Read::StreamedRead, this, std::placeholders::_1, std::placeholders::_2))); ^ grpc_out/p4/v1/p4runtime.grpc.pb.cc: In constructor ‘p4::v1::P4Runtime::Stub::Stub(const std::shared_ptr&)’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:34:24: error: class ‘p4::v1::P4Runtime::Stub’ does not have any field named ‘rpcmethodWrite’ : channel_(channel), rpcmethodWrite(P4Runtime_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel) ^~~~ grpcout/p4/v1/p4runtime.grpc.pb.cc:34:76: error: ‘grpc::RpcMethod’ has not been declared : channel(channel), rpcmethodWrite(P4Runtime_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, channel) ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:35:5: error: class ‘p4::v1::P4Runtime::Stub’ does not have any field named ‘rpcmethodRead’ , rpcmethodRead(P4Runtime_method_names[1], ::grpc::RpcMethod::SERVER_STREAMING, channel) ^~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:35:56: error: ‘grpc::RpcMethod’ has not been declared , rpcmethodRead(P4Runtime_method_names[1], ::grpc::RpcMethod::SERVER_STREAMING, channel) ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:36:5: error: class ‘p4::v1::P4Runtime::Stub’ does not have any field named ‘rpcmethodSetForwardingPipelineConfig’ , rpcmethodSetForwardingPipelineConfig(P4Runtime_method_names[2], ::grpc::RpcMethod::NORMAL_RPC, channel) ^~~~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:36:79: error: ‘grpc::RpcMethod’ has not been declared , rpcmethodSetForwardingPipelineConfig(P4Runtime_method_names[2], ::grpc::RpcMethod::NORMAL_RPC, channel) ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:37:5: error: class ‘p4::v1::P4Runtime::Stub’ does not have any field named ‘rpcmethodGetForwardingPipelineConfig’ , rpcmethodGetForwardingPipelineConfig(P4Runtime_method_names[3], ::grpc::RpcMethod::NORMAL_RPC, channel) ^~~~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:37:79: error: ‘grpc::RpcMethod’ has not been declared , rpcmethodGetForwardingPipelineConfig(P4Runtime_method_names[3], ::grpc::RpcMethod::NORMAL_RPC, channel) ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:38:5: error: class ‘p4::v1::P4Runtime::Stub’ does not have any field named ‘rpcmethodStreamChannel’ , rpcmethodStreamChannel(P4Runtime_method_names[4], ::grpc::RpcMethod::BIDI_STREAMING, channel) ^~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:38:65: error: ‘grpc::RpcMethod’ has not been declared , rpcmethodStreamChannel(P4Runtime_method_names[4], ::grpc::RpcMethod::BIDI_STREAMING, channel) ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:39:5: error: class ‘p4::v1::P4Runtime::Stub’ does not have any field named ‘rpcmethodCapabilities’ , rpcmethodCapabilities(P4Runtime_method_names[5], ::grpc::RpcMethod::NORMAL_RPC, channel) ^~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:39:64: error: ‘grpc::RpcMethod’ has not been declared , rpcmethodCapabilities(P4Runtime_method_names[5], ::grpc::RpcMethod::NORMAL_RPC, channel) ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::Status p4::v1::P4Runtime::Stub::Write(grpc::ClientContext, const p4::v1::WriteRequest&, p4::v1::WriteResponse)’: grpcout/p4/v1/p4runtime.grpc.pb.cc:43:18: error: ‘BlockingUnaryCall’ is not a member of ‘grpc’ return ::grpc::BlockingUnaryCall(channel.get(), rpcmethodWrite, context, request, response); ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:43:18: note: suggested alternative: In file included from /usr/local/include/grpc++/impl/codegen/client_unary_call.h:26:0, from grpc_out/p4/v1/p4runtime.grpc.pb.cc:11: /usr/local/include/grpcpp/impl/codegen/client_unary_call.h:45:8: note: ‘grpc::internal::BlockingUnaryCall’ Status BlockingUnaryCall(ChannelInterface channel, const RpcMethod& method, ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:43:52: error: ‘rpcmethodWrite’ was not declared in this scope return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethodWrite, context, request, response); ^~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:43:52: note: suggested alternative: ‘WithAsyncMethodWrite’ return ::grpc::BlockingUnaryCall(channel.get(), rpcmethodWrite, context, request, response); ^~~~ WithAsyncMethod_Write grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::ClientAsyncResponseReader p4::v1::P4Runtime::Stub::AsyncWriteRaw(grpc::ClientContext, const p4::v1::WriteRequest&, grpc::CompletionQueue)’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:47:94: error: ‘rpcmethodWrite’ was not declared in this scope return new ::grpc::ClientAsyncResponseReader< ::p4::v1::WriteResponse>(channel_.get(), cq, rpcmethodWrite, context, request); ^~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:47:94: note: suggested alternative: ‘WithAsyncMethodWrite’ return new ::grpc::ClientAsyncResponseReader< ::p4::v1::WriteResponse>(channel.get(), cq, rpcmethodWrite, context, request); ^~~~ WithAsyncMethod_Write grpc_out/p4/v1/p4runtime.grpc.pb.cc:47:128: error: ‘static void grpc::ClientAsyncResponseReader::operator new(std::size_t) [with R = p4::v1::WriteResponse; std::sizet = long unsigned int]’ is private within this context tAsyncResponseReader< ::p4::v1::WriteResponse>(channel.get(), cq, rpcmethodWrite, context, request); ^ In file included from /usr/local/include/grpc++/impl/codegen/async_unary_call.h:26:0, from grpc_out/p4/v1/p4runtime.grpc.pb.h:25, from grpc_out/p4/v1/p4runtime.grpc.pb.cc:6: /usr/local/include/grpcpp/impl/codegen/async_unary_call.h:278:16: note: declared private here static void operator new(std::size_t size); ^~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::ClientReader p4::v1::P4Runtime::Stub::ReadRaw(grpc::ClientContext, const p4::v1::ReadRequest&)’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:51:76: error: ‘rpcmethodRead’ was not declared in this scope return new ::grpc::ClientReader< ::p4::v1::ReadResponse>(channel_.get(), rpcmethodRead, context, request); ^~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::ClientAsyncReader p4::v1::P4Runtime::Stub::AsyncReadRaw(grpc::ClientContext, const p4::v1::ReadRequest&, grpc::CompletionQueue, void)’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:55:85: error: ‘rpcmethodRead’ was not declared in this scope return new ::grpc::ClientAsyncReader< ::p4::v1::ReadResponse>(channel_.get(), cq, rpcmethodRead, context, request, tag); ^~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::Status p4::v1::P4Runtime::Stub::SetForwardingPipelineConfig(grpc::ClientContext, const p4::v1::SetForwardingPipelineConfigRequest&, p4::v1::SetForwardingPipelineConfigResponse)’: grpcout/p4/v1/p4runtime.grpc.pb.cc:59:18: error: ‘BlockingUnaryCall’ is not a member of ‘grpc’ return ::grpc::BlockingUnaryCall(channel.get(), rpcmethodSetForwardingPipelineConfig, context, request, response); ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:59:18: note: suggested alternative: In file included from /usr/local/include/grpc++/impl/codegen/client_unary_call.h:26:0, from grpc_out/p4/v1/p4runtime.grpc.pb.cc:11: /usr/local/include/grpcpp/impl/codegen/client_unary_call.h:45:8: note: ‘grpc::internal::BlockingUnaryCall’ Status BlockingUnaryCall(ChannelInterface channel, const RpcMethod& method, ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:59:52: error: ‘rpcmethodSetForwardingPipelineConfig’ was not declared in this scope return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethodSetForwardingPipelineConfig, context, request, response); ^~~~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:59:52: note: suggested alternative: ‘WithAsyncMethodSetForwardingPipelineConfig’ return ::grpc::BlockingUnaryCall(channel.get(), rpcmethodSetForwardingPipelineConfig, context, request, response); ^~~~~~~~~~ WithAsyncMethod_SetForwardingPipelineConfig grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::ClientAsyncResponseReader p4::v1::P4Runtime::Stub::AsyncSetForwardingPipelineConfigRaw(grpc::ClientContext, const p4::v1::SetForwardingPipelineConfigRequest&, grpc::CompletionQueue)’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:63:116: error: ‘rpcmethodSetForwardingPipelineConfig’ was not declared in this scope ientAsyncResponseReader< ::p4::v1::SetForwardingPipelineConfigResponse>(channel_.get(), cq, rpcmethodSetForwardingPipelineConfig, context, request); ^~~~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:63:116: note: suggested alternative: ‘WithAsyncMethodSetForwardingPipelineConfig’ ientAsyncResponseReader< ::p4::v1::SetForwardingPipelineConfigResponse>(channel.get(), cq, rpcmethodSetForwardingPipelineConfig, context, request); ^~~~~~~~~~ WithAsyncMethod_SetForwardingPipelineConfig grpc_out/p4/v1/p4runtime.grpc.pb.cc:63:172: error: ‘static void grpc::ClientAsyncResponseReader::operator new(std::size_t) [with R = p4::v1::SetForwardingPipelineConfigResponse; std::sizet = long unsigned int]’ is private within this context gPipelineConfigResponse>(channel.get(), cq, rpcmethodSetForwardingPipelineConfig, context, request); ^ In file included from /usr/local/include/grpc++/impl/codegen/async_unary_call.h:26:0, from grpc_out/p4/v1/p4runtime.grpc.pb.h:25, from grpc_out/p4/v1/p4runtime.grpc.pb.cc:6: /usr/local/include/grpcpp/impl/codegen/async_unary_call.h:278:16: note: declared private here static void operator new(std::size_t size); ^~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::Status p4::v1::P4Runtime::Stub::GetForwardingPipelineConfig(grpc::ClientContext, const p4::v1::GetForwardingPipelineConfigRequest&, p4::v1::GetForwardingPipelineConfigResponse)’: grpcout/p4/v1/p4runtime.grpc.pb.cc:67:18: error: ‘BlockingUnaryCall’ is not a member of ‘grpc’ return ::grpc::BlockingUnaryCall(channel.get(), rpcmethodGetForwardingPipelineConfig, context, request, response); ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:67:18: note: suggested alternative: In file included from /usr/local/include/grpc++/impl/codegen/client_unary_call.h:26:0, from grpc_out/p4/v1/p4runtime.grpc.pb.cc:11: /usr/local/include/grpcpp/impl/codegen/client_unary_call.h:45:8: note: ‘grpc::internal::BlockingUnaryCall’ Status BlockingUnaryCall(ChannelInterface channel, const RpcMethod& method, ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:67:52: error: ‘rpcmethodGetForwardingPipelineConfig’ was not declared in this scope return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethodGetForwardingPipelineConfig, context, request, response); ^~~~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:67:52: note: suggested alternative: ‘WithAsyncMethodGetForwardingPipelineConfig’ return ::grpc::BlockingUnaryCall(channel.get(), rpcmethodGetForwardingPipelineConfig, context, request, response); ^~~~~~~~~~ WithAsyncMethod_GetForwardingPipelineConfig grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::ClientAsyncResponseReader p4::v1::P4Runtime::Stub::AsyncGetForwardingPipelineConfigRaw(grpc::ClientContext, const p4::v1::GetForwardingPipelineConfigRequest&, grpc::CompletionQueue)’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:71:116: error: ‘rpcmethodGetForwardingPipelineConfig’ was not declared in this scope ientAsyncResponseReader< ::p4::v1::GetForwardingPipelineConfigResponse>(channel_.get(), cq, rpcmethodGetForwardingPipelineConfig, context, request); ^~~~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:71:116: note: suggested alternative: ‘WithAsyncMethodGetForwardingPipelineConfig’ ientAsyncResponseReader< ::p4::v1::GetForwardingPipelineConfigResponse>(channel.get(), cq, rpcmethodGetForwardingPipelineConfig, context, request); ^~~~~~~~~~ WithAsyncMethod_GetForwardingPipelineConfig grpc_out/p4/v1/p4runtime.grpc.pb.cc:71:172: error: ‘static void grpc::ClientAsyncResponseReader::operator new(std::size_t) [with R = p4::v1::GetForwardingPipelineConfigResponse; std::sizet = long unsigned int]’ is private within this context gPipelineConfigResponse>(channel.get(), cq, rpcmethodGetForwardingPipelineConfig, context, request); ^ In file included from /usr/local/include/grpc++/impl/codegen/async_unary_call.h:26:0, from grpc_out/p4/v1/p4runtime.grpc.pb.h:25, from grpc_out/p4/v1/p4runtime.grpc.pb.cc:6: /usr/local/include/grpcpp/impl/codegen/async_unary_call.h:278:16: note: declared private here static void operator new(std::size_t size); ^~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::ClientReaderWriter<p4::v1::StreamMessageRequest, p4::v1::StreamMessageResponse> p4::v1::P4Runtime::Stub::StreamChannelRaw(grpc::ClientContext)’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:75:123: error: ‘rpcmethodStreamChannel’ was not declared in this scope derWriter< ::p4::v1::StreamMessageRequest, ::p4::v1::StreamMessageResponse>(channel_.get(), rpcmethodStreamChannel, context); ^~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:75:123: note: suggested alternative: ‘WithAsyncMethodStreamChannel’ derWriter< ::p4::v1::StreamMessageRequest, ::p4::v1::StreamMessageResponse>(channel.get(), rpcmethodStreamChannel, context); ^~~~~~~~ WithAsyncMethod_StreamChannel grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::ClientAsyncReaderWriter<p4::v1::StreamMessageRequest, p4::v1::StreamMessageResponse> p4::v1::P4Runtime::Stub::AsyncStreamChannelRaw(grpc::ClientContext, grpc::CompletionQueue, void)’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:79:132: error: ‘rpcmethodStreamChannel’ was not declared in this scope riter< ::p4::v1::StreamMessageRequest, ::p4::v1::StreamMessageResponse>(channel_.get(), cq, rpcmethodStreamChannel, context, tag); ^~~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:79:132: note: suggested alternative: ‘WithAsyncMethodStreamChannel’ riter< ::p4::v1::StreamMessageRequest, ::p4::v1::StreamMessageResponse>(channel.get(), cq, rpcmethodStreamChannel, context, tag); ^~~~~~~~ WithAsyncMethod_StreamChannel grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::Status p4::v1::P4Runtime::Stub::Capabilities(grpc::ClientContext, const p4::v1::CapabilitiesRequest&, p4::v1::CapabilitiesResponse)’: grpcout/p4/v1/p4runtime.grpc.pb.cc:83:18: error: ‘BlockingUnaryCall’ is not a member of ‘grpc’ return ::grpc::BlockingUnaryCall(channel.get(), rpcmethodCapabilities, context, request, response); ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:83:18: note: suggested alternative: In file included from /usr/local/include/grpc++/impl/codegen/client_unary_call.h:26:0, from grpc_out/p4/v1/p4runtime.grpc.pb.cc:11: /usr/local/include/grpcpp/impl/codegen/client_unary_call.h:45:8: note: ‘grpc::internal::BlockingUnaryCall’ Status BlockingUnaryCall(ChannelInterface channel, const RpcMethod& method, ^~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:83:52: error: ‘rpcmethodCapabilities’ was not declared in this scope return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethodCapabilities, context, request, response); ^~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:83:52: note: suggested alternative: ‘WithAsyncMethodCapabilities’ return ::grpc::BlockingUnaryCall(channel.get(), rpcmethodCapabilities, context, request, response); ^~~~~~~ WithAsyncMethod_Capabilities grpc_out/p4/v1/p4runtime.grpc.pb.cc: In member function ‘virtual grpc::ClientAsyncResponseReader p4::v1::P4Runtime::Stub::AsyncCapabilitiesRaw(grpc::ClientContext, const p4::v1::CapabilitiesRequest&, grpc::CompletionQueue)’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:87:101: error: ‘rpcmethodCapabilities’ was not declared in this scope new ::grpc::ClientAsyncResponseReader< ::p4::v1::CapabilitiesResponse>(channel_.get(), cq, rpcmethodCapabilities, context, request); ^~~~~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:87:101: note: suggested alternative: ‘WithAsyncMethodCapabilities’ new ::grpc::ClientAsyncResponseReader< ::p4::v1::CapabilitiesResponse>(channel.get(), cq, rpcmethodCapabilities, context, request); ^~~~~~~ WithAsyncMethod_Capabilities grpc_out/p4/v1/p4runtime.grpc.pb.cc:87:142: error: ‘static void grpc::ClientAsyncResponseReader::operator new(std::size_t) [with R = p4::v1::CapabilitiesResponse; std::sizet = long unsigned int]’ is private within this context Reader< ::p4::v1::CapabilitiesResponse>(channel.get(), cq, rpcmethodCapabilities, context, request); ^ In file included from /usr/local/include/grpc++/impl/codegen/async_unary_call.h:26:0, from grpc_out/p4/v1/p4runtime.grpc.pb.h:25, from grpc_out/p4/v1/p4runtime.grpc.pb.cc:6: /usr/local/include/grpcpp/impl/codegen/async_unary_call.h:278:16: note: declared private here static void operator new(std::size_t size); ^~~~ grpc_out/p4/v1/p4runtime.grpc.pb.cc: In constructor ‘p4::v1::P4Runtime::Service::Service()’: grpc_out/p4/v1/p4runtime.grpc.pb.cc:91:17: error: expected type-specifier before ‘::’ token AddMethod(new ::grpc::RpcServiceMethod( ^~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:96:17: error: expected type-specifier before ‘::’ token AddMethod(new ::grpc::RpcServiceMethod( ^~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:101:17: error: expected type-specifier before ‘::’ token AddMethod(new ::grpc::RpcServiceMethod( ^~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:106:17: error: expected type-specifier before ‘::’ token AddMethod(new ::grpc::RpcServiceMethod( ^~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:111:17: error: expected type-specifier before ‘::’ token AddMethod(new ::grpc::RpcServiceMethod( ^~ grpc_out/p4/v1/p4runtime.grpc.pb.cc:116:17: error: expected type-specifier before ‘::’ token AddMethod(new ::grpc::RpcServiceMethod( ^~ Makefile:1026: recipe for target 'grpc_out/p4/v1/p4runtime.grpc.pb.lo' failed make[4]: [grpc_out/p4/v1/p4runtime.grpc.pb.lo] Error 1 make[4]: Waiting for unfinished jobs.... libtool: compile: g++ -DHAVE_CONFIG_H -I. -isystem cpp_out -isystem grpc_out -I./../include -I. -g -O2 -MT grpc_out/p4/config/v1/p4info.grpc.pb.lo -MD -MP -MF grpc_out/p4/config/v1/.deps/p4info.grpc.pb.Tpo -c grpc_out/p4/config/v1/p4info.grpc.pb.cc -o grpc_out/p4/config/v1/p4info.grpc.pb.o >/dev/null 2>&1 make[4]: Leaving directory '/home/coco/p4/PI/proto' Makefile:1717: recipe for target 'all-recursive' failed make[3]: [all-recursive] Error 1 make[3]: Leaving directory '/home/coco/p4/PI/proto' Makefile:713: recipe for target 'all' failed make[2]: [all] Error 2 make[2]: Leaving directory '/home/coco/p4/PI/proto' Makefile:452: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/home/coco/p4/PI' Makefile:384: recipe for target 'all' failed make: [all] Error 2

I don;t know how to fix it,anybody has good suggestion?

jafingerhut commented 2 years ago

I do not know what causes those particular errors, sorry.

I do know that I have some bash scripts published that on a freshly installed Ubuntu 18.04, 20.04, or 22.04 system, they will build the latest versions of PI, behavioral-model, and p4c repos, and all dependencies they require to build successfully. You can find them here: https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md

jafingerhut commented 17 hours ago

Closing this old issue due to no follow-up activity, so hopefully questioner had their problem resolved. Feel free to reopen this issue, or create a new one, if not.