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

PIL recipe is broken #722

Closed
lipi opened this issue Apr 24, 2016 · 2 comments
Closed

PIL recipe is broken #722

lipi opened this issue Apr 24, 2016 · 2 comments

Comments

@lipi
Copy link

lipi commented Apr 24, 2016

Trying to use PIL but it can't find symbols when loading _imaging.so

Reproducible with a simple test app, see https://gist.github.com/lipi/4381f5feb9b39a20a074c18537e57fb3

Built it using

p4a apk --requirements=kivy,pil --private . --package=org.example --name="pil-test" --version=0.1 --bootstrap=pygame

Output:

4-24 13:48:25.183 I/python (26051): [WARNING ] [Config ] Older configuration version detected (0 instead of 15)
04-24 13:48:25.184 I/python (26051): [WARNING ] [Config ] Upgrading configuration in progress.
04-24 13:48:25.303 I/python (26051): [INFO ] [Logger ] Record log in /data/data/org.example/files/.kivy/logs/kivy_16-04-24_0.txt
04-24 13:48:25.304 I/python (26051): [INFO ] [Kivy ] v1.9.2-dev0
04-24 13:48:25.304 I/python (26051): [INFO ] [Python ] v2.7.2 (default, Apr 24 2016, 11:49:28)
04-24 13:48:25.304 I/python (26051): [GCC 4.9 20150123 (prerelease)]
04-24 13:48:25.347 I/python (26051): [INFO ] [Factory ] 193 symbols loaded
04-24 13:48:27.441 I/python (26051): /data/data/org.example/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:12: RuntimeWarning: import cdrom: No module named cdrom
04-24 13:48:27.441 I/python (26051): (ImportError: No module named cdrom)
04-24 13:48:27.466 I/python (26051): [INFO ] [Image ] Providers: img_tex, img_dds, img_gif, img_pygame, img_pil (img_ffpyplayer ignored)
04-24 13:48:27.490 I/python (26051): [INFO ] [Text ] Provider: pygame
04-24 13:48:27.505 I/python (26051): Traceback (most recent call last):
04-24 13:48:27.506 I/python (26051): File "/home/lipi/git/pil-test/main.py", line 18, in
04-24 13:48:27.507 I/python (26051): File "/home/lipi/.local/share/python-for-android/dists/testproject/private/lib/python2.7/site-packages/kivy/app.py", line 802, in run
04-24 13:48:27.507 I/python (26051): File "/home/lipi/git/pil-test/main.py", line 13, in build
04-24 13:48:27.508 I/python (26051): File "/home/lipi/.local/share/python-for-android/dists/testproject/private/lib/python2.7/site-packages/PIL/Image.py", line 1676, in transpose
04-24 13:48:27.509 I/python (26051): File "/home/lipi/.local/share/python-for-android/dists/testproject/private/lib/python2.7/site-packages/PIL/ImageFile.py", line 164, in load
04-24 13:48:27.510 I/python (26051): File "/home/lipi/.local/share/python-for-android/dists/testproject/private/lib/python2.7/site-packages/PIL/PngImagePlugin.py", line 381, in load_prepare
04-24 13:48:27.510 I/python (26051): File "/home/lipi/.local/share/python-for-android/dists/testproject/private/lib/python2.7/site-packages/PIL/ImageFile.py", line 231, in load_prepare
04-24 13:48:27.511 I/python (26051): File "/home/lipi/.local/share/python-for-android/dists/testproject/private/lib/python2.7/site-packages/PIL/Image.py", line 37, in getattr
04-24 13:48:27.512 I/python (26051): ImportError: The _imaging C module is not installed
04-24 13:48:27.546 I/python (26051): Python for android ended.

@lipi
Copy link
Author

lipi commented Apr 24, 2016

If trying to import _imaging:

04-24 14:30:15.641 I/python ( 1355): ImportError: dlopen failed: cannot locate symbol "jsimd_h2v2_downsample" referenced by "_imaging.so"...

$ arm-none-eabi-objdump -t ./build/other_builds/jpeg/armeabi/jpeg/obj/local/armeabi/libjpeg.a | grep jsimd_h2v2_downsample
00000000 UND 00000000 jsimd_h2v2_downsample
$ arm-none-eabi-objdump -t ./build/other_builds/jpeg/armeabi/jpeg/obj/local/armeabi/libsimd.a | grep jsimd_h2v2_downsample
00000000 l d .text.jsimd_h2v2_downsample 00000000 .text.jsimd_h2v2_downsample
00000000 l d .ARM.extab.text.jsimd_h2v2_downsample 00000000 .ARM.extab.text.jsimd_h2v2_downsample
00000000 l d .ARM.exidx.text.jsimd_h2v2_downsample 00000000 .ARM.exidx.text.jsimd_h2v2_downsample
00000000 g F .text.jsimd_h2v2_downsample 00000002 jsimd_h2v2_downsample
$ arm-none-eabi-objdump -t ./dists/testproject/python-install/lib/python2.7/config/libpython2.7.a | grep jsimd_h2v2_downsample
$

@kived
Copy link
Contributor

kived commented Jun 8, 2016

Fixed in #767

@kived kived closed this as completed Jun 8, 2016
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

No branches or pull requests

2 participants