Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asio-grpc: fix test_package failures #25563

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Oct 8, 2024

Summary

Changes to recipe: asio-grpc/[*]

Motivation

Fixes two test_packages errors (when building as shared).

  1. Adds VirtualRunEnv(self).generate(scope="build") to fix protoc execution:
protoc --cpp_out conan-center-index/recipes/asio-grpc/all/test_package/build/gcc-11-x86_64-17-release/generated  -I conan-center-index/recipes/asio-grpc/all/test_package --grpc_out conan-center-index/recipes/asio-grpc/all/test_package/build/gcc-11-x86_64-17-release/generated --plugin=protoc-gen-grpc=.conan2/p/b/grpc11cfe08c6d1ac/p/bin/grpc_cpp_plugin conan-center-index/recipes/asio-grpc/all/test_package/test.proto
.conan2/p/b/grpc11cfe08c6d1ac/p/bin/grpc_cpp_plugin: error while loading shared libraries: libgrpc_plugin_support.so.1.54: cannot open shared object file: No such file or directory
--grpc_out: protoc-gen-grpc: Plugin failed with status code 127.
  1. Adds self.requires("protobuf/3.21.12") for asio_grpc_protobuf_generate() to fix linking:
... etc ...
/usr/bin/ld: test.grpc.pb.cc:(.text._ZN4grpc16GenericSerializeINS_17ProtoBufferWriterEN6google8protobuf11MessageLiteEEENS_6StatusERKS4_PNS_10ByteBufferEPb[_ZN4grpc16GenericSerializeINS_17ProtoBufferWriterEN6google8protobuf11MessageLiteEEENS_6StatusERKS4_PNS_10ByteBufferEPb]+0x1ce): undefined reference to `google::protobuf::MessageLite::SerializeToZeroCopyStream(google::protobuf::io::ZeroCopyOutputStream*) const'
/usr/bin/ld: CMakeFiles/test_package.dir/generated/test.grpc.pb.cc.o: in function `grpc::Status grpc::GenericDeserialize<grpc::ProtoBufferReader, google::protobuf::MessageLite>(grpc::ByteBuffer*, google::protobuf::MessageLite*)':
test.grpc.pb.cc:(.text._ZN4grpc18GenericDeserializeINS_17ProtoBufferReaderEN6google8protobuf11MessageLiteEEENS_6StatusEPNS_10ByteBufferEPS4_[_ZN4grpc18GenericDeserializeINS_17ProtoBufferReaderEN6google8protobuf11MessageLiteEEENS_6StatusEPNS_10ByteBufferEPS4_]+0x554): undefined reference to `google::protobuf::MessageLite::ParseFromZeroCopyStream(google::protobuf::io::ZeroCopyInputStream*)'
/usr/bin/ld: CMakeFiles/test_package.dir/generated/test.grpc.pb.cc.o:(.data.rel.ro._ZTIN4grpc17ProtoBufferWriterE[_ZTIN4grpc17ProtoBufferWriterE]+0x10): undefined reference to `typeinfo for google::protobuf::io::ZeroCopyOutputStream'
/usr/bin/ld: CMakeFiles/test_package.dir/generated/test.grpc.pb.cc.o:(.data.rel.ro._ZTVN4grpc17ProtoBufferWriterE[_ZTVN4grpc17ProtoBufferWriterE]+0x38): undefined reference to `google::protobuf::io::ZeroCopyOutputStream::WriteAliasedRaw(void const*, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/test_package.dir/build.make:209: test_package] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/test_package.dir/all] Error 2

These regressions are perhaps due to changes to the protobuf and/or grpc recipes a couple of months ago.

/cc @jcar87 since you were closely involved with the protobuf and grpc recipes.

Details


@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

Warning

Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement.

All green in build 1 (360c9aa1b46a88d272d119e4d0ac952339f394ce):

  • asio-grpc/2.9.2:
    Built 7 packages out of 11 (All logs)

  • asio-grpc/2.6.0:
    Built 7 packages out of 11 (All logs)

  • asio-grpc/2.2.0:
    Built 7 packages out of 11 (All logs)

  • asio-grpc/2.5.1:
    Built 7 packages out of 11 (All logs)

  • asio-grpc/2.4.0:
    Built 7 packages out of 11 (All logs)

  • asio-grpc/2.0.0:
    Built 7 packages out of 11 (All logs)

  • asio-grpc/1.7.0:
    Built 7 packages out of 11 (All logs)

  • asio-grpc/2.3.0:
    Built 7 packages out of 11 (All logs)

  • asio-grpc/2.7.0:
    Built 6 packages out of 11 (All logs)

  • asio-grpc/2.1.0:
    Built 7 packages out of 11 (All logs)

@AbrilRBS AbrilRBS requested a review from jcar87 October 9, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants