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

Can't compile dependency in 32bit on 64bit system #1237

Closed
Denpeer opened this issue Feb 15, 2018 · 1 comment
Closed

Can't compile dependency in 32bit on 64bit system #1237

Denpeer opened this issue Feb 15, 2018 · 1 comment

Comments

@Denpeer
Copy link

Denpeer commented Feb 15, 2018

I'm trying to compile the package pyclipper (https://github.com/greginvm/pyclipper) for armeabi-v7a. Using the master branch compilation succeeds but i get the following error upon running the application on my android device: ImportError: dlopen failed: "/data/data/org.test.hcdpyclipper/files/app/lib/python2.7/site-packages/pyclipper.so" is 64-bit instead of 32-bit

When using a custom recipe to compile to 32bit I get the following compilation error: wrong ELF class: ELFCLASS32 when building the dependency. The recipe I created is:

from os.path import exists, join
import sh
import glob
import pprint
from pprint import pprint

class PyclipperRecipe(PythonRecipe):
    # This could also inherit from PythonRecipe etc. if you want to
    # use their pre-written build processes

    version = '1.1.0'
    url = 'https://github.com/greginvm/pyclipper/releases/download/{version}/pyclipper-{version}.zip'
    # {version} will be replaced with self.version when downloading

    depends = ['python2', 'setuptools']  # A list of any other recipe names
                                    # that must be built before this
                                    # one

    conflicts = []  # A list of any recipe names that cannot be built
                    # alongside this one

    site_packages_name = 'pyclipper'


    def get_recipe_env(self,arch):
        env = super(PyclipperRecipe, self).get_recipe_env(arch)
        # Manipulate the env here if you want
        env['PYTHONPATH'] = ':'.join([self.ctx.get_site_packages_dir()])
        env['LDFLAGS'] += " -m32"
        env['CFLAGS'] += " -m32"
        pprint(env)
        return env


recipe = PyclipperRecipe()
@inclement
Copy link
Member

The error indicates that the recipe includes compiled components that have been built for the wrong architecture. Pyclipper probably needs a CythonRecipe.

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