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

cygrpc.so for Android #36231

Open
Jrcampano opened this issue Apr 2, 2024 · 2 comments
Open

cygrpc.so for Android #36231

Jrcampano opened this issue Apr 2, 2024 · 2 comments
Assignees
Labels
disposition/help wanted Maintainers do not have enough resources to allocate to this at the moment. Help is appreciated! kind/enhancement lang/Python priority/P2

Comments

@Jrcampano
Copy link

Jrcampano commented Apr 2, 2024

Is your feature request related to a problem? Please describe.

I am building a python kivy app for Android (aarch64) that makes use of gRPC since it is a requirement for Google Cloud Firestore (big deal here). By simply using pip install grpcio, the building of the app works but when running on the phone, there is an error when the file _cython/cygrpc.so is opened:
ImportError: dlopen failed: library "librt.so.1" not found
As far as I have figured (after wrestling this issue for 3 weeks from many angles), librt can be accessed like that from glibc for regular linux distros but for the Bionic of android, librt is included in its libc. So it appears to me that this is simply a path pointing problem. Please correct me if I am wrong here.

Describe the solution you'd like

I gather that the manylinux wheels provided in PyPI are built for those regular Linux distros. It is sad though that the only incompatiblity with Android is this detail. I think it would be great to have at least a working cygrpc.so version for Android.

Describe alternatives you've considered

I have tried in many ways to compile cygrpc.so locally for aarch64 Android but have failed miserably. If the above request is not possible I could really use some guidance about how to cross-compile this cygrpc.so for aarch64 Android from (for instance, in my case) a x86_64 ubuntu.

@Jrcampano
Copy link
Author

Hi again!
Thank you for taking a look at my post!
It is truly not my intention to repost here but I am compelled to ask after a month.

Is providing a precompiled shared library cygrpc.so compatible with Android Bionic something you are considering?
I just think it is a bit sad that this "minor" incompatiblity (please correct me if it is not) prevents any python for android (kivy) developer from using gRPC and thus Cloud Firestore.
In my case, I am really interested in knowing if you can help me on this, since otherwise I should already start looking for other cloud solutions for my project.

Even if providing a cygrpc.so for Android is not in your scope, I would truly appreciate some guidance on how could I compile it locally.

Again, thanks for your attention!

@XuanWang-Amos
Copy link
Contributor

XuanWang-Amos commented May 2, 2024

Hi, sorry for the late reply.

Unfortunately, Android is not a supported platform for gRPC Python and we don't have enough bandwidth to add it now. For anyone interested in Android, please reply here so we can prioritize accordingly. In the meanwhile, we would greatly appreciate any contributions from the community!

As a start, this is the file which we use to build artifacts for different platforms, this also contains information about cross compiling aarch64, hope this helps: https://github.com/grpc/grpc/blob/master/tools/run_tests/artifacts/build_artifact_python.sh#L54

@XuanWang-Amos XuanWang-Amos added the disposition/help wanted Maintainers do not have enough resources to allocate to this at the moment. Help is appreciated! label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition/help wanted Maintainers do not have enough resources to allocate to this at the moment. Help is appreciated! kind/enhancement lang/Python priority/P2
Projects
None yet
Development

No branches or pull requests

3 participants