-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Feature/grpc cross compile #5607
Feature/grpc cross compile #5607
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think we need here some discussion to highlight the desired way to go. I tried to explain the problem and the solution in the merge request above. The key-point of the discussion should be: How should we handle packages which delivers binaries for their own build-process in case of cross-compilation? This is the case for grpc, since it provides protoc plugins, which are used during grpc build. But when i add the package as build_requirement to its own recipe, then the ci-check for recursive inclusion fails. Nevertheless the local builds runs fine. I understand why this check is beneficial, but i think we should discuss:
Since i do not know who would be the best discussion partner for those conan mechanic fundamentals i will ping two conan and two package developers here. Maybe some of you can in turn link the best suitable discussion partner here. @memsharded @lasote @SSE4 @SpaceIm |
Just a naive community reviewer... this is a very complicated topic and there's a few experts (not this guy). To use protoc there this code here which might give you clues
Is how it's used in the test package
The best answer I could point you to is this #5258 |
Can you please "fixes #5622" to the top level comment of the PR |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think i did rebuild the most behavior like you linked. The difference between protobuf and grpc ist in my eyes, that protobuf has the self-dependency as cross-compile build_requirement only for test_package. On the other hand grpc needs the cross-compile build_requirement self-dependency already in the package reciepe. This is necessary since grpc does provide plugins for protoc, which where necessary during its own lib build. But this build_requirement self-dependency in the recipe makes jenkins ci red, because it finds a dependency recursion. To tackle this, i think we need here input from some internal developers. |
👋 @uilianries @SpaceIm @anton-danielsson this could use your expertise. some fun cross-compiling self dependent two profile similar to protobuf. |
Nice! |
I know this approach works in practice but I'm not 100% sure it's actually "allowed". Our organization have cross compiled grpc for Android and iOS for quite some time now and our "internal" recipe still uses two separate recipies for grpc. One for grpc and one for the plugins (grpc-plugins). |
I detected other pull requests that are modifying grpc/all recipe: This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
This comment has been minimized.
This comment has been minimized.
Failure in build 7 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@@ -60,6 +60,13 @@ def requirements(self): | |||
self.requires('abseil/20210324.0') | |||
self.requires('re2/20210202') | |||
|
|||
def build_requirements(self): | |||
if tools.cross_building(self.settings): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if tools.cross_building(self.settings): | |
if tools.cross_building(self.settings) and hasattr(self, "settings_build"): |
fixes #5622
grpc/1.37.1
This PR enables cross-compilation of grpc for arm targets. The build-calls in the motivation are running correctly in local tests.
Motivation:
grpc does not compile for arm cross-compilation. Example call:
docker run -v $(pwd)/conan-docker-cache/:/home/conan/.conan --rm conanio/gcc9-armv7hf bash -c "conan install -pr=/home/conan/.conan/profiles/build grpc/1.37.1@ --build missing"
host-profile
build-profile
conan-center hook activated.
problems:
To enable cross-compile functionality we have to provide do the following:
solutions:
_gRPC_PROTOBUF_PROTOC_EXECUTABLE
enforces then to use the build-version of protoc during grpc compilation. If there is a possibility to control the (build)_requirement paths to be appended or prepended, this could obsolete the cmake variable manipulation.