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

Built APK fails with ImportError: dlopen failed on _clock.so #998

Closed
ngoonee opened this issue Jan 27, 2017 · 9 comments
Closed

Built APK fails with ImportError: dlopen failed on _clock.so #998

ngoonee opened this issue Jan 27, 2017 · 9 comments

Comments

@ngoonee
Copy link

ngoonee commented Jan 27, 2017

I'm on current master (a924f9 24th Jan), trying to rebuild the launcher with more packages.

Starting an app from the launcher gives the following error in log. It never reaches my app's code, this happens during import.

01-27 07:21:04.271 7301 7409 I python : [INFO ] [Logger ] Record log in /storage/emulated/0/kivy/songprez/.kivy/logs/kivy_17-01-27_3.txt
01-27 07:21:04.271 7301 7409 I python : [INFO ] [Kivy ] v1.9.2-dev0
01-27 07:21:04.272 7301 7409 I python : [INFO ] [Python ] v2.7.2 (default, Jan 27 2017, 06:36:47)
01-27 07:21:04.272 7301 7409 I python : [GCC 4.8]
01-27 07:21:04.812 7301 7409 I python : Traceback (most recent call last):
01-27 07:21:04.812 7301 7409 I python : File "/storage/emulated/0/kivy/songprez/main.py", line 9, in
01-27 07:21:04.813 7301 7409 I python : install_twisted_reactor()
01-27 07:21:04.813 7301 7409 I python : File "/home/ngoonee/.local/share/python-for-android/dists/songprezlauncher/private/lib/python2.7/site-packages/kivy/support.py", line 188, in install_twisted_reactor
01-27 07:21:04.814 7301 7409 I python : File "/home/ngoonee/.local/share/python-for-android/dists/songprezlauncher/private/lib/python2.7/site-packages/kivy/base.py", line 29, in
01-27 07:21:04.815 7301 7409 I python : File "/home/ngoonee/.local/share/python-for-android/dists/songprezlauncher/private/lib/python2.7/site-packages/kivy/clock.py", line 362, in
01-27 07:21:04.816 7301 7409 I python : ImportError: dlopen failed: file offset for the library "/data/user/0/org.kivy.customlauncher/files/app/lib/python2.7/site-packages/kivy/_clock.so" >= file size: 0 >= 0
01-27 07:21:04.849 7301 7409 I python : Python for android ended.

@ngoonee
Copy link
Author

ngoonee commented Jan 27, 2017

In case it's useful, here's my p4a line:-

p4a apk --requirements kivy==master,twisted,Whoosh,xmltodict,blinker,netifaces
--permission INTERNET
--permission WAKELOCK
--wakelock
--package=org.kivy.customlauncher
--dist_name=songprezlauncher
--name "Songprez Launcher"
--version=1.0.0
--android_api 19
--bootstrap=sdl2
--launcher
--minsdk 19
--orientation=user

@ngoonee
Copy link
Author

ngoonee commented Jan 27, 2017

Issues #861 (possibly) and #992 (maybe not too likely) may be related.

@inclement
Copy link
Member

Do you get the same problem if you have no extra requirements (i.e. just kivy in the requirements)?

@ngoonee
Copy link
Author

ngoonee commented Jan 30, 2017

Yes, identical error message. This is with kivy=master AND hostpython2 (python-for-android bug based on #620 which should already be fixed?).

Perhaps my installation of python-for-android isn't actually git master? My install line is

pip install git+https://github.com/kivy/python-for-android.git

@FeralBytes
Copy link
Contributor

@ngoonee try deleting the directories that I outline here just to see.

@inclement
Copy link
Member

Is this still a problem using python-for-android and Kivy master branches?

@ngoonee
Copy link
Author

ngoonee commented Mar 4, 2017

On kivy daf640 (Jan 13) and p4a 395c7e (Mar 4) I still get the same behavior. Running the 'animation' example using a basic build (--requirements master,hostpython2)

@ngoonee
Copy link
Author

ngoonee commented Mar 4, 2017

Deleting the directories mentioned by @FeralBytes does not help, either.

@inclement
Copy link
Member

Closing as resolved, pretty sure this was caused by a bug loading libpymodules.so, which was fixed but has been obseleted anyway by replacing the python recipe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants