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

Build failed for Pillow recipe when targeting x86_64 arch #2259

Closed
5 tasks done
misl6 opened this issue Jul 7, 2020 · 2 comments
Closed
5 tasks done

Build failed for Pillow recipe when targeting x86_64 arch #2259

misl6 opened this issue Jul 7, 2020 · 2 comments
Labels

Comments

@misl6
Copy link
Member

misl6 commented Jul 7, 2020

Checklist

  • the issue is indeed a bug and not a support request
  • issue doesn't already exist: https://github.com/kivy/python-for-android/issues
  • I have a short, runnable example that reproduces the issue
  • I reproduced the problem with the latest development version (p4a.branch = develop)
  • I used the grave accent (aka backticks) to format code or logs when appropriated

Versions

  • Python: python3.8
  • OS: Ubuntu 20.04
  • Kivy: master
  • Cython: 0.29.17
  • OpenJDK: 1.8.0_252

Description

Building the Pillow recipe for x86_64 arch fails

buildozer.spec

Command:

buildozer android release

Spec file:

# (int) Android API to use
android.api = 28

# (int) Minimum API required. You will need to set the android.ndk.api to be as low as this value.
android.minapi = 23

# (int) Android SDK version to use
android.sdk = 26

# (str) Android NDK version to use
android.ndk = 19b

# (int) Android NDK API to use (optional). This is the minimum API your app will support.
android.ndk_api = 23

....
# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86
android.arch = x86_64
.....
# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = openssl, python3, kivy==master, android, ....., libiconv, libzbar, Pillow, pyzbar, zbarcam, xcamera

Logs

    self.build_extensions()
  File "setup.py", line 597, in build_extensions
    raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 807, in <module>
    raise RequiredDependencyException(msg)
__main__.RequiredDependencyException: 

The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
   https://pillow.readthedocs.io/en/latest/installation.html

The bug also appears here: #2257

@AndreMiras AndreMiras added the bug label Jul 8, 2020
@83-p
Copy link

83-p commented Aug 17, 2020

If arch is x86_64, the NDK library path will be /usr/lib64. Pillow recipes need to change ndk_lib_dir = join(self.ctx.ndk_platform, 'usr', 'lib') to ndk_lib_dir = join(self.ctx.ndk_platform, 'usr', 'lib64').
Please change zlib_lib_path = join(self.ctx.ndk_platform, 'usr', 'lib') to zlib_lib_path = join(self.ctx.ndk_platform, 'usr', 'lib64') for the Python3 recipe.
Other recipes also need to check the NDK library path.

@akshayaurora
Copy link
Member

Fixed in develop branch.

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

No branches or pull requests

4 participants