sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
736 stars 1.42k forks source link

[sonic-frr ][grpc compile error] it reports error when enable-grpc in sonic-frr #5331

Open zhanggongc opened 4 years ago

zhanggongc commented 4 years ago

we try to enable grpc functions in sonic-frr, so we modify this file: src\sonic-frr\frr\debian\rules image

but it report error while compiling: image

configure:26594: checking for GRPC (grpc grpc++ protobuf) configure:26601: $PKG_CONFIG --exists --print-errors "grpc grpc++ protobuf" Package grpc was not found in the pkg-config search path. Perhaps you should add the directory containing grpc.pc' to the PKG_CONFIG_PATH environment variable No package 'grpc' found Package grpc++ was not found in the pkg-config search path. Perhaps you should add the directory containinggrpc++.pc' to the PKG_CONFIG_PATH environment variable No package 'grpc++' found configure:26604: $? = 1 configure:26618: $PKG_CONFIG --exists --print-errors "grpc grpc++ protobuf" Package grpc was not found in the pkg-config search path. Perhaps you should add the directory containing grpc.pc' to the PKG_CONFIG_PATH environment variable No package 'grpc' found Package grpc++ was not found in the pkg-config search path. Perhaps you should add the directory containinggrpc++.pc' to the PKG_CONFIG_PATH environment variable No package 'grpc++' found configure:26621: $? = 1 configure:26635: result: no No package 'grpc' found No package 'grpc++' found configure:26653: error: grpc/grpc++ were not found on your system.

so what should we do if we want to enable grpc in sonic-frr ?

anshuv-mfst commented 4 years ago

Seems like build issue, might need to engage FRR community.

lguohan commented 4 years ago

it is sonic-slave-buster does not necessary package to frr with grpc, can you identify those packages and add them into sonic-slave-buster.

caizhenghui-juniper commented 4 years ago

This need the following packages, the version might be different:

For grpc

    libprotobuf-dev=3.6.1-4~bpo9+1 \
    libprotoc-dev=3.6.1-4~bpo9+1 \
    libgrpc++-dev=1.16.0-1~bpo9+1 \
    protobuf-compiler=3.6.1-4~bpo9+1 \
    protobuf-compiler-grpc=1.16.0-1~bpo9+1 \
zhanggongc commented 4 years ago

@lguohan @anshuv-mfst @caizhenghui
ok...thanks I will try to resolve grpc version match issues. now I need to start grpc service normally in FRR ,not in sonic-frr.

caizhenghui-juniper commented 4 years ago

and you will need to put the right runtime packages in wherever you will run grpc. e.g. libgrpc++1 \ libprotobuf17