Skip to content

Zope2 at "Downloading/unpacking zope.security" #190

@devwithzachary

Description

@devwithzachary

I am trying to build python-for-android with Zope2 by using the command:

./distribute.sh -m "openssl pil zope2"

and this fails with:

Getting distribution for 'zope.security==3.7.4'.
In file included from /home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/Python.h:58:0,
                 from src/zope/security/_proxy.c:19:
/home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/pyport.h:849:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  ^
src/zope/security/_proxy.c: In function 'init_proxy':
src/zope/security/_proxy.c:1006:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   Py_INCREF(&SecurityProxyType);
   ^
error: Setup script exited with error: command 'arm-linux-androideabi-gcc' failed with exit status 1
An error occurred when trying to install zope.security 3.7.4. Look above this message for any errors that were output by easy_install.
While:
  Installing test.
  Getting distribution for 'zope.security==3.7.4'.
Error: Couldn't install: zope.security 3.7.4

To get to this point I used this recipe for zope2:

#!/bin/bash

VERSION_zope2=${VERSION_zope2:-2.13}
URL_zope2=http://github.com/zopefoundation/Zope/archive/$VERSION_zope2.zip
BUILD_zope2=$BUILD_PATH/zope2/$(get_directory $URL_zope2)
RECIPE_zope2=$RECIPES_PATH/zope2

function prebuild_zope2() {
    true
}

function build_zope2() {
    cd $BUILD_zope2

    push_arm

    export LDFLAGS="$LDFLAGS -L$LIBS_PATH"
    export LDSHARED="$LIBLINK"
#    export PYTHONPATH="/home/marco/src/android/python-for-android/build/hostpython/Python-2.7.2/build/lib.linux-x86_64-2.7"

    HOSTPYTHON=/home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/hostpython
    try $HOSTPYTHON bootstrap.py
    try bin/buildout

    unset LDSHARED
    pop_arm
}

function postbuild_zope2() {
    true
}

I had an issue with _ssl which I fixed by doing:

python-for-android/build/hostpython/Python-2.7.2/Lib ln -s ../build/lib.linux-x86_64-2.7 plat-linux3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions