Skip to content

[protobuf_cpp] fixed runtime issues #1757

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

Merged
merged 1 commit into from
Mar 16, 2019

Conversation

goffi-contrib
Copy link
Contributor

two issues were causing troubles with protobuf during runtime:

  • a missing __init__.py in site-packages/google was preventing to import the lib (at least with Python 2)
  • the links options (-l …) where not taken into account. By moving
    them to LDFLAGS it works correctly.

two issues were causing troubles with protobuf during runtime:
  - a missing `__init__.py` in site-packages/google was preventing to import the lib (at least with Python 2)
  - the links options (`-l …`) where not taken into account. By moving
  them to LDFLAGS it works correctly.
@AndreMiras
Copy link
Member

Thanks for the PR I'd like to test it at runtime at least on Python3 before merging

@AndreMiras AndreMiras self-assigned this Mar 16, 2019
@AndreMiras
Copy link
Member

I gave it a try prior the fix. With the following import code:

from google.protobuf.pyext import _message

And I got the following runtime error:

03-16 20:17:40.227 20010 20322 I python  : Traceback (most recent call last):                                                                                             
03-16 20:17:40.227 20010 20322 I python  :   File "/home/andre/workspace/python-for-android/issues/pr1757/.buildozer/android/app/main.py", line 3, in <module>            
03-16 20:17:40.227 20010 20322 I python  : ImportError: dlopen failed: cannot locate symbol "_ZNSs4_Rep20_S_empty_rep_storageE" referenced by "/data/data/org.test.myapp/files/app/_python_bundle/site-packages/google/protobuf/pyext/_message.so"...
03-16 20:17:40.227 20010 20322 I python  : Python for android ended. 

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
I've tested the fix on Python3 target and I confirm the linker flags update also fixes the runtime on Python3

@AndreMiras AndreMiras merged commit 2f4cf91 into kivy:master Mar 16, 2019
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