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

reportlab broken, possibly using wrong python header or compiler flags with python 3? #1575

Closed
ghost opened this issue Jan 10, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 10, 2019

With latest master & python3 (non-crystax), it seems there is some issue with reportlab including a Python header that expects crypt.h on the host (which I'm pretty sure shouldn't be included from there):

[INFO]:    Building reportlab for armeabi-v7a
[INFO]:    reportlab apparently isn't already in site-packages
[INFO]:    Building compiled components in reportlab
[INFO]:    -> directory context /root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab
[DEBUG]:   -> running python setup.py build_ext -v
================================================
Attempting build of _rl_accel & pyHnj
extensions from '/root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab/src/rl_addons/rl_accel'
================================================
================================================
Attempting build of _renderPM
extensions from '/root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab/src/rl_addons/renderPM'
================================================
will use package libart 2.3.12
# installing with freetype version 21
################################################
not downloading T1 font curve files
/root/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/Lib/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
building 'reportlab.lib._rl_accel' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/root
creating build/temp.linux-x86_64-3.7/root/.local
creating build/temp.linux-x86_64-3.7/root/.local/share
creating build/temp.linux-x86_64-3.7/root/.local/share/python-for-android
creating build/temp.linux-x86_64-3.7/root/.local/share/python-for-android/build
creating build/temp.linux-x86_64-3.7/root/.local/share/python-for-android/build/other_builds
creating build/temp.linux-x86_64-3.7/root/.local/share/python-for-android/build/other_builds/reportlab-python3
creating build/temp.linux-x86_64-3.7/root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21
creating build/temp.linux-x86_64-3.7/root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab
creating build/temp.linux-x86_64-3.7/root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab/src
creating build/temp.linux-x86_64-3.7/root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab/src/rl_addons
creating build/temp.linux-x86_64-3.7/root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab/src/rl_addons/rl_accel
arm-linux-androideabi-gcc -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /ndk/sysroot/usr/include/arm-linux-androideabi -I/ndk/sysroot/usr/include/arm-linux-androideabi -isysroot /ndk/sysroot -I/root/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python3.7 -DNDEBUG -g -fwrapv -O3 -Wall -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /ndk/sysroot/usr/include/arm-linux-androideabi -I/ndk/sysroot/usr/include/arm-linux-androideabi -isysroot /ndk/sysroot -I/root/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python3.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC -I/root/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/Include -I/root/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build -c /root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab/src/rl_addons/rl_accel/_rl_accel.c -o build/temp.linux-x86_64-3.7/root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab/src/rl_addons/rl_accel/_rl_accel.o
In file included from /root/.local/share/python-for-android/build/other_builds/reportlab-python3/armeabi-v7a__ndk_target_21/reportlab/src/rl_addons/rl_accel/_rl_accel.c:8:0:
/root/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/Include/Python.h:39:19: fatal error: crypt.h: No such file or directory
 #include <crypt.h>
                   ^
compilation terminated.
error: command 'arm-linux-androideabi-gcc' failed with exit status 1


  STDERR:

Happy for any guesses on why that is, although I might dig into it myself soon if nobody has any idea

@ghost
Copy link
Author

ghost commented Jan 10, 2019

I'm wondering, is this something maybe related to OpenSSL being enabled as a core module in Python outside of the actual openssl recipe (through some #define), but the ssl headers not being downloaded & present?

@AndreMiras
Copy link
Member

What happens if you edit .buildozer/android/platform/build/build/other_builds/hostpython3-python3/desktop/hostpython3/native-build/pyconfig.h and comment #define HAVE_CRYPT_H 1 ?

opacam added a commit to opacam/python-for-android that referenced this issue Jan 17, 2019
Caused because we try to compile the package with hostpython and we need to use target python or we will not have the right python headers

Resolves: kivy#1575
opacam added a commit to opacam/python-for-android that referenced this issue Jan 17, 2019
Caused because we try to compile the package with hostpython and we need to use target python or we will not have the right python headers

Resolves: kivy#1575
opacam added a commit to opacam/python-for-android that referenced this issue Jan 17, 2019
Caused because we try to compile the package with hostpython and we need to use target python or we will not have the right python headers

Resolves: kivy#1575
AndreMiras added a commit that referenced this issue Jan 17, 2019
Fix reportlab's recipe `crypt.h` error, fixes #1575
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

1 participant