Open lihing1994 opened 8 months ago
Can you try with https://patchwork.yoctoproject.org/project/oe/patch/20231113084245.96832-1-samuli.piippo@qt.io/ applied ?
I attempted to apply this commit, which I believe contains the same fix as the one you provided in the link. But I don't think it really works.
Here is the compile error log
| FAILED: gens/src/proto/grpc/channelz/channelz.grpc.pb.cc gens/src/proto/grpc/channelz/channelz.grpc.pb.h gens/src/proto/grpc/channelz/channelz_mock.grpc.pb.h gens/src/proto/grpc/channelz/channelz.pb.cc gens/src/proto/grpc/channelz/channelz.pb.h /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/build/gens/src/proto/grpc/channelz/channelz.grpc.pb.cc /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/build/gens/src/proto/grpc/channelz/channelz.grpc.pb.h /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/build/gens/src/proto/grpc/channelz/channelz_mock.grpc.pb.h /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/build/gens/src/proto/grpc/channelz/channelz.pb.cc /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/build/gens/src/proto/grpc/channelz/channelz.pb.h
| cd /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/build/protos && /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/protoc --grpc_out=generate_mock_code=true:/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/build/gens --cpp_out=/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/build/gens --plugin=protoc-gen-grpc=/build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/recipe-sysroot-native/usr/bin/grpc_cpp_plugin -I . -I /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/include src/proto/grpc/channelz/channelz.proto
| /bin/sh: 1: /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-grpc/1.50.1-r0/recipe-sysroot/usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/usr/bin/protoc: not found
protobuf
to latest version 4.23.4
, but it seems like it requires latest version of grpc
.
| In file included from /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-protobuf/4.23.4-r0/git/src/google/protobuf/extension_set.cc:55:
| /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-protobuf/4.23.4-r0/git/src/google/protobuf/port_def.inc:210:35: error: static assertion failed: Protobuf only supports Abseil version 20230125.3 and newer.
| 210 | (ABSL_LTS_RELEASE_VERSION > (x) || \
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
| 211 | (ABSL_LTS_RELEASE_VERSION == (x) && ABSL_LTS_RELEASE_PATCH_LEVEL >= (y)))
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| /build/tmp/work/x86_64-nativesdk-pokysdk-linux/nativesdk-protobuf/4.23.4-r0/git/src/google/protobuf/port_def.inc:219:15: note: in expansion of macro 'PROTOBUF_ABSL_MIN'
| 219 | static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
| | ^~~~~~~~~~~~~~~~~
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
protobuf
and grpc
, the build still failed, indicating that it requires c++14 or newer
. I have no idea what causing this issue. But I guess I need to check out master branch meta-clang
instead of mickledore
?Main branch have patch https://github.com/openembedded/meta-openembedded/commit/54885a5af2da26d7c84f8aff6fc845c2681b2890
For Mickledore you can write grpc_1.50.1.bbappend
:
# https://github.com/openembedded/meta-openembedded/commit/54885a5af2da26d7c84f8aff6fc845c2681b2890
EXTRA_OECMAKE = " \
-DgRPC_CARES_PROVIDER=package \
-DgRPC_ZLIB_PROVIDER=package \
-DgRPC_SSL_PROVIDER=package \
-DgRPC_PROTOBUF_PROVIDER=package \
-D_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \
-DgRPC_ABSL_PROVIDER=package \
-DgRPC_RE2_PROVIDER=package \
-DgRPC_INSTALL=ON \
-DCMAKE_CROSSCOMPILING=ON \
-DgRPC_INSTALL_LIBDIR=${baselib} \
-DgRPC_INSTALL_CMAKEDIR=${baselib}/cmake/${BPN} \
"
SDK
withnativesdk-grpc
added toTOOLCHAIN_HOST_TASK:append
. However, the build failed becauseprotoc
was not found. I am usinggrpc_1.50.1
on theMickledore
branch.grpc
recipe for theMickledore
branch? I can confirm the building for the SDK is successes after I addedD_gRPC_PROTOBUF_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \
to theEXTRA_OECMAKE
in the grpc recipe.