Dear all,
I am having issues adding ONNX (
https://github.com/onnx/onnx) library support to p4a as a new recipe. I would like to ask for help from more experienced members. :)
A minimal example would be as follows:
In buildozer.spec:
requirements = python3,kivy,onnx
android.archs = arm64-v8a
And the recipe I have written (so far) is here:
https://gist.github.com/nmilosev/2f0090c4f86637f04ac83cbfe835f8bcIn my experience the ONNX library seems to be difficult to build sadly, even though we have all the dependencies: protobuf and pybind11.
In the recipe there are a few things that need to be setup, namely path to protobuf shared library, some ONNX specific CMAKE args and lastly, similar to gevent (
https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/recipes/gevent/__init__.py) recipe we need to move flags to LIBS environment variable.
The build fails with a weird error (wrong compiler?) as so:
https://gist.github.com/nmilosev/92558985e9103321dfdbac8770273fcfAnd I am unsure where to go next. My gut tells me its protobuf complier related as it uses protoc from the host, and not from the target distribution (or a static one), but I am not sure why the error. :(
Any insight would be greatly appreciated. Full log for the ONNX build is attached if it helps. The host is a Docker container used for building (based on buildozer Docker image) with protobuf compiler and protobuf libraries added.
Thank you in advance for your help!
Best regards,
Nemanja